func: static brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if struct cfg80211_scan_request *request) s32 params_size = BRCMF_SCAN_PARAMS_FIXED_SIZE offsetof ( struct brcmf_escan_params_le , params_le ) struct brcmf_escan_params_le * params ; if ( request != NULL )  params_size += sizeof ( u32 ) * ( ( request -> n_channels + 1 ) / 2 ); params_size += sizeof ( struct brcmf_ssid_le ) * request -> n_ssids; params = kzalloc ( params_size , GFP_KERNEL ); if ( ! params )  brcmf_escan_prep ( cfg , & params -> params_le , request ); static void brcmf_escan_prep(struct brcmf_cfg80211_info struct brcmf_scan_params_le struct cfg80211_scan_request *request) u32 n_ssids ; u32 n_channels ; s32 i ; u16 chanspec ; params_le -> bss_type = DOT11_BSSTYPE_ANY; params_le -> scan_type = 0; params_le -> channel_num = 0; params_le -> nprobes = cpu_to_le32 ( - 1 ); params_le -> active_time = cpu_to_le32 ( - 1 ); params_le -> passive_time = cpu_to_le32 ( - 1 ); params_le -> home_time = cpu_to_le32 ( - 1 ); memset ( & params_le -> ssid_le , 0 , sizeof ( params_le -> ssid_le ) ); if ( ! request )  n_ssids = request -> n_ssids; n_channels = request -> n_channels; if ( n_channels > 0 )  for (i = 0; i < n_channels; i++) chanspec = channel_to_chanspec ( & cfg -> d11inf , request -> channels [ i ] ); u16 channel_to_chanspec(struct brcmu_d11inf struct ieee80211_channel *ch) struct brcmu_chan ch_inf ; ch_inf . chnum = ieee80211_frequency_to_channel ( ch -> center_freq ); ch_inf . bw = BRCMU_CHAN_BW_20; return ch_inf . chspec ; params_le -> channel_list [ i ] = cpu_to_le16 ( chanspec ); if ( n_ssids > 0 )  if ( ( request -> ssids ) && request -> ssids -> ssid_len )  params_le -> ssid_le . SSID_len = cpu_to_le32 ( request -> ssids -> ssid_len ); memcpy ( & params_le -> ssid_le . SSID , request -> ssids -> ssid , request -> ssids -> ssid_len ); 