diff options
author | Alexander Bondar <alexander.bondar@intel.com> | 2013-10-15 18:21:34 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-10-29 09:45:23 -0400 |
commit | e8e626ad0ca88cc3278279a43f1cef55badf3e46 (patch) | |
tree | bc5a05982531983054dff469abc7d49906e9b5e7 | |
parent | 246dd9922e859768aa522daa6c1c601785e57e0c (diff) |
iwlwifi: mvm: update UAPSD support TLV bits
Change old UAPSD bit to PM_CMD_SUPPORT, and add a new bit to indicate
real UAPSD support.
Don't use UAPSD when the firmware doesn't support it.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-fw.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h index 87b66a821ec8..75db087120c3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fw.h +++ b/drivers/net/wireless/iwlwifi/iwl-fw.h | |||
@@ -100,7 +100,7 @@ enum iwl_ucode_tlv_flag { | |||
100 | IWL_UCODE_TLV_FLAGS_P2P = BIT(3), | 100 | IWL_UCODE_TLV_FLAGS_P2P = BIT(3), |
101 | IWL_UCODE_TLV_FLAGS_DW_BC_TABLE = BIT(4), | 101 | IWL_UCODE_TLV_FLAGS_DW_BC_TABLE = BIT(4), |
102 | IWL_UCODE_TLV_FLAGS_NEWBT_COEX = BIT(5), | 102 | IWL_UCODE_TLV_FLAGS_NEWBT_COEX = BIT(5), |
103 | IWL_UCODE_TLV_FLAGS_UAPSD = BIT(6), | 103 | IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT = BIT(6), |
104 | IWL_UCODE_TLV_FLAGS_SHORT_BL = BIT(7), | 104 | IWL_UCODE_TLV_FLAGS_SHORT_BL = BIT(7), |
105 | IWL_UCODE_TLV_FLAGS_RX_ENERGY_API = BIT(8), | 105 | IWL_UCODE_TLV_FLAGS_RX_ENERGY_API = BIT(8), |
106 | IWL_UCODE_TLV_FLAGS_TIME_EVENT_API_V2 = BIT(9), | 106 | IWL_UCODE_TLV_FLAGS_TIME_EVENT_API_V2 = BIT(9), |
@@ -113,6 +113,7 @@ enum iwl_ucode_tlv_flag { | |||
113 | IWL_UCODE_TLV_FLAGS_SCHED_SCAN = BIT(17), | 113 | IWL_UCODE_TLV_FLAGS_SCHED_SCAN = BIT(17), |
114 | IWL_UCODE_TLV_FLAGS_STA_KEY_CMD = BIT(19), | 114 | IWL_UCODE_TLV_FLAGS_STA_KEY_CMD = BIT(19), |
115 | IWL_UCODE_TLV_FLAGS_DEVICE_PS_CMD = BIT(20), | 115 | IWL_UCODE_TLV_FLAGS_DEVICE_PS_CMD = BIT(20), |
116 | IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24), | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | /* The default calibrate table size if not specified by firmware file */ | 119 | /* The default calibrate table size if not specified by firmware file */ |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index f40685c3764e..74bc2c8af06d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -164,8 +164,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
164 | IEEE80211_HW_TIMING_BEACON_ONLY | | 164 | IEEE80211_HW_TIMING_BEACON_ONLY | |
165 | IEEE80211_HW_CONNECTION_MONITOR | | 165 | IEEE80211_HW_CONNECTION_MONITOR | |
166 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | | 166 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | |
167 | IEEE80211_HW_SUPPORTS_STATIC_SMPS | | 167 | IEEE80211_HW_SUPPORTS_STATIC_SMPS; |
168 | IEEE80211_HW_SUPPORTS_UAPSD; | ||
169 | 168 | ||
170 | hw->queues = mvm->first_agg_queue; | 169 | hw->queues = mvm->first_agg_queue; |
171 | hw->offchannel_tx_hw_queue = IWL_MVM_OFFCHANNEL_QUEUE; | 170 | hw->offchannel_tx_hw_queue = IWL_MVM_OFFCHANNEL_QUEUE; |
@@ -180,6 +179,12 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
180 | !iwlwifi_mod_params.sw_crypto) | 179 | !iwlwifi_mod_params.sw_crypto) |
181 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; | 180 | hw->flags |= IEEE80211_HW_MFP_CAPABLE; |
182 | 181 | ||
182 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT) { | ||
183 | hw->flags |= IEEE80211_HW_SUPPORTS_UAPSD; | ||
184 | hw->uapsd_queues = IWL_UAPSD_AC_INFO; | ||
185 | hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; | ||
186 | } | ||
187 | |||
183 | hw->sta_data_size = sizeof(struct iwl_mvm_sta); | 188 | hw->sta_data_size = sizeof(struct iwl_mvm_sta); |
184 | hw->vif_data_size = sizeof(struct iwl_mvm_vif); | 189 | hw->vif_data_size = sizeof(struct iwl_mvm_vif); |
185 | hw->chanctx_data_size = sizeof(u16); | 190 | hw->chanctx_data_size = sizeof(u16); |
@@ -204,8 +209,6 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
204 | 209 | ||
205 | hw->wiphy->max_remain_on_channel_duration = 10000; | 210 | hw->wiphy->max_remain_on_channel_duration = 10000; |
206 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; | 211 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; |
207 | hw->uapsd_queues = IWL_UAPSD_AC_INFO; | ||
208 | hw->uapsd_max_sp_len = IWL_UAPSD_MAX_SP; | ||
209 | 212 | ||
210 | /* Extract MAC address */ | 213 | /* Extract MAC address */ |
211 | memcpy(mvm->addresses[0].addr, mvm->nvm_data->hw_addr, ETH_ALEN); | 214 | memcpy(mvm->addresses[0].addr, mvm->nvm_data->hw_addr, ETH_ALEN); |
@@ -861,7 +864,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm, | |||
861 | /* reset rssi values */ | 864 | /* reset rssi values */ |
862 | mvmvif->bf_data.ave_beacon_signal = 0; | 865 | mvmvif->bf_data.ave_beacon_signal = 0; |
863 | 866 | ||
864 | if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD)) { | 867 | if (!(mvm->fw->ucode_capa.flags & |
868 | IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT)) { | ||
865 | /* Workaround for FW bug, otherwise FW disables device | 869 | /* Workaround for FW bug, otherwise FW disables device |
866 | * power save upon disassociation | 870 | * power save upon disassociation |
867 | */ | 871 | */ |
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index 59b7cb3c6134..d86083c6f445 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -459,7 +459,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
459 | if (err) | 459 | if (err) |
460 | goto out_unregister; | 460 | goto out_unregister; |
461 | 461 | ||
462 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD) | 462 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT) |
463 | mvm->pm_ops = &pm_mac_ops; | 463 | mvm->pm_ops = &pm_mac_ops; |
464 | else | 464 | else |
465 | mvm->pm_ops = &pm_legacy_ops; | 465 | mvm->pm_ops = &pm_legacy_ops; |