diff options
author | Ilan Peer <ilan.peer@intel.com> | 2013-12-31 14:19:55 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-01-13 11:34:30 -0500 |
commit | a11e144e41f7979608c8bfd35b297b8162fcf32d (patch) | |
tree | 8d8e8cf0b69863213bdd0e4fe02fa3d9153efe14 /drivers/net/wireless/iwlwifi/mvm/mac80211.c | |
parent | 5691e218a446753a2d21da231651b04e58c76b75 (diff) |
iwlwifi: mvm: update power after binding in start_ap_ibss()
The power settings need to be updated after a binding flow is done
and before quota calculations. This was missing in the start_ap_ibss()
flow. Fix it.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 2ac3b25a6d2c..208771a7c74c 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -1015,9 +1015,13 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, | |||
1015 | /* must be set before quota calculations */ | 1015 | /* must be set before quota calculations */ |
1016 | mvmvif->ap_ibss_active = true; | 1016 | mvmvif->ap_ibss_active = true; |
1017 | 1017 | ||
1018 | /* power updated needs to be done before quotas */ | ||
1019 | mvm->bound_vif_cnt++; | ||
1020 | iwl_mvm_power_update_binding(mvm, vif, true); | ||
1021 | |||
1018 | ret = iwl_mvm_update_quotas(mvm, vif); | 1022 | ret = iwl_mvm_update_quotas(mvm, vif); |
1019 | if (ret) | 1023 | if (ret) |
1020 | goto out_rm_bcast; | 1024 | goto out_quota_failed; |
1021 | 1025 | ||
1022 | /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ | 1026 | /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ |
1023 | if (vif->p2p && mvm->p2p_device_vif) | 1027 | if (vif->p2p && mvm->p2p_device_vif) |
@@ -1028,7 +1032,9 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, | |||
1028 | mutex_unlock(&mvm->mutex); | 1032 | mutex_unlock(&mvm->mutex); |
1029 | return 0; | 1033 | return 0; |
1030 | 1034 | ||
1031 | out_rm_bcast: | 1035 | out_quota_failed: |
1036 | mvm->bound_vif_cnt--; | ||
1037 | iwl_mvm_power_update_binding(mvm, vif, false); | ||
1032 | mvmvif->ap_ibss_active = false; | 1038 | mvmvif->ap_ibss_active = false; |
1033 | iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta); | 1039 | iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta); |
1034 | out_unbind: | 1040 | out_unbind: |
@@ -1061,6 +1067,10 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw, | |||
1061 | iwl_mvm_update_quotas(mvm, NULL); | 1067 | iwl_mvm_update_quotas(mvm, NULL); |
1062 | iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta); | 1068 | iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta); |
1063 | iwl_mvm_binding_remove_vif(mvm, vif); | 1069 | iwl_mvm_binding_remove_vif(mvm, vif); |
1070 | |||
1071 | mvm->bound_vif_cnt--; | ||
1072 | iwl_mvm_power_update_binding(mvm, vif, false); | ||
1073 | |||
1064 | iwl_mvm_mac_ctxt_remove(mvm, vif); | 1074 | iwl_mvm_mac_ctxt_remove(mvm, vif); |
1065 | 1075 | ||
1066 | mutex_unlock(&mvm->mutex); | 1076 | mutex_unlock(&mvm->mutex); |
@@ -1772,11 +1782,11 @@ static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw *hw, | |||
1772 | } | 1782 | } |
1773 | 1783 | ||
1774 | iwl_mvm_binding_remove_vif(mvm, vif); | 1784 | iwl_mvm_binding_remove_vif(mvm, vif); |
1775 | out_unlock: | ||
1776 | mvmvif->phy_ctxt = NULL; | ||
1777 | mvm->bound_vif_cnt--; | 1785 | mvm->bound_vif_cnt--; |
1778 | iwl_mvm_power_update_binding(mvm, vif, false); | 1786 | iwl_mvm_power_update_binding(mvm, vif, false); |
1779 | 1787 | ||
1788 | out_unlock: | ||
1789 | mvmvif->phy_ctxt = NULL; | ||
1780 | mutex_unlock(&mvm->mutex); | 1790 | mutex_unlock(&mvm->mutex); |
1781 | } | 1791 | } |
1782 | 1792 | ||