diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-02-02 20:48:58 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:55:54 -0500 |
commit | caf60a6c957e7a35837a41f845e57b4433e20276 (patch) | |
tree | dc2170bbc80a9269b6183aef94f98af769e8bd06 /drivers/net/wireless/mwifiex/cfg80211.c | |
parent | f3c8d2591fa7278abe58ee0278a41d5b130d1718 (diff) | |
download | lwn-caf60a6c957e7a35837a41f845e57b4433e20276.tar.gz lwn-caf60a6c957e7a35837a41f845e57b4433e20276.zip |
mwifiex: update correct dtim_period in dump_station()
Earlier we were using dtim period extracted from scan response
buffer provided by FW in scan operation. But it is observed that
sometimes the buffer doesn't contain dtim period tlv, and wrong
value (0) was sent to user space.
After association FW will start listening to beacon frames of
connected AP and store dtim period. Therefore we can get it from
FW in dump_station() instead of using wrong value obtained in
scanning.
Redundant code after adapting new approach for dtim period is
also removed in this patch.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 54e45c829c53..478d2f12c024 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -539,6 +539,11 @@ mwifiex_dump_station_info(struct mwifiex_private *priv, ret = -EFAULT; } + /* Get DTIM period information from firmware */ + mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_SNMP_MIB, + HostCmd_ACT_GEN_GET, DTIM_PERIOD_I, + &priv->dtim_period); + /* * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid * MCS index values for us are 0 to 7. @@ -573,8 +578,7 @@ mwifiex_dump_station_info(struct mwifiex_private *priv, WLAN_CAPABILITY_SHORT_SLOT_TIME) sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; - sinfo->bss_param.dtim_period = - priv->curr_bss_params.bss_descriptor.dtim_period; + sinfo->bss_param.dtim_period = priv->dtim_period; sinfo->bss_param.beacon_interval = priv->curr_bss_params.bss_descriptor.beacon_period; } |