	.file	"extr_htc_drv_main.c_ath9k_htc_set_key.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Set HW Key\n"
	.text
	.p2align 4
	.type	ath9k_htc_set_key, @function
ath9k_htc_set_key:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR [rdi]
	mov	rdi, QWORD PTR 8[r12]
	call	ath9k_hw_common@PLT
	cmp	QWORD PTR htc_modparam_nohwcrypt[rip], 0
	jne	.L19
	mov	rbx, rax
	mov	rax, QWORD PTR [r14]
	cmp	rax, QWORD PTR NL80211_IFTYPE_ADHOC[rip]
	je	.L4
	cmp	rax, QWORD PTR NL80211_IFTYPE_MESH_POINT[rip]
	je	.L4
.L5:
	mov	rdi, r12
	call	mutex_lock@PLT
	mov	esi, DWORD PTR CONFIG[rip]
	mov	rdi, rbx
	lea	rdx, .LC0[rip]
	call	ath_dbg@PLT
	mov	rdi, r12
	call	ath9k_htc_ps_wakeup@PLT
	cmp	r13d, 128
	je	.L7
	cmp	r13d, 129
	je	.L8
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
.L10:
	mov	rdi, r12
	call	ath9k_htc_ps_restore@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR WLAN_CIPHER_SUITE_TKIP[rip]
	je	.L6
	cmp	rax, QWORD PTR WLAN_CIPHER_SUITE_CCMP[rip]
	jne	.L5
.L6:
	mov	eax, DWORD PTR 8[rbp]
	test	DWORD PTR IEEE80211_KEY_FLAG_PAIRWISE[rip], eax
	jne	.L5
	mov	r13d, DWORD PTR EOPNOTSUPP[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r13d, DWORD PTR ENOSPC[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rcx, rbp
	mov	rdx, r15
	mov	rsi, r14
	mov	rdi, rbx
	call	ath_key_config@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L10
	mov	DWORD PTR 12[rbp], eax
	mov	rdx, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR 8[rbp]
	or	eax, DWORD PTR IEEE80211_KEY_FLAG_GENERATE_IV[rip]
	cmp	rdx, QWORD PTR WLAN_CIPHER_SUITE_TKIP[rip]
	mov	DWORD PTR 8[rbp], eax
	jne	.L11
	or	eax, DWORD PTR IEEE80211_KEY_FLAG_GENERATE_MMIC[rip]
	mov	DWORD PTR 8[rbp], eax
.L11:
	mov	rax, QWORD PTR 8[r12]
	mov	r13d, DWORD PTR [rax]
	test	r13d, r13d
	je	.L10
	xor	r13d, r13d
	cmp	rdx, QWORD PTR WLAN_CIPHER_SUITE_CCMP[rip]
	jne	.L10
	mov	eax, DWORD PTR IEEE80211_KEY_FLAG_SW_MGMT_TX[rip]
	or	DWORD PTR 8[rbp], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, rbp
	mov	rdi, rbx
	xor	r13d, r13d
	call	ath_key_delete@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	ath9k_htc_set_key, .-ath9k_htc_set_key
	.comm	htc_modparam_nohwcrypt,8,8
	.comm	WLAN_CIPHER_SUITE_TKIP,8,8
	.comm	WLAN_CIPHER_SUITE_CCMP,8,8
	.comm	NL80211_IFTYPE_MESH_POINT,8,8
	.comm	NL80211_IFTYPE_ADHOC,8,8
	.comm	IEEE80211_KEY_FLAG_SW_MGMT_TX,4,4
	.comm	IEEE80211_KEY_FLAG_PAIRWISE,4,4
	.comm	IEEE80211_KEY_FLAG_GENERATE_MMIC,4,4
	.comm	IEEE80211_KEY_FLAG_GENERATE_IV,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENOSPC,4,4
	.comm	EINVAL,4,4
	.comm	CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_htc_drv_main.c_ath9k_htc_set_key.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Set HW Key\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath9k_htc_set_key, %function
ath9k_htc_set_key:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, [r0]
	mov	r6, r1
	ldr	r0, [r5, #4]
	mov	r7, r2
	mov	r8, r3
	ldr	r9, [sp, #32]
	bl	ath9k_hw_common
	ldr	r1, .L18
	ldr	r4, [r1]
	cmp	r4, #0
	bne	.L17
	ldr	r2, .L18+4
	ldr	r3, [r7]
	ldr	r2, [r2]
	mov	r10, r0
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L18+8
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
.L5:
	mov	r0, r5
	bl	mutex_lock
	ldr	r3, .L18+12
	ldr	r2, .L18+16
	ldr	r1, [r3]
	mov	r0, r10
	bl	ath_dbg
	mov	r0, r5
	bl	ath9k_htc_ps_wakeup
	cmp	r6, #128
	beq	.L7
	cmp	r6, #129
	beq	.L8
	ldr	r3, .L18+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L10:
	mov	r0, r5
	bl	ath9k_htc_ps_restore
	mov	r0, r5
	bl	mutex_unlock
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r2, .L18+24
	ldr	r3, [r9]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L6
	ldr	r2, .L18+28
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L5
.L6:
	ldr	r3, .L18+32
	ldr	r2, [r9, #4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L5
	ldr	r3, .L18+36
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L17:
	ldr	r3, .L18+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	mov	r2, r8
	mov	r1, r7
	mov	r0, r10
	mov	r3, r9
	bl	ath_key_config
	cmp	r0, #0
	movlt	r4, r0
	blt	.L10
	ldr	r3, .L18+24
	ldr	r2, .L18+44
	ldr	r1, [r3]
	ldr	ip, [r2]
	ldm	r9, {r2, r3}
	cmp	r2, r1
	ldreq	r1, .L18+48
	orr	r3, r3, ip
	ldreq	r1, [r1]
	str	r3, [r9, #4]
	orreq	r3, r1, r3
	streq	r3, [r9, #4]
	ldr	r3, [r5, #4]
	str	r0, [r9, #8]
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r4, r3
	beq	.L10
	ldr	r3, .L18+28
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L10
	ldr	r2, .L18+52
	ldr	r3, [r9, #4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r9, #4]
	b	.L10
.L8:
	mov	r1, r9
	mov	r0, r10
	bl	ath_key_delete
	b	.L10
.L19:
	.align	2
.L18:
	.word	htc_modparam_nohwcrypt
	.word	NL80211_IFTYPE_ADHOC
	.word	NL80211_IFTYPE_MESH_POINT
	.word	CONFIG
	.word	.LC0
	.word	EINVAL
	.word	WLAN_CIPHER_SUITE_TKIP
	.word	WLAN_CIPHER_SUITE_CCMP
	.word	IEEE80211_KEY_FLAG_PAIRWISE
	.word	EOPNOTSUPP
	.word	ENOSPC
	.word	IEEE80211_KEY_FLAG_GENERATE_IV
	.word	IEEE80211_KEY_FLAG_GENERATE_MMIC
	.word	IEEE80211_KEY_FLAG_SW_MGMT_TX
	.size	ath9k_htc_set_key, .-ath9k_htc_set_key
	.comm	htc_modparam_nohwcrypt,4,4
	.comm	WLAN_CIPHER_SUITE_TKIP,4,4
	.comm	WLAN_CIPHER_SUITE_CCMP,4,4
	.comm	NL80211_IFTYPE_MESH_POINT,4,4
	.comm	NL80211_IFTYPE_ADHOC,4,4
	.comm	IEEE80211_KEY_FLAG_SW_MGMT_TX,4,4
	.comm	IEEE80211_KEY_FLAG_PAIRWISE,4,4
	.comm	IEEE80211_KEY_FLAG_GENERATE_MMIC,4,4
	.comm	IEEE80211_KEY_FLAG_GENERATE_IV,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	ENOSPC,4,4
	.comm	EINVAL,4,4
	.comm	CONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
