software/drivers/sd8887/src/wlan/mlinux/moal_cfg80211.c
/**
 * @brief register/unregister mgmt frame forwarding
 *
 * @param priv             A pointer to moal_private structure
 * @param frame_type      Bit mask for mgmt frame type
 * @param reg             Register or unregister
 *
 * @return                0 -- success, otherwise fail
 */
@brief register/unregister mgmt frame forwarding
@param priv             A pointer to moal_private structure
@param frame_type      Bit mask for mgmt frame type
@param reg             Register or unregister

@return                0 -- success, otherwise fail
@brief register / unregister mgmt frame forwarding @param priv A pointer to moal_private structure @param frame_type Bit mask for mgmt frame type @param reg Register or unregister @return 0 -- success otherwise fail
void
woal_mgmt_frame_register(moal_private *priv, u16 frame_type, bool reg)
{
	mlan_status status = MLAN_STATUS_SUCCESS;
	t_u32 mgmt_subtype_mask = 0x0;
	t_u32 last_mgmt_subtype_mask = priv->mgmt_subtype_mask;
	ENTER();
#ifdef SDIO_SUSPEND_RESUME
	if (priv->phandle->shutdown_hs_in_process) {
		LEAVE();
		return;
	}
#endif
	if (reg == MTRUE) {
		mgmt_subtype_mask =
			last_mgmt_subtype_mask | BIT(frame_type >> 4);
	} else {
		mgmt_subtype_mask =
			last_mgmt_subtype_mask & ~BIT(frame_type >> 4);
	}
	PRINTM(MIOCTL,
	       "%s: frame_type=0x%x mgmt_subtype_mask=0x%x last_mgmt_subtype_mask=0x%x\n",
	       priv->netdev->name, frame_type, mgmt_subtype_mask,
	       last_mgmt_subtype_mask);
	if (mgmt_subtype_mask != last_mgmt_subtype_mask) {
		last_mgmt_subtype_mask = mgmt_subtype_mask;
		status = woal_reg_rx_mgmt_ind(priv, MLAN_ACT_SET,
					      &mgmt_subtype_mask, MOAL_NO_WAIT);
		priv->mgmt_subtype_mask = last_mgmt_subtype_mask;
	}
	LEAVE();
}
void woal_mgmt_frame_register ( moal_private * priv , u16 frame_type , bool reg ) { mlan_status status = MLAN_STATUS_SUCCESS ; t_u32 mgmt_subtype_mask = 0x0 ; t_u32 last_mgmt_subtype_mask = priv -> mgmt_subtype_mask ; ENTER ( ) ; #ifdef SDIO_SUSPEND_RESUME if ( priv -> phandle -> shutdown_hs_in_process ) { LEAVE ( ) ; return ; } #endif if ( reg == MTRUE ) { mgmt_subtype_mask = last_mgmt_subtype_mask | BIT ( frame_type >> 4 ) ; } else { mgmt_subtype_mask = last_mgmt_subtype_mask & ~ BIT ( frame_type >> 4 ) ; } PRINTM ( MIOCTL , " \n " , priv -> netdev -> name , frame_type , mgmt_subtype_mask , last_mgmt_subtype_mask ) ; if ( mgmt_subtype_mask != last_mgmt_subtype_mask ) { last_mgmt_subtype_mask = mgmt_subtype_mask ; status = woal_reg_rx_mgmt_ind ( priv , MLAN_ACT_SET , & mgmt_subtype_mask , MOAL_NO_WAIT ) ; priv -> mgmt_subtype_mask = last_mgmt_subtype_mask ; } LEAVE ( ) ; }
@brief register/unregister mgmt frame forwarding
 @param priv             A pointer to moal_private structure
 @param frame_type      Bit mask for mgmt frame type
 @param reg             Register or unregister
@brief register / unregister mgmt frame forwarding @param priv A pointer to moal_private structure @param frame_type Bit mask for mgmt frame type @param reg Register or unregister
/* set mgmt_subtype_mask based on origin value */ /* clear mgmt_subtype_mask */ /* Notify driver that a mgmt frame type was registered.
		 * Note that this callback may not sleep, and cannot run
		 * concurrently with itself. */