aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2013-01-25 05:50:50 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-01-30 15:06:53 -0500
commitdcee7438caa409948347c0a3821e3ab6e7459984 (patch)
tree9a617cea1bf754cd8846b384a50abe250cf167b9 /drivers
parent41bf911910fc41996878afc679c352d89477d626 (diff)
mwl8k: Do not call STA specific cmds not supported by the AP fw
While using STA mode in the AP firmware, avoid calling some firmware commands which are not supported by the AP firmware. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mwl8k.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index a9d5c09974de..2031130d860b 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -4881,7 +4881,8 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
4881 rcu_read_unlock(); 4881 rcu_read_unlock();
4882 } 4882 }
4883 4883
4884 if ((changed & BSS_CHANGED_ASSOC) && vif->bss_conf.assoc) { 4884 if ((changed & BSS_CHANGED_ASSOC) && vif->bss_conf.assoc &&
4885 !priv->ap_fw) {
4885 rc = mwl8k_cmd_set_rate(hw, vif, ap_legacy_rates, ap_mcs_rates); 4886 rc = mwl8k_cmd_set_rate(hw, vif, ap_legacy_rates, ap_mcs_rates);
4886 if (rc) 4887 if (rc)
4887 goto out; 4888 goto out;
@@ -4889,6 +4890,25 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
4889 rc = mwl8k_cmd_use_fixed_rate_sta(hw); 4890 rc = mwl8k_cmd_use_fixed_rate_sta(hw);
4890 if (rc) 4891 if (rc)
4891 goto out; 4892 goto out;
4893 } else {
4894 if ((changed & BSS_CHANGED_ASSOC) && vif->bss_conf.assoc &&
4895 priv->ap_fw) {
4896 int idx;
4897 int rate;
4898
4899 /* Use AP firmware specific rate command.
4900 */
4901 idx = ffs(vif->bss_conf.basic_rates);
4902 if (idx)
4903 idx--;
4904
4905 if (hw->conf.channel->band == IEEE80211_BAND_2GHZ)
4906 rate = mwl8k_rates_24[idx].hw_value;
4907 else
4908 rate = mwl8k_rates_50[idx].hw_value;
4909
4910 mwl8k_cmd_use_fixed_rate_ap(hw, rate, rate);
4911 }
4892 } 4912 }
4893 4913
4894 if (changed & BSS_CHANGED_ERP_PREAMBLE) { 4914 if (changed & BSS_CHANGED_ERP_PREAMBLE) {
@@ -4898,13 +4918,13 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
4898 goto out; 4918 goto out;
4899 } 4919 }
4900 4920
4901 if (changed & BSS_CHANGED_ERP_SLOT) { 4921 if ((changed & BSS_CHANGED_ERP_SLOT) && !priv->ap_fw) {
4902 rc = mwl8k_cmd_set_slot(hw, vif->bss_conf.use_short_slot); 4922 rc = mwl8k_cmd_set_slot(hw, vif->bss_conf.use_short_slot);
4903 if (rc) 4923 if (rc)
4904 goto out; 4924 goto out;
4905 } 4925 }
4906 4926
4907 if (vif->bss_conf.assoc && 4927 if (vif->bss_conf.assoc && !priv->ap_fw &&
4908 (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_ERP_CTS_PROT | 4928 (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_ERP_CTS_PROT |
4909 BSS_CHANGED_HT))) { 4929 BSS_CHANGED_HT))) {
4910 rc = mwl8k_cmd_set_aid(hw, vif, ap_legacy_rates); 4930 rc = mwl8k_cmd_set_aid(hw, vif, ap_legacy_rates);