diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-05-13 10:33:38 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-05-21 05:52:44 -0400 |
commit | bca49d9a220b2f277f8e6000ac3a9d129d88972c (patch) | |
tree | da1e6641002697b6caf2fcd7ceaa5af490a38510 /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | |
parent | fa7b2e7fd09f17c47ac312ade3aae48247a528f6 (diff) |
iwlwifi: mvm: pass force_assoc_off all the way down to avoid hacks
In some cases, we need to force the association to be off in the
MAC_CONTEXT_CMD command we send to the firmware. Instead of having to
hack the vif->bss_conf.assoc value, pass it all the way down the call
chain.
Additionally, for the iwl_mvm_mac_ctxt_add() case, we *always* set
forced_assoc_off to true, so we can remove the hack in the d3 code
that was forcing it to off by hacking the bss_conf.assoc value.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index fed012f2b6c0..8b5302777632 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | |||
@@ -1109,12 +1109,12 @@ static int iwl_mvm_mac_ctxt_cmd_go(struct iwl_mvm *mvm, | |||
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | static int iwl_mvm_mac_ctx_send(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | 1111 | static int iwl_mvm_mac_ctx_send(struct iwl_mvm *mvm, struct ieee80211_vif *vif, |
1112 | u32 action) | 1112 | u32 action, bool force_assoc_off) |
1113 | { | 1113 | { |
1114 | switch (vif->type) { | 1114 | switch (vif->type) { |
1115 | case NL80211_IFTYPE_STATION: | 1115 | case NL80211_IFTYPE_STATION: |
1116 | return iwl_mvm_mac_ctxt_cmd_sta(mvm, vif, action, | 1116 | return iwl_mvm_mac_ctxt_cmd_sta(mvm, vif, action, |
1117 | action == FW_CTXT_ACTION_ADD); | 1117 | force_assoc_off); |
1118 | break; | 1118 | break; |
1119 | case NL80211_IFTYPE_AP: | 1119 | case NL80211_IFTYPE_AP: |
1120 | if (!vif->p2p) | 1120 | if (!vif->p2p) |
@@ -1144,7 +1144,8 @@ int iwl_mvm_mac_ctxt_add(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1144 | vif->addr, ieee80211_vif_type_p2p(vif))) | 1144 | vif->addr, ieee80211_vif_type_p2p(vif))) |
1145 | return -EIO; | 1145 | return -EIO; |
1146 | 1146 | ||
1147 | ret = iwl_mvm_mac_ctx_send(mvm, vif, FW_CTXT_ACTION_ADD); | 1147 | ret = iwl_mvm_mac_ctx_send(mvm, vif, FW_CTXT_ACTION_ADD, |
1148 | true); | ||
1148 | if (ret) | 1149 | if (ret) |
1149 | return ret; | 1150 | return ret; |
1150 | 1151 | ||
@@ -1155,7 +1156,8 @@ int iwl_mvm_mac_ctxt_add(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1155 | return 0; | 1156 | return 0; |
1156 | } | 1157 | } |
1157 | 1158 | ||
1158 | int iwl_mvm_mac_ctxt_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | 1159 | int iwl_mvm_mac_ctxt_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, |
1160 | bool force_assoc_off) | ||
1159 | { | 1161 | { |
1160 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 1162 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1161 | 1163 | ||
@@ -1163,7 +1165,8 @@ int iwl_mvm_mac_ctxt_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1163 | vif->addr, ieee80211_vif_type_p2p(vif))) | 1165 | vif->addr, ieee80211_vif_type_p2p(vif))) |
1164 | return -EIO; | 1166 | return -EIO; |
1165 | 1167 | ||
1166 | return iwl_mvm_mac_ctx_send(mvm, vif, FW_CTXT_ACTION_MODIFY); | 1168 | return iwl_mvm_mac_ctx_send(mvm, vif, FW_CTXT_ACTION_MODIFY, |
1169 | force_assoc_off); | ||
1167 | } | 1170 | } |
1168 | 1171 | ||
1169 | int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | 1172 | int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |