diff options
author | Avinash Patil <patila@marvell.com> | 2014-10-31 16:08:26 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-31 16:07:49 -0400 |
commit | bf35443314acb43fa8a3f9f8046e14cbe178762b (patch) | |
tree | 1312ca6d9de7ab6ff736befee045d8bdc774a022 /drivers/net/wireless/mwifiex/cfg80211.c | |
parent | 15a892e728299c5879187c8301c10c14af399a0c (diff) |
mwifiex: channel statistics support for mwifiex
This patch adds support to record channel statistics during
scan. With extended scan, scan results are returned as events from
FW while channel statistics are part of scan command response.
We store these channel statistics in adapter.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Xinmin Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 0dd672954ad1..80b1a54e7792 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -2840,6 +2840,25 @@ static const struct wiphy_coalesce_support mwifiex_coalesce_support = { .max_pkt_offset = MWIFIEX_MAX_OFFSET_LEN, }; +int mwifiex_init_channel_scan_gap(struct mwifiex_adapter *adapter) +{ + u32 n_channels_bg, n_channels_a = 0; + + n_channels_bg = mwifiex_band_2ghz.n_channels; + + if (adapter->config_bands & BAND_A) + n_channels_a = mwifiex_band_5ghz.n_channels; + + adapter->num_in_chan_stats = max_t(u32, n_channels_bg, n_channels_a); + adapter->chan_stats = vmalloc(sizeof(*adapter->chan_stats) * + adapter->num_in_chan_stats); + + if (!adapter->chan_stats) + return -ENOMEM; + + return 0; +} + /* * This function registers the device with CFG802.11 subsystem. * |