	.file	"extr_4965-mac.c_il4965_mac_channel_switch.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"enter\n"
.LC1:
	.string	"invalid channel\n"
.LC2:
	.string	"leave\n"
	.text
	.p2align 4
	.globl	il4965_mac_channel_switch
	.type	il4965_mac_channel_switch, @function
il4965_mac_channel_switch:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR 8[rdi]
	lea	rdi, .LC0[rip]
	mov	r14, QWORD PTR [rdx]
	call	D_MAC80211@PLT
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	rdi, rbp
	call	il_is_rfkill@PLT
	test	rax, rax
	je	.L23
.L3:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	lea	rdi, .LC2[rip]
	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
	jmp	D_MAC80211@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	lea	r13, 16[rbp]
	mov	edi, DWORD PTR S_EXIT_PENDING[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L3
	mov	edi, DWORD PTR S_SCANNING[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L3
	mov	edi, DWORD PTR S_CHANNEL_SWITCH_PENDING[rip]
	mov	rsi, r13
	call	test_bit@PLT
	test	rax, rax
	jne	.L3
	mov	rdi, rbp
	call	il_is_associated@PLT
	test	eax, eax
	je	.L3
	mov	rax, QWORD PTR 24[rbp]
	cmp	QWORD PTR [rax], 0
	je	.L3
	mov	edi, DWORD PTR 68[rbp]
	mov	r15, QWORD PTR [r14]
	call	le16_to_cpu@PLT
	cmp	rax, r15
	je	.L3
	mov	esi, DWORD PTR 8[r14]
	mov	rdi, rbp
	mov	rdx, r15
	call	il_get_channel_info@PLT
	mov	rdi, rax
	call	il_is_channel_valid@PLT
	test	eax, eax
	je	.L24
	lea	rax, 32[rbp]
	mov	rdi, rax
	mov	QWORD PTR 8[rsp], rax
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR [rbx]
	mov	rdi, r12
	mov	DWORD PTR 64[rbp], eax
	call	cfg80211_get_chandef_type@PLT
	cmp	eax, 130
	je	.L6
	jg	.L7
	cmp	eax, 128
	je	.L8
	cmp	eax, 129
	jne	.L10
	mov	eax, DWORD PTR IEEE80211_HT_PARAM_CHA_SEC_ABOVE[rip]
	mov	DWORD PTR 56[rbp], 1
	mov	DWORD PTR 60[rbp], eax
.L10:
	mov	edi, DWORD PTR 48[rbp]
	call	le16_to_cpu@PLT
	cmp	rax, r15
	je	.L11
	mov	QWORD PTR 40[rbp], 0
.L11:
	mov	rsi, r14
	mov	rdi, rbp
	call	il_set_rxon_channel@PLT
	lea	rsi, 64[rbp]
	mov	rdi, rbp
	call	il_set_rxon_ht@PLT
	mov	edx, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR 8[r14]
	mov	rdi, rbp
	call	il_set_flags_for_band@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	spin_unlock_irq@PLT
	mov	rdi, rbp
	call	il_set_rate@PLT
	mov	edi, DWORD PTR S_CHANNEL_SWITCH_PENDING[rip]
	mov	rsi, r13
	call	set_bit@PLT
	mov	rdi, r15
	call	cpu_to_le16@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR 8[rbp], rax
	mov	rax, QWORD PTR 24[rbp]
	call	[QWORD PTR [rax]]
	test	rax, rax
	je	.L3
	mov	edi, DWORD PTR S_CHANNEL_SWITCH_PENDING[rip]
	mov	rsi, r13
	call	clear_bit@PLT
	mov	QWORD PTR 8[rbp], 0
	mov	edi, DWORD PTR 4[rbp]
	xor	esi, esi
	call	ieee80211_chswitch_done@PLT
	jmp	.L3
.L7:
	cmp	eax, 131
	jne	.L10
.L8:
	mov	eax, DWORD PTR IEEE80211_HT_PARAM_CHA_SEC_NONE[rip]
	mov	DWORD PTR 56[rbp], 0
	mov	DWORD PTR 60[rbp], eax
	jmp	.L10
.L24:
	lea	rdi, .LC1[rip]
	call	D_MAC80211@PLT
	jmp	.L3
.L6:
	mov	eax, DWORD PTR IEEE80211_HT_PARAM_CHA_SEC_BELOW[rip]
	mov	DWORD PTR 56[rbp], 1
	mov	DWORD PTR 60[rbp], eax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	il4965_mac_channel_switch, .-il4965_mac_channel_switch
	.comm	S_SCANNING,4,4
	.comm	S_EXIT_PENDING,4,4
	.comm	S_CHANNEL_SWITCH_PENDING,4,4
	.comm	IEEE80211_HT_PARAM_CHA_SEC_NONE,4,4
	.comm	IEEE80211_HT_PARAM_CHA_SEC_BELOW,4,4
	.comm	IEEE80211_HT_PARAM_CHA_SEC_ABOVE,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_4965-mac.c_il4965_mac_channel_switch.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"enter\012\000"
	.align	2
.LC1:
	.ascii	"invalid channel\012\000"
	.align	2
.LC2:
	.ascii	"leave\012\000"
	.text
	.align	2
	.global	il4965_mac_channel_switch
	.syntax unified
	.arm
	.fpu softvfp
	.type	il4965_mac_channel_switch, %function
il4965_mac_channel_switch:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, [r0, #4]
	mov	r6, r0
	ldr	r0, .L25
	mov	r5, r2
	ldr	r8, [r2]
	bl	D_MAC80211
	mov	r0, r4
	bl	mutex_lock
	mov	r0, r4
	bl	il_is_rfkill
	cmp	r0, #0
	beq	.L23
.L3:
	mov	r0, r4
	bl	mutex_unlock
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L25+4
	b	D_MAC80211
.L23:
	ldr	r3, .L25+8
	add	r7, r4, #12
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L3
	ldr	r3, .L25+12
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L3
	ldr	r9, .L25+16
	mov	r1, r7
	ldr	r0, [r9]
	bl	test_bit
	cmp	r0, #0
	bne	.L3
	mov	r0, r4
	bl	il_is_associated
	cmp	r0, #0
	beq	.L3
	ldr	r3, [r4, #16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L3
	ldr	r0, [r4, #44]
	ldr	r10, [r8]
	bl	le16_to_cpu
	cmp	r0, r10
	beq	.L3
	mov	r2, r10
	ldr	r1, [r8, #4]
	mov	r0, r4
	bl	il_get_channel_info
	bl	il_is_channel_valid
	cmp	r0, #0
	beq	.L24
	add	fp, r4, #20
	mov	r0, fp
	bl	spin_lock_irq
	ldr	r3, [r6]
	mov	r0, r5
	str	r3, [r4, #40]
	bl	cfg80211_get_chandef_type
	sub	r3, r0, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L6
.L8:
	.word	.L7
	.word	.L10
	.word	.L9
	.word	.L7
.L7:
	mov	r2, #0
	ldr	r3, .L25+20
	str	r2, [r4, #32]
	ldr	r3, [r3]
	str	r3, [r4, #36]
.L6:
	ldr	r0, [r4, #28]
	bl	le16_to_cpu
	cmp	r0, r10
	movne	r3, #0
	mov	r1, r8
	strne	r3, [r4, #24]
	mov	r0, r4
	bl	il_set_rxon_channel
	add	r1, r4, #40
	mov	r0, r4
	bl	il_set_rxon_ht
	ldr	r2, [r4, #4]
	ldr	r1, [r8, #4]
	mov	r0, r4
	bl	il_set_flags_for_band
	mov	r0, fp
	bl	spin_unlock_irq
	mov	r0, r4
	bl	il_set_rate
	mov	r1, r7
	ldr	r0, [r9]
	bl	set_bit
	mov	r0, r10
	bl	cpu_to_le16
	ldr	r3, [r4, #16]
	str	r0, [r4, #8]
	mov	r1, r5
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	cmp	r0, #0
	beq	.L3
	mov	r1, r7
	ldr	r0, [r9]
	bl	clear_bit
	mov	r1, #0
	ldr	r0, [r4, #4]
	str	r1, [r4, #8]
	bl	ieee80211_chswitch_done
	b	.L3
.L9:
	mov	r2, #1
	ldr	r3, .L25+24
	str	r2, [r4, #32]
	ldr	r3, [r3]
	str	r3, [r4, #36]
	b	.L6
.L10:
	mov	r2, #1
	ldr	r3, .L25+28
	str	r2, [r4, #32]
	ldr	r3, [r3]
	str	r3, [r4, #36]
	b	.L6
.L24:
	ldr	r0, .L25+32
	bl	D_MAC80211
	b	.L3
.L26:
	.align	2
.L25:
	.word	.LC0
	.word	.LC2
	.word	S_EXIT_PENDING
	.word	S_SCANNING
	.word	S_CHANNEL_SWITCH_PENDING
	.word	IEEE80211_HT_PARAM_CHA_SEC_NONE
	.word	IEEE80211_HT_PARAM_CHA_SEC_BELOW
	.word	IEEE80211_HT_PARAM_CHA_SEC_ABOVE
	.word	.LC1
	.size	il4965_mac_channel_switch, .-il4965_mac_channel_switch
	.comm	S_SCANNING,4,4
	.comm	S_EXIT_PENDING,4,4
	.comm	S_CHANNEL_SWITCH_PENDING,4,4
	.comm	IEEE80211_HT_PARAM_CHA_SEC_NONE,4,4
	.comm	IEEE80211_HT_PARAM_CHA_SEC_BELOW,4,4
	.comm	IEEE80211_HT_PARAM_CHA_SEC_ABOVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
