software/drivers/sd8887/src/wlan/mlan/mlan_cmdevt.c
/**
 *  @brief This function will return the pointer to the first entry in
 *          pending cmd which matches the given bss_index
 *
 *  @param pmadapter    A pointer to mlan_adapter
 *  @param bss_index    bss_index
 *
 *  @return             A pointer to first entry match pioctl_req
 */
@brief This function will return the pointer to the first entry in
pending cmd which matches the given bss_index



@return             A pointer to first entry match pioctl_req
@brief This function will return the pointer to the first entry in pending cmd which matches the given bss_index @return A pointer to first entry match pioctl_req
static cmd_ctrl_node *
wlan_get_bss_pending_ioctl_cmd(pmlan_adapter pmadapter, t_u32 bss_index)
{
	cmd_ctrl_node *pcmd_node = MNULL;
	mlan_ioctl_req *pioctl_buf = MNULL;
	ENTER();
	pcmd_node =
		(cmd_ctrl_node *)util_peek_list(pmadapter->pmoal_handle,
						&pmadapter->cmd_pending_q,
						MNULL, MNULL);
	if (!pcmd_node) {
		LEAVE();
		return MNULL;
	}
	while (pcmd_node != (cmd_ctrl_node *)&pmadapter->cmd_pending_q) {
		if (pcmd_node->pioctl_buf) {
			pioctl_buf = (mlan_ioctl_req *)pcmd_node->pioctl_buf;
			if (pioctl_buf->bss_index == bss_index) {
				LEAVE();
				return pcmd_node;
			}
		}
		pcmd_node = pcmd_node->pnext;
	}
	LEAVE();
	return MNULL;
}
static cmd_ctrl_node * wlan_get_bss_pending_ioctl_cmd ( pmlan_adapter pmadapter , t_u32 bss_index ) { cmd_ctrl_node * pcmd_node = MNULL ; mlan_ioctl_req * pioctl_buf = MNULL ; ENTER ( ) ; pcmd_node = ( cmd_ctrl_node * ) util_peek_list ( pmadapter -> pmoal_handle , & pmadapter -> cmd_pending_q , MNULL , MNULL ) ; if ( ! pcmd_node ) { LEAVE ( ) ; return MNULL ; } while ( pcmd_node != ( cmd_ctrl_node * ) & pmadapter -> cmd_pending_q ) { if ( pcmd_node -> pioctl_buf ) { pioctl_buf = ( mlan_ioctl_req * ) pcmd_node -> pioctl_buf ; if ( pioctl_buf -> bss_index == bss_index ) { LEAVE ( ) ; return pcmd_node ; } } pcmd_node = pcmd_node -> pnext ; } LEAVE ( ) ; return MNULL ; }
@brief This function will return the pointer to the first entry in
          pending cmd which matches the given bss_index
@brief This function will return the pointer to the first entry in pending cmd which matches the given bss_index