software/drivers/sd8887/src/wlan/mlan/mlan_shim.c
/**
 *  @brief This function process pending ioctl
 *
 *  @param pmadapter  A pointer to mlan_adapter structure
 *
 */
@brief This function process pending ioctl
@param pmadapter  A pointer to mlan_adapter structure
@brief This function process pending ioctl @param pmadapter A pointer to mlan_adapter structure
void
wlan_process_pending_ioctl(mlan_adapter *pmadapter)
{
	pmlan_ioctl_req pioctl_buf;
	mlan_status status = MLAN_STATUS_SUCCESS;
	pmlan_callbacks pcb;
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
	mlan_ds_bss *bss = MNULL;
#endif
#ifdef STA_SUPPORT
	mlan_ds_misc_cfg *misc = MNULL;
#endif
	ENTER();
	pcb = &pmadapter->callbacks;
	while ((pioctl_buf =
		(pmlan_ioctl_req)util_dequeue_list(pmadapter->pmoal_handle,
						   &pmadapter->ioctl_pending_q,
						   pcb->moal_spin_lock,
						   pcb->moal_spin_unlock))) {
		switch (pioctl_buf->req_id) {
#if defined(STA_SUPPORT) && defined(UAP_SUPPORT)
		case MLAN_IOCTL_BSS:
			bss = (mlan_ds_bss *)pioctl_buf->pbuf;
			if (bss->sub_command == MLAN_OID_BSS_ROLE) {
				PRINTM(MCMND, "Role switch ioctl: %d\n",
				       bss->param.bss_role);
				status = wlan_bss_ioctl_bss_role(pmadapter,
								 pioctl_buf);
			}
			break;
#endif
#ifdef STA_SUPPORT
		case MLAN_IOCTL_MISC_CFG:
			misc = (mlan_ds_misc_cfg *)pioctl_buf->pbuf;
			if (misc->sub_command == MLAN_OID_MISC_WARM_RESET) {
				PRINTM(MCMND, "Warm Reset ioctl\n");
				status = wlan_misc_ioctl_warm_reset(pmadapter,
								    pioctl_buf);
			}
			break;
#endif
		default:
			break;
		}
		if (status != MLAN_STATUS_PENDING)
			pcb->moal_ioctl_complete(pmadapter->pmoal_handle,
						 pioctl_buf, status);
	}
	LEAVE();
}
void wlan_process_pending_ioctl ( mlan_adapter * pmadapter ) { pmlan_ioctl_req pioctl_buf ; mlan_status status = MLAN_STATUS_SUCCESS ; pmlan_callbacks pcb ; #if defined ( STA_SUPPORT ) && defined ( UAP_SUPPORT ) mlan_ds_bss * bss = MNULL ; #endif #ifdef STA_SUPPORT mlan_ds_misc_cfg * misc = MNULL ; #endif ENTER ( ) ; pcb = & pmadapter -> callbacks ; while ( ( pioctl_buf = ( pmlan_ioctl_req ) util_dequeue_list ( pmadapter -> pmoal_handle , & pmadapter -> ioctl_pending_q , pcb -> moal_spin_lock , pcb -> moal_spin_unlock ) ) ) { switch ( pioctl_buf -> req_id ) { #if defined ( STA_SUPPORT ) && defined ( UAP_SUPPORT ) case MLAN_IOCTL_BSS : bss = ( mlan_ds_bss * ) pioctl_buf -> pbuf ; if ( bss -> sub_command == MLAN_OID_BSS_ROLE ) { PRINTM ( MCMND , " \n " , bss -> param . bss_role ) ; status = wlan_bss_ioctl_bss_role ( pmadapter , pioctl_buf ) ; } break ; #endif #ifdef STA_SUPPORT case MLAN_IOCTL_MISC_CFG : misc = ( mlan_ds_misc_cfg * ) pioctl_buf -> pbuf ; if ( misc -> sub_command == MLAN_OID_MISC_WARM_RESET ) { PRINTM ( MCMND , " \n " ) ; status = wlan_misc_ioctl_warm_reset ( pmadapter , pioctl_buf ) ; } break ; #endif default : break ; } if ( status != MLAN_STATUS_PENDING ) pcb -> moal_ioctl_complete ( pmadapter -> pmoal_handle , pioctl_buf , status ) ; } LEAVE ( ) ; }
@brief This function process pending ioctl
  @param pmadapter  A pointer to mlan_adapter structure
@brief This function process pending ioctl @param pmadapter A pointer to mlan_adapter structure