	.file	"extr_tx.c_carl9170_update_beacon.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"beacon does not fit into device memory!\n"
	.align 8
.LC1:
	.string	"no support for beacons bigger than %d (yours:%d).\n"
	.text
	.p2align 4
	.globl	carl9170_update_beacon
	.type	carl9170_update_beacon, @function
carl9170_update_beacon:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 8[rsp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	rcu_read_lock@PLT
	mov	rdi, rbp
	call	carl9170_pick_beaconing_vif@PLT
	test	rax, rax
	je	.L19
	mov	rdi, rax
	mov	r13, rax
	call	carl9170_get_vif@PLT
	mov	rdi, QWORD PTR 8[rbp]
	xor	ecx, ecx
	xor	edx, edx
	mov	esi, eax
	call	ieee80211_beacon_get_tim@PLT
	mov	r14d, DWORD PTR ENOMEM[rip]
	mov	r12, rax
	neg	r14d
	test	rax, rax
	je	.L5
	mov	rdi, rbp
	call	spin_lock_bh@PLT
	mov	r15, QWORD PTR 8[r13]
	mov	r14, QWORD PTR 8[r12]
	test	r15, r15
	je	.L6
	mov	r15, QWORD PTR 8[r15]
.L6:
	mov	rbx, QWORD PTR 0[r13]
	mov	rax, QWORD PTR 16[rbp]
	mov	esi, 4
	imul	rbx, QWORD PTR AR9170_MAC_BCN_LENGTH_MAX[rip]
	mov	rdi, QWORD PTR FCS_LEN[rip]
	add	rdi, QWORD PTR [r12]
	mov	QWORD PTR [rsp], rax
	call	roundup@PLT
	mov	rcx, rax
	lea	rax, [rbx+rax]
	cmp	rax, QWORD PTR 24[rbp]
	jg	.L38
	cmp	QWORD PTR AR9170_MAC_BCN_LENGTH_MAX[rip], rcx
	jl	.L39
	lea	rdx, 24[rsp]
	lea	rcx, 32[rsp]
	mov	rsi, r12
	mov	rdi, rbp
	call	carl9170_tx_beacon_physet@PLT
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], eax
	call	carl9170_async_regwrite_begin@PLT
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, QWORD PTR AR9170_MAC_REG_BCN_HT1[rip]
	call	carl9170_async_regwrite@PLT
	mov	edx, DWORD PTR 12[rsp]
	mov	rsi, QWORD PTR 32[rsp]
	test	edx, edx
	jne	.L40
	mov	rdi, QWORD PTR AR9170_MAC_REG_BCN_PLCP[rip]
	call	carl9170_async_regwrite@PLT
.L14:
	add	rbx, QWORD PTR [rsp]
	mov	QWORD PTR [rsp], rbx
	xor	ebx, ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, QWORD PTR [r14]
	test	r15, r15
	je	.L15
	cmp	QWORD PTR [r15+rbx*8], rdi
	je	.L16
.L15:
	call	le32_to_cpu@PLT
	lea	edi, 0[0+rbx*4]
	movsx	rdi, edi
	mov	rsi, rax
	add	rdi, QWORD PTR [rsp]
	call	carl9170_async_regwrite@PLT
.L16:
	add	rbx, 1
	add	r14, 8
.L13:
	mov	rdi, QWORD PTR [r12]
	mov	esi, 4
	call	DIV_ROUND_UP@PLT
	cmp	eax, ebx
	jg	.L17
	xor	eax, eax
	call	carl9170_async_regwrite_finish@PLT
	mov	rdi, QWORD PTR 8[r13]
	call	dev_kfree_skb_any@PLT
	mov	QWORD PTR 8[r13], 0
	xor	eax, eax
	call	carl9170_async_regwrite_result@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L9
	mov	QWORD PTR 8[r13], r12
	mov	rdi, rbp
	call	spin_unlock_bh@PLT
	mov	eax, DWORD PTR 8[rsp]
	test	eax, eax
	je	.L19
	mov	rcx, QWORD PTR [rsp]
	mov	edx, DWORD PTR CARL9170_BCN_CTRL_CAB_TRIGGER[rip]
	mov	rdi, rbp
	mov	rsi, QWORD PTR 0[r13]
	mov	r8, QWORD PTR FCS_LEN[rip]
	add	r8, QWORD PTR [r12]
	call	carl9170_bcn_ctrl@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	xor	eax, eax
	xor	r14d, r14d
	call	rcu_read_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L38:
	xor	eax, eax
	call	net_ratelimit@PLT
	test	rax, rax
	jne	.L41
.L8:
	mov	r14d, DWORD PTR EINVAL[rip]
	neg	r14d
.L9:
	mov	rdi, rbp
	call	spin_unlock_bh@PLT
.L5:
	xor	eax, eax
	call	rcu_read_unlock@PLT
	mov	rdi, r12
	call	dev_kfree_skb_any@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L42
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L40:
	.cfi_restore_state
	mov	rdi, QWORD PTR AR9170_MAC_REG_BCN_HT2[rip]
	call	carl9170_async_regwrite@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L39:
	xor	eax, eax
	mov	QWORD PTR [rsp], rcx
	call	net_ratelimit@PLT
	mov	rcx, QWORD PTR [rsp]
	test	rax, rax
	jne	.L43
.L11:
	mov	r14d, DWORD PTR EMSGSIZE[rip]
	mov	rdi, rbp
	neg	r14d
	call	spin_unlock_bh@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L43:
	mov	rax, QWORD PTR 8[rbp]
	mov	rdx, QWORD PTR AR9170_MAC_BCN_LENGTH_MAX[rip]
	lea	rsi, .LC1[rip]
	mov	edi, DWORD PTR [rax]
	xor	eax, eax
	call	wiphy_err@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L41:
	mov	rax, QWORD PTR 8[rbp]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR [rax]
	xor	eax, eax
	call	wiphy_err@PLT
	jmp	.L8
.L42:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	carl9170_update_beacon, .-carl9170_update_beacon
	.comm	FCS_LEN,8,8
	.comm	ENOMEM,4,4
	.comm	EMSGSIZE,4,4
	.comm	EINVAL,4,4
	.comm	CARL9170_BCN_CTRL_CAB_TRIGGER,4,4
	.comm	AR9170_MAC_REG_BCN_PLCP,8,8
	.comm	AR9170_MAC_REG_BCN_HT2,8,8
	.comm	AR9170_MAC_REG_BCN_HT1,8,8
	.comm	AR9170_MAC_BCN_LENGTH_MAX,8,8
	.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_tx.c_carl9170_update_beacon.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"beacon does not fit into device memory!\012\000"
	.align	2
.LC1:
	.ascii	"no support for beacons bigger than %d (yours:%d).\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	carl9170_update_beacon
	.syntax unified
	.arm
	.fpu softvfp
	.type	carl9170_update_beacon, %function
carl9170_update_beacon:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #44
	ldr	r3, .L45
	str	r1, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	rcu_read_lock
	mov	r0, r5
	bl	carl9170_pick_beaconing_vif
	subs	r7, r0, #0
	beq	.L19
	ldr	r4, [r5, #4]
	bl	carl9170_get_vif
	mov	r3, #0
	mov	r1, r0
	mov	r2, r3
	mov	r0, r4
	bl	ieee80211_beacon_get_tim
	subs	r6, r0, #0
	beq	.L38
	ldr	r10, .L45+4
	mov	r0, r5
	ldr	fp, .L45+8
	bl	spin_lock_bh
	ldr	r3, [r10]
	ldr	r9, [r7]
	ldr	r8, [r7, #4]
	ldr	r1, [fp]
	ldr	r0, [r6]
	mul	r9, r3, r9
	ldr	r3, [r5, #8]
	cmp	r8, #0
	add	r0, r0, r1
	mov	r1, #4
	ldrne	r8, [r8, #4]
	str	r3, [sp, #16]
	ldr	r4, [r6, #4]
	bl	roundup
	ldr	r1, [r5, #12]
	mov	r3, r0
	add	r0, r9, r0
	cmp	r0, r1
	bgt	.L39
	ldr	r1, [r10]
	cmp	r1, r3
	blt	.L40
	add	r3, sp, #32
	mov	r1, r6
	add	r2, sp, #28
	mov	r0, r5
	bl	carl9170_tx_beacon_physet
	str	r0, [sp, #20]
	mov	r0, r5
	bl	carl9170_async_regwrite_begin
	ldr	r2, .L45+12
	ldr	r1, [sp, #28]
	ldr	r0, [r2]
	bl	carl9170_async_regwrite
	ldr	r3, [sp, #20]
	cmp	r3, #0
	bne	.L41
	ldr	r3, .L45+16
	ldr	r1, [sp, #32]
	ldr	r0, [r3]
	bl	carl9170_async_regwrite
.L14:
	ldr	r3, [sp, #16]
	add	r3, r3, r9
	str	r3, [sp, #16]
	mov	r9, #0
	sub	r10, r3, r4
	b	.L13
.L17:
	cmp	r8, #0
	ldr	r0, [r4]
	beq	.L15
	ldr	r3, [r8, r9, lsl #2]
	cmp	r3, r0
	beq	.L16
.L15:
	bl	le32_to_cpu
	mov	r1, r0
	add	r0, r10, r4
	bl	carl9170_async_regwrite
.L16:
	add	r9, r9, #1
	add	r4, r4, #4
.L13:
	mov	r1, #4
	ldr	r0, [r6]
	bl	DIV_ROUND_UP
	cmp	r0, r9
	bgt	.L17
	bl	carl9170_async_regwrite_finish
	ldr	r0, [r7, #4]
	bl	dev_kfree_skb_any
	mov	r3, #0
	str	r3, [r7, #4]
	bl	carl9170_async_regwrite_result
	subs	r4, r0, #0
	bne	.L9
	mov	r0, r5
	str	r6, [r7, #4]
	bl	spin_unlock_bh
	ldr	r3, [sp, #12]
	cmp	r3, #0
	beq	.L19
	ldr	r3, [fp]
	ldr	r2, [r6]
	ldr	ip, .L45+20
	add	r2, r2, r3
	ldr	r1, [r7]
	mov	r0, r5
	str	r2, [sp]
	ldr	r3, [sp, #16]
	ldr	r2, [ip]
	bl	carl9170_bcn_ctrl
	subs	r4, r0, #0
	bne	.L5
.L19:
	bl	rcu_read_unlock
	mov	r4, #0
	b	.L1
.L38:
	ldr	r3, .L45+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L5:
	bl	rcu_read_unlock
	mov	r0, r6
	bl	dev_kfree_skb_any
.L1:
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L41:
	ldr	r3, .L45+28
	ldr	r1, [sp, #32]
	ldr	r0, [r3]
	bl	carl9170_async_regwrite
	b	.L14
.L39:
	bl	net_ratelimit
	cmp	r0, #0
	bne	.L43
.L8:
	ldr	r3, .L45+32
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L9:
	mov	r0, r5
	bl	spin_unlock_bh
	b	.L5
.L40:
	str	r3, [sp, #12]
	bl	net_ratelimit
	cmp	r0, #0
	ldr	r3, [sp, #12]
	bne	.L44
.L11:
	ldr	r3, .L45+36
	mov	r0, r5
	ldr	r4, [r3]
	rsb	r4, r4, #0
	bl	spin_unlock_bh
	b	.L5
.L44:
	ldr	r1, [r5, #4]
	ldr	r2, [r10]
	ldr	r0, [r1]
	ldr	r1, .L45+40
	bl	wiphy_err
	b	.L11
.L43:
	ldr	r3, [r5, #4]
	ldr	r1, .L45+44
	ldr	r0, [r3]
	bl	wiphy_err
	b	.L8
.L42:
	bl	__stack_chk_fail
.L46:
	.align	2
.L45:
	.word	.LC2
	.word	AR9170_MAC_BCN_LENGTH_MAX
	.word	FCS_LEN
	.word	AR9170_MAC_REG_BCN_HT1
	.word	AR9170_MAC_REG_BCN_PLCP
	.word	CARL9170_BCN_CTRL_CAB_TRIGGER
	.word	ENOMEM
	.word	AR9170_MAC_REG_BCN_HT2
	.word	EINVAL
	.word	EMSGSIZE
	.word	.LC1
	.word	.LC0
	.size	carl9170_update_beacon, .-carl9170_update_beacon
	.comm	FCS_LEN,4,4
	.comm	ENOMEM,4,4
	.comm	EMSGSIZE,4,4
	.comm	EINVAL,4,4
	.comm	CARL9170_BCN_CTRL_CAB_TRIGGER,4,4
	.comm	AR9170_MAC_REG_BCN_PLCP,4,4
	.comm	AR9170_MAC_REG_BCN_HT2,4,4
	.comm	AR9170_MAC_REG_BCN_HT1,4,4
	.comm	AR9170_MAC_BCN_LENGTH_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
