	.file	"extr_cmd.c_wl12xx_cmd_role_start_sta.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cmd role start sta %d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"role start: roleid=%d, hlid=%d, session=%d basic_rate_set: 0x%x, remote_rates: 0x%x"
	.align 8
.LC2:
	.string	"failed to initiate cmd role start sta"
	.text
	.p2align 4
	.globl	wl12xx_cmd_role_start_sta
	.type	wl12xx_cmd_role_start_sta, @function
wl12xx_cmd_role_start_sta:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	mov	rdi, rsi
	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, rsi
	call	wl12xx_wlvif_to_vif@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 80
	mov	r13, rax
	call	kzalloc@PLT
	mov	r14d, DWORD PTR ENOMEM[rip]
	neg	r14d
	test	rax, rax
	je	.L1
	mov	edx, DWORD PTR 40[rbp]
	mov	edi, DWORD PTR DEBUG_CMD[rip]
	mov	r12, rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	call	wl1271_debug@PLT
	mov	eax, DWORD PTR 40[rbp]
	mov	DWORD PTR 76[r12], eax
	mov	rax, QWORD PTR NL80211_BAND_5GHZ[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L11
.L4:
	mov	eax, DWORD PTR 68[rbp]
	mov	edi, DWORD PTR 8[rbp]
	mov	DWORD PTR 68[r12], eax
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 64[rbp]
	mov	QWORD PTR 56[r12], rax
	call	cpu_to_le16@PLT
	mov	edx, DWORD PTR 56[rbp]
	mov	esi, DWORD PTR 60[rbp]
	mov	DWORD PTR 48[r12], eax
	mov	eax, DWORD PTR WL12XX_SSID_TYPE_ANY[rip]
	mov	DWORD PTR 40[r12], edx
	mov	edi, DWORD PTR 36[r12]
	mov	DWORD PTR 44[r12], eax
	call	memcpy@PLT
	mov	esi, DWORD PTR 0[r13]
	mov	edi, DWORD PTR 32[r12]
	mov	edx, DWORD PTR ETH_ALEN[rip]
	call	memcpy@PLT
	mov	rsi, rbp
	mov	rdi, r15
	mov	r13d, DWORD PTR CONF_TX_ENABLED_RATES[rip]
	or	r13d, DWORD PTR CONF_TX_MCS_RATES[rip]
	call	wlcore_hw_sta_get_ap_rate_mask@PLT
	or	r13d, eax
	cmp	QWORD PTR 48[rbp], 0
	je	.L5
	mov	eax, DWORD PTR CONF_TX_CCK_RATES[rip]
	not	eax
	and	r13d, eax
.L5:
	mov	edi, r13d
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 32[rbp]
	mov	QWORD PTR 24[r12], rax
	call	wlcore_get_native_channel_type@PLT
	mov	DWORD PTR 64[r12], eax
	mov	rax, QWORD PTR 16[rbp]
	cmp	rax, QWORD PTR WL12XX_INVALID_LINK_ID[rip]
	je	.L12
.L6:
	mov	rdx, QWORD PTR [r15]
	mov	QWORD PTR [r12], rax
	mov	edi, r13d
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	DWORD PTR 8[r12], eax
	call	cpu_to_le32@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, DWORD PTR 40[rbp]
	mov	r9d, DWORD PTR 8[rbp]
	mov	QWORD PTR 16[r12], rax
	mov	eax, DWORD PTR 36[rbp]
	lea	rsi, .LC1[rip]
	mov	r8d, DWORD PTR 8[r12]
	mov	rcx, QWORD PTR [r12]
	push	rax
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR DEBUG_CMD[rip]
	xor	eax, eax
	call	wl1271_debug@PLT
	mov	rdx, r12
	xor	r8d, r8d
	mov	ecx, 80
	mov	esi, DWORD PTR CMD_ROLE_START[rip]
	mov	rdi, r15
	call	wl1271_cmd_send@PLT
	mov	r14d, eax
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	test	r14d, r14d
	js	.L13
	mov	eax, DWORD PTR 32[rbp]
	mov	DWORD PTR 24[rbp], eax
.L7:
	mov	rdi, r12
	call	kfree@PLT
.L3:
	endbr64
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	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
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR WLCORE_BAND_5GHZ[rip]
	mov	DWORD PTR 72[r12], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rdx, 16[rbp]
	mov	rsi, rbp
	mov	rdi, r15
	call	wl12xx_allocate_link@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR 16[rbp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC2[rip]
	call	wl1271_error@PLT
	lea	rdx, 16[rbp]
	mov	rsi, rbp
	mov	rdi, r15
	call	wl12xx_free_link@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	wl12xx_cmd_role_start_sta, .-wl12xx_cmd_role_start_sta
	.comm	WLCORE_BAND_5GHZ,4,4
	.comm	WL12XX_SSID_TYPE_ANY,4,4
	.comm	WL12XX_INVALID_LINK_ID,8,8
	.comm	NL80211_BAND_5GHZ,8,8
	.comm	GFP_KERNEL,4,4
	.comm	ETH_ALEN,4,4
	.comm	ENOMEM,4,4
	.comm	DEBUG_CMD,4,4
	.comm	CONF_TX_MCS_RATES,4,4
	.comm	CONF_TX_ENABLED_RATES,4,4
	.comm	CONF_TX_CCK_RATES,4,4
	.comm	CMD_ROLE_START,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_cmd.c_wl12xx_cmd_role_start_sta.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cmd role start sta %d\000"
	.align	2
.LC1:
	.ascii	"role start: roleid=%d, hlid=%d, session=%d basic_ra"
	.ascii	"te_set: 0x%x, remote_rates: 0x%x\000"
	.align	2
.LC2:
	.ascii	"failed to initiate cmd role start sta\000"
	.text
	.align	2
	.global	wl12xx_cmd_role_start_sta
	.syntax unified
	.arm
	.fpu softvfp
	.type	wl12xx_cmd_role_start_sta, %function
wl12xx_cmd_role_start_sta:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r8, r0
	sub	sp, sp, #20
	mov	r0, r1
	mov	r4, r1
	bl	wl12xx_wlvif_to_vif
	ldr	r2, .L17
	mov	r6, r0
	ldr	r1, [r2]
	mov	r0, #56
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L14
	ldr	r9, .L17+4
	ldr	r2, [r4, #24]
	ldr	r1, .L17+8
	ldr	r0, [r9]
	bl	wl1271_debug
	ldr	r3, .L17+12
	ldr	r1, [r4]
	ldr	r2, [r3]
	ldr	r3, [r4, #24]
	cmp	r1, r2
	str	r3, [r5, #52]
	ldreq	r3, .L17+16
	ldr	r0, [r4, #4]
	ldreq	r3, [r3]
	streq	r3, [r5, #48]
	ldr	r3, [r4, #44]
	str	r3, [r5, #44]
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r0, [r4, #40]
	str	r3, [r5, #36]
	bl	cpu_to_le16
	ldr	r3, .L17+20
	ldr	r2, [r4, #32]
	ldr	r3, [r3]
	ldr	r1, [r4, #36]
	str	r0, [r5, #32]
	str	r3, [r5, #28]
	str	r2, [r5, #24]
	ldr	r0, [r5, #20]
	bl	memcpy
	ldr	r3, .L17+24
	ldr	r1, [r6]
	ldr	r2, [r3]
	ldr	r0, [r5, #16]
	bl	memcpy
	ldr	r2, .L17+28
	ldr	r3, .L17+32
	ldr	r6, [r2]
	ldr	r3, [r3]
	mov	r1, r4
	mov	r0, r8
	orr	r6, r6, r3
	bl	wlcore_hw_sta_get_ap_rate_mask
	ldr	r3, [r4, #28]
	orr	r6, r6, r0
	cmp	r3, #0
	ldrne	r3, .L17+36
	ldrne	r3, [r3]
	bicne	r6, r6, r3
	mov	r0, r6
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r0, [r4, #16]
	str	r3, [r5, #12]
	bl	wlcore_get_native_channel_type
	ldr	r2, .L17+40
	ldr	r3, [r4, #8]
	ldr	r2, [r2]
	str	r0, [r5, #40]
	cmp	r3, r2
	beq	.L15
.L6:
	ldr	r2, [r8]
	str	r3, [r5]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r6
	str	r3, [r5, #4]
	bl	cpu_to_le32
	ldr	r1, [r4, #20]
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	str	r0, [r5, #8]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	ldr	r2, [r5, #4]
	ldr	r1, .L17+44
	str	r2, [sp]
	ldr	r2, [r4, #24]
	ldr	r0, [r9]
	bl	wl1271_debug
	mov	r2, #0
	ldr	r3, .L17+48
	str	r2, [sp]
	ldr	r1, [r3]
	mov	r2, r5
	mov	r3, #56
	mov	r0, r8
	bl	wl1271_cmd_send
	subs	r7, r0, #0
	blt	.L16
	ldr	r3, [r4, #16]
	str	r3, [r4, #12]
.L7:
.L3:
	mov	r0, r5
	bl	kfree
	mov	r0, r7
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L15:
	mov	r1, r4
	mov	r0, r8
	add	r2, r4, #8
	bl	wl12xx_allocate_link
	subs	r7, r0, #0
	bne	.L7
	ldr	r3, [r4, #8]
	b	.L6
.L14:
	ldr	r3, .L17+52
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L16:
	ldr	r0, .L17+56
	bl	wl1271_error
	mov	r0, r8
	mov	r1, r4
	add	r2, r4, #8
	bl	wl12xx_free_link
	b	.L7
.L18:
	.align	2
.L17:
	.word	GFP_KERNEL
	.word	DEBUG_CMD
	.word	.LC0
	.word	NL80211_BAND_5GHZ
	.word	WLCORE_BAND_5GHZ
	.word	WL12XX_SSID_TYPE_ANY
	.word	ETH_ALEN
	.word	CONF_TX_ENABLED_RATES
	.word	CONF_TX_MCS_RATES
	.word	CONF_TX_CCK_RATES
	.word	WL12XX_INVALID_LINK_ID
	.word	.LC1
	.word	CMD_ROLE_START
	.word	ENOMEM
	.word	.LC2
	.size	wl12xx_cmd_role_start_sta, .-wl12xx_cmd_role_start_sta
	.comm	WLCORE_BAND_5GHZ,4,4
	.comm	WL12XX_SSID_TYPE_ANY,4,4
	.comm	WL12XX_INVALID_LINK_ID,4,4
	.comm	NL80211_BAND_5GHZ,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ETH_ALEN,4,4
	.comm	ENOMEM,4,4
	.comm	DEBUG_CMD,4,4
	.comm	CONF_TX_MCS_RATES,4,4
	.comm	CONF_TX_ENABLED_RATES,4,4
	.comm	CONF_TX_CCK_RATES,4,4
	.comm	CMD_ROLE_START,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
