diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-08-21 13:08:44 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-09-08 02:18:36 -0400 |
commit | 582de30afa13dbc20c8b654ac8f93d32dbef99ce (patch) | |
tree | 04d8882a3f95ca2b14f3be98705c118e62aa1ed7 /drivers/net/wireless/iwlwifi/mvm/coex.c | |
parent | 717e2390dc72e87380d6ccf62134b0ab84ee43d2 (diff) |
iwlwifi: mvm: BT Coex - always initialize smps_mode
smps_mode is used uninitialized in a debug statement in AP
mode, so always initialize it.
While at it, fix a typo.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/coex.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/coex.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c index 75178f35f042..ce71625f497f 100644 --- a/drivers/net/wireless/iwlwifi/mvm/coex.c +++ b/drivers/net/wireless/iwlwifi/mvm/coex.c | |||
@@ -754,7 +754,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, | |||
754 | struct iwl_bt_iterator_data *data = _data; | 754 | struct iwl_bt_iterator_data *data = _data; |
755 | struct iwl_mvm *mvm = data->mvm; | 755 | struct iwl_mvm *mvm = data->mvm; |
756 | struct ieee80211_chanctx_conf *chanctx_conf; | 756 | struct ieee80211_chanctx_conf *chanctx_conf; |
757 | enum ieee80211_smps_mode smps_mode; | 757 | /* default smps_mode is AUTOMATIC - only used for client modes */ |
758 | enum ieee80211_smps_mode smps_mode = IEEE80211_SMPS_AUTOMATIC; | ||
758 | u32 bt_activity_grading; | 759 | u32 bt_activity_grading; |
759 | int ave_rssi; | 760 | int ave_rssi; |
760 | 761 | ||
@@ -762,8 +763,6 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, | |||
762 | 763 | ||
763 | switch (vif->type) { | 764 | switch (vif->type) { |
764 | case NL80211_IFTYPE_STATION: | 765 | case NL80211_IFTYPE_STATION: |
765 | /* default smps_mode for BSS / P2P client is AUTOMATIC */ | ||
766 | smps_mode = IEEE80211_SMPS_AUTOMATIC; | ||
767 | break; | 766 | break; |
768 | case NL80211_IFTYPE_AP: | 767 | case NL80211_IFTYPE_AP: |
769 | if (!mvmvif->ap_ibss_active) | 768 | if (!mvmvif->ap_ibss_active) |
@@ -795,7 +794,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, | |||
795 | else if (bt_activity_grading >= BT_LOW_TRAFFIC) | 794 | else if (bt_activity_grading >= BT_LOW_TRAFFIC) |
796 | smps_mode = IEEE80211_SMPS_DYNAMIC; | 795 | smps_mode = IEEE80211_SMPS_DYNAMIC; |
797 | 796 | ||
798 | /* relax SMPS contraints for next association */ | 797 | /* relax SMPS constraints for next association */ |
799 | if (!vif->bss_conf.assoc) | 798 | if (!vif->bss_conf.assoc) |
800 | smps_mode = IEEE80211_SMPS_AUTOMATIC; | 799 | smps_mode = IEEE80211_SMPS_AUTOMATIC; |
801 | 800 | ||