diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2016-09-27 11:32:24 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-09-27 11:32:24 -0400 |
commit | 0ad523c8a1c3325547d454fc4c8abf58eb5b327e (patch) | |
tree | b1bb3113285b5ed270a21e2ca3d24bcae8834f59 /drivers/net | |
parent | 2df86ad959c9d1cdbeb2f23a0801857731156692 (diff) | |
parent | 9cd70e80f7f0df1d6d13d8aeb50a16bf40e2962c (diff) |
Merge tag 'iwlwifi-next-for-kalle-2015-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
* Some new HW IDs;
* Small fix in CTDP error handling;
* Remove support for older firmwares;
* Clean-ups and a few simple fixes here and there.
Diffstat (limited to 'drivers/net')
21 files changed, 110 insertions, 204 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c index aa575fb9dea0..d4b73dedf89b 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c | |||
@@ -77,9 +77,9 @@ | |||
77 | #define IWL3168_UCODE_API_MAX 26 | 77 | #define IWL3168_UCODE_API_MAX 26 |
78 | 78 | ||
79 | /* Lowest firmware API version supported */ | 79 | /* Lowest firmware API version supported */ |
80 | #define IWL7260_UCODE_API_MIN 16 | 80 | #define IWL7260_UCODE_API_MIN 17 |
81 | #define IWL7265_UCODE_API_MIN 16 | 81 | #define IWL7265_UCODE_API_MIN 17 |
82 | #define IWL7265D_UCODE_API_MIN 16 | 82 | #define IWL7265D_UCODE_API_MIN 17 |
83 | #define IWL3168_UCODE_API_MIN 20 | 83 | #define IWL3168_UCODE_API_MIN 20 |
84 | 84 | ||
85 | /* NVM versions */ | 85 | /* NVM versions */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c index 990cf2b17517..d02ca1491d16 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c | |||
@@ -74,7 +74,7 @@ | |||
74 | #define IWL8265_UCODE_API_MAX 26 | 74 | #define IWL8265_UCODE_API_MAX 26 |
75 | 75 | ||
76 | /* Lowest firmware API version supported */ | 76 | /* Lowest firmware API version supported */ |
77 | #define IWL8000_UCODE_API_MIN 16 | 77 | #define IWL8000_UCODE_API_MIN 17 |
78 | #define IWL8265_UCODE_API_MIN 20 | 78 | #define IWL8265_UCODE_API_MIN 20 |
79 | 79 | ||
80 | /* NVM versions */ | 80 | /* NVM versions */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c index a2c7946c12c9..ff850410d897 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c | |||
@@ -58,7 +58,7 @@ | |||
58 | #define IWL9000_UCODE_API_MAX 26 | 58 | #define IWL9000_UCODE_API_MAX 26 |
59 | 59 | ||
60 | /* Lowest firmware API version supported */ | 60 | /* Lowest firmware API version supported */ |
61 | #define IWL9000_UCODE_API_MIN 16 | 61 | #define IWL9000_UCODE_API_MIN 17 |
62 | 62 | ||
63 | /* NVM versions */ | 63 | /* NVM versions */ |
64 | #define IWL9000_NVM_VERSION 0x0a1d | 64 | #define IWL9000_NVM_VERSION 0x0a1d |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 6cecb1adf0c8..2660cc4b9f8c 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
@@ -359,7 +359,6 @@ struct iwl_cfg { | |||
359 | high_temp:1, | 359 | high_temp:1, |
360 | mac_addr_from_csr:1, | 360 | mac_addr_from_csr:1, |
361 | lp_xtal_workaround:1, | 361 | lp_xtal_workaround:1, |
362 | no_power_up_nic_in_init:1, | ||
363 | disable_dummy_notification:1, | 362 | disable_dummy_notification:1, |
364 | apmg_not_supported:1, | 363 | apmg_not_supported:1, |
365 | mq_rx_supported:1, | 364 | mq_rx_supported:1, |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h b/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h index 94423f04320b..ceec5ca2b1ab 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h | |||
@@ -199,8 +199,6 @@ struct iwl_ucode_capa { | |||
199 | * @IWL_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behavior on hidden SSID, | 199 | * @IWL_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behavior on hidden SSID, |
200 | * treats good CRC threshold as a boolean | 200 | * treats good CRC threshold as a boolean |
201 | * @IWL_UCODE_TLV_FLAGS_MFP: This uCode image supports MFP (802.11w). | 201 | * @IWL_UCODE_TLV_FLAGS_MFP: This uCode image supports MFP (802.11w). |
202 | * @IWL_UCODE_TLV_FLAGS_P2P: This uCode image supports P2P. | ||
203 | * @IWL_UCODE_TLV_FLAGS_DW_BC_TABLE: The SCD byte count table is in DWORDS | ||
204 | * @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: This uCode image supports uAPSD | 202 | * @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: This uCode image supports uAPSD |
205 | * @IWL_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan | 203 | * @IWL_UCODE_TLV_FLAGS_SHORT_BL: 16 entries of black list instead of 64 in scan |
206 | * offload profile config command. | 204 | * offload profile config command. |
@@ -210,36 +208,24 @@ struct iwl_ucode_capa { | |||
210 | * from the probe request template. | 208 | * from the probe request template. |
211 | * @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL: new NS offload (small version) | 209 | * @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL: new NS offload (small version) |
212 | * @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE: new NS offload (large version) | 210 | * @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE: new NS offload (large version) |
213 | * @IWL_UCODE_TLV_FLAGS_P2P_PM: P2P client supports PM as a stand alone MAC | ||
214 | * @IWL_UCODE_TLV_FLAGS_P2P_BSS_PS_DCM: support power save on BSS station and | ||
215 | * P2P client interfaces simultaneously if they are in different bindings. | ||
216 | * @IWL_UCODE_TLV_FLAGS_P2P_BSS_PS_SCM: support power save on BSS station and | ||
217 | * P2P client interfaces simultaneously if they are in same bindings. | ||
218 | * @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: General support for uAPSD | 211 | * @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: General support for uAPSD |
219 | * @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save | 212 | * @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save |
220 | * @IWL_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering. | 213 | * @IWL_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering. |
221 | * @IWL_UCODE_TLV_FLAGS_GO_UAPSD: AP/GO interfaces support uAPSD clients | ||
222 | * @IWL_UCODE_TLV_FLAGS_EBS_SUPPORT: this uCode image supports EBS. | 214 | * @IWL_UCODE_TLV_FLAGS_EBS_SUPPORT: this uCode image supports EBS. |
223 | */ | 215 | */ |
224 | enum iwl_ucode_tlv_flag { | 216 | enum iwl_ucode_tlv_flag { |
225 | IWL_UCODE_TLV_FLAGS_PAN = BIT(0), | 217 | IWL_UCODE_TLV_FLAGS_PAN = BIT(0), |
226 | IWL_UCODE_TLV_FLAGS_NEWSCAN = BIT(1), | 218 | IWL_UCODE_TLV_FLAGS_NEWSCAN = BIT(1), |
227 | IWL_UCODE_TLV_FLAGS_MFP = BIT(2), | 219 | IWL_UCODE_TLV_FLAGS_MFP = BIT(2), |
228 | IWL_UCODE_TLV_FLAGS_P2P = BIT(3), | ||
229 | IWL_UCODE_TLV_FLAGS_DW_BC_TABLE = BIT(4), | ||
230 | IWL_UCODE_TLV_FLAGS_SHORT_BL = BIT(7), | 220 | IWL_UCODE_TLV_FLAGS_SHORT_BL = BIT(7), |
231 | IWL_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS = BIT(10), | 221 | IWL_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS = BIT(10), |
232 | IWL_UCODE_TLV_FLAGS_NO_BASIC_SSID = BIT(12), | 222 | IWL_UCODE_TLV_FLAGS_NO_BASIC_SSID = BIT(12), |
233 | IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL = BIT(15), | 223 | IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL = BIT(15), |
234 | IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE = BIT(16), | 224 | IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE = BIT(16), |
235 | IWL_UCODE_TLV_FLAGS_P2P_PM = BIT(21), | ||
236 | IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM = BIT(22), | ||
237 | IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM = BIT(23), | ||
238 | IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24), | 225 | IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24), |
239 | IWL_UCODE_TLV_FLAGS_EBS_SUPPORT = BIT(25), | 226 | IWL_UCODE_TLV_FLAGS_EBS_SUPPORT = BIT(25), |
240 | IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD = BIT(26), | 227 | IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD = BIT(26), |
241 | IWL_UCODE_TLV_FLAGS_BCAST_FILTERING = BIT(29), | 228 | IWL_UCODE_TLV_FLAGS_BCAST_FILTERING = BIT(29), |
242 | IWL_UCODE_TLV_FLAGS_GO_UAPSD = BIT(30), | ||
243 | }; | 229 | }; |
244 | 230 | ||
245 | typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t; | 231 | typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t; |
@@ -249,13 +235,8 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t; | |||
249 | * @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time | 235 | * @IWL_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time |
250 | * longer than the passive one, which is essential for fragmented scan. | 236 | * longer than the passive one, which is essential for fragmented scan. |
251 | * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. | 237 | * @IWL_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source. |
252 | * @IWL_UCODE_TLV_API_WIDE_CMD_HDR: ucode supports wide command header | ||
253 | * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params | 238 | * @IWL_UCODE_TLV_API_LQ_SS_PARAMS: Configure STBC/BFER via LQ CMD ss_params |
254 | * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format | 239 | * @IWL_UCODE_TLV_API_NEW_VERSION: new versioning format |
255 | * @IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY: scan APIs use 8-level priority | ||
256 | * instead of 3. | ||
257 | * @IWL_UCODE_TLV_API_TX_POWER_CHAIN: TX power API has larger command size | ||
258 | * (command version 3) that supports per-chain limits | ||
259 | * @IWL_UCODE_TLV_API_SCAN_TSF_REPORT: Scan start time reported in scan | 240 | * @IWL_UCODE_TLV_API_SCAN_TSF_REPORT: Scan start time reported in scan |
260 | * iteration complete notification, and the timestamp reported for RX | 241 | * iteration complete notification, and the timestamp reported for RX |
261 | * received during scan, are reported in TSF of the mac specified in the | 242 | * received during scan, are reported in TSF of the mac specified in the |
@@ -266,11 +247,8 @@ typedef unsigned int __bitwise__ iwl_ucode_tlv_api_t; | |||
266 | enum iwl_ucode_tlv_api { | 247 | enum iwl_ucode_tlv_api { |
267 | IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t)8, | 248 | IWL_UCODE_TLV_API_FRAGMENTED_SCAN = (__force iwl_ucode_tlv_api_t)8, |
268 | IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t)9, | 249 | IWL_UCODE_TLV_API_WIFI_MCC_UPDATE = (__force iwl_ucode_tlv_api_t)9, |
269 | IWL_UCODE_TLV_API_WIDE_CMD_HDR = (__force iwl_ucode_tlv_api_t)14, | ||
270 | IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t)18, | 250 | IWL_UCODE_TLV_API_LQ_SS_PARAMS = (__force iwl_ucode_tlv_api_t)18, |
271 | IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t)20, | 251 | IWL_UCODE_TLV_API_NEW_VERSION = (__force iwl_ucode_tlv_api_t)20, |
272 | IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY = (__force iwl_ucode_tlv_api_t)24, | ||
273 | IWL_UCODE_TLV_API_TX_POWER_CHAIN = (__force iwl_ucode_tlv_api_t)27, | ||
274 | IWL_UCODE_TLV_API_SCAN_TSF_REPORT = (__force iwl_ucode_tlv_api_t)28, | 252 | IWL_UCODE_TLV_API_SCAN_TSF_REPORT = (__force iwl_ucode_tlv_api_t)28, |
275 | 253 | ||
276 | NUM_IWL_UCODE_TLV_API | 254 | NUM_IWL_UCODE_TLV_API |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c index 8ff19210ef1e..2d6f44fbaf62 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | |||
@@ -1578,8 +1578,7 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1578 | 1578 | ||
1579 | if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM && | 1579 | if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM && |
1580 | ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) || | 1580 | ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) || |
1581 | (vif->type == NL80211_IFTYPE_STATION && vif->p2p && | 1581 | (vif->type == NL80211_IFTYPE_STATION && vif->p2p))) |
1582 | mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM))) | ||
1583 | MVM_DEBUGFS_ADD_FILE_VIF(pm_params, mvmvif->dbgfs_dir, S_IWUSR | | 1582 | MVM_DEBUGFS_ADD_FILE_VIF(pm_params, mvmvif->dbgfs_dir, S_IWUSR | |
1584 | S_IRUSR); | 1583 | S_IRUSR); |
1585 | 1584 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h index 404b0de9e2dc..3fa43d1348a2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-power.h | |||
@@ -313,35 +313,26 @@ enum iwl_dev_tx_power_cmd_mode { | |||
313 | IWL_TX_POWER_MODE_SET_ACK = 3, | 313 | IWL_TX_POWER_MODE_SET_ACK = 3, |
314 | }; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_4 */; | 314 | }; /* TX_POWER_REDUCED_FLAGS_TYPE_API_E_VER_4 */; |
315 | 315 | ||
316 | #define IWL_NUM_CHAIN_LIMITS 2 | ||
317 | #define IWL_NUM_SUB_BANDS 5 | ||
318 | |||
316 | /** | 319 | /** |
317 | * struct iwl_dev_tx_power_cmd_v2 - TX power reduction command | 320 | * struct iwl_dev_tx_power_cmd - TX power reduction command |
318 | * @set_mode: see &enum iwl_dev_tx_power_cmd_mode | 321 | * @set_mode: see &enum iwl_dev_tx_power_cmd_mode |
319 | * @mac_context_id: id of the mac ctx for which we are reducing TX power. | 322 | * @mac_context_id: id of the mac ctx for which we are reducing TX power. |
320 | * @pwr_restriction: TX power restriction in 1/8 dBms. | 323 | * @pwr_restriction: TX power restriction in 1/8 dBms. |
321 | * @dev_24: device TX power restriction in 1/8 dBms | 324 | * @dev_24: device TX power restriction in 1/8 dBms |
322 | * @dev_52_low: device TX power restriction upper band - low | 325 | * @dev_52_low: device TX power restriction upper band - low |
323 | * @dev_52_high: device TX power restriction upper band - high | 326 | * @dev_52_high: device TX power restriction upper band - high |
327 | * @per_chain_restriction: per chain restrictions | ||
324 | */ | 328 | */ |
325 | struct iwl_dev_tx_power_cmd_v2 { | 329 | struct iwl_dev_tx_power_cmd_v3 { |
326 | __le32 set_mode; | 330 | __le32 set_mode; |
327 | __le32 mac_context_id; | 331 | __le32 mac_context_id; |
328 | __le16 pwr_restriction; | 332 | __le16 pwr_restriction; |
329 | __le16 dev_24; | 333 | __le16 dev_24; |
330 | __le16 dev_52_low; | 334 | __le16 dev_52_low; |
331 | __le16 dev_52_high; | 335 | __le16 dev_52_high; |
332 | } __packed; /* TX_REDUCED_POWER_API_S_VER_2 */ | ||
333 | |||
334 | #define IWL_NUM_CHAIN_LIMITS 2 | ||
335 | #define IWL_NUM_SUB_BANDS 5 | ||
336 | |||
337 | /** | ||
338 | * struct iwl_dev_tx_power_cmd - TX power reduction command | ||
339 | * @v2: version 2 of the command, embedded here for easier software handling | ||
340 | * @per_chain_restriction: per chain restrictions | ||
341 | */ | ||
342 | struct iwl_dev_tx_power_cmd_v3 { | ||
343 | /* v3 is just an extension of v2 - keep this here */ | ||
344 | struct iwl_dev_tx_power_cmd_v2 v2; | ||
345 | __le16 per_chain_restriction[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS]; | 336 | __le16 per_chain_restriction[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS]; |
346 | } __packed; /* TX_REDUCED_POWER_API_S_VER_3 */ | 337 | } __packed; /* TX_REDUCED_POWER_API_S_VER_3 */ |
347 | 338 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h index 0055a960238b..59ca97a11b2b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | |||
@@ -89,7 +89,6 @@ | |||
89 | * @TX_CMD_FLG_MH_PAD: driver inserted 2 byte padding after MAC header. | 89 | * @TX_CMD_FLG_MH_PAD: driver inserted 2 byte padding after MAC header. |
90 | * Should be set for 26/30 length MAC headers | 90 | * Should be set for 26/30 length MAC headers |
91 | * @TX_CMD_FLG_RESP_TO_DRV: zero this if the response should go only to FW | 91 | * @TX_CMD_FLG_RESP_TO_DRV: zero this if the response should go only to FW |
92 | * @TX_CMD_FLG_CCMP_AGG: this frame uses CCMP for aggregation acceleration | ||
93 | * @TX_CMD_FLG_TKIP_MIC_DONE: FW already performed TKIP MIC calculation | 92 | * @TX_CMD_FLG_TKIP_MIC_DONE: FW already performed TKIP MIC calculation |
94 | * @TX_CMD_FLG_DUR: disable duration overwriting used in PS-Poll Assoc-id | 93 | * @TX_CMD_FLG_DUR: disable duration overwriting used in PS-Poll Assoc-id |
95 | * @TX_CMD_FLG_FW_DROP: FW should mark frame to be dropped | 94 | * @TX_CMD_FLG_FW_DROP: FW should mark frame to be dropped |
@@ -116,7 +115,6 @@ enum iwl_tx_flags { | |||
116 | TX_CMD_FLG_KEEP_SEQ_CTL = BIT(18), | 115 | TX_CMD_FLG_KEEP_SEQ_CTL = BIT(18), |
117 | TX_CMD_FLG_MH_PAD = BIT(20), | 116 | TX_CMD_FLG_MH_PAD = BIT(20), |
118 | TX_CMD_FLG_RESP_TO_DRV = BIT(21), | 117 | TX_CMD_FLG_RESP_TO_DRV = BIT(21), |
119 | TX_CMD_FLG_CCMP_AGG = BIT(22), | ||
120 | TX_CMD_FLG_TKIP_MIC_DONE = BIT(23), | 118 | TX_CMD_FLG_TKIP_MIC_DONE = BIT(23), |
121 | TX_CMD_FLG_DUR = BIT(25), | 119 | TX_CMD_FLG_DUR = BIT(25), |
122 | TX_CMD_FLG_FW_DROP = BIT(26), | 120 | TX_CMD_FLG_FW_DROP = BIT(26), |
@@ -149,7 +147,7 @@ enum iwl_tx_pm_timeouts { | |||
149 | * @TX_CMD_SEC_EXT: extended cipher algorithm. | 147 | * @TX_CMD_SEC_EXT: extended cipher algorithm. |
150 | * @TX_CMD_SEC_GCMP: GCMP encryption algorithm. | 148 | * @TX_CMD_SEC_GCMP: GCMP encryption algorithm. |
151 | * @TX_CMD_SEC_KEY128: set for 104 bits WEP key. | 149 | * @TX_CMD_SEC_KEY128: set for 104 bits WEP key. |
152 | * @TC_CMD_SEC_KEY_FROM_TABLE: for a non-WEP key, set if the key should be taken | 150 | * @TX_CMD_SEC_KEY_FROM_TABLE: for a non-WEP key, set if the key should be taken |
153 | * from the table instead of from the TX command. | 151 | * from the table instead of from the TX command. |
154 | * If the key is taken from the key table its index should be given by the | 152 | * If the key is taken from the key table its index should be given by the |
155 | * first byte of the TX command key field. | 153 | * first byte of the TX command key field. |
@@ -161,7 +159,7 @@ enum iwl_tx_cmd_sec_ctrl { | |||
161 | TX_CMD_SEC_EXT = 0x04, | 159 | TX_CMD_SEC_EXT = 0x04, |
162 | TX_CMD_SEC_GCMP = 0x05, | 160 | TX_CMD_SEC_GCMP = 0x05, |
163 | TX_CMD_SEC_KEY128 = 0x08, | 161 | TX_CMD_SEC_KEY128 = 0x08, |
164 | TC_CMD_SEC_KEY_FROM_TABLE = 0x08, | 162 | TX_CMD_SEC_KEY_FROM_TABLE = 0x08, |
165 | }; | 163 | }; |
166 | 164 | ||
167 | /* TODO: how does these values are OK with only 16 bit variable??? */ | 165 | /* TODO: how does these values are OK with only 16 bit variable??? */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 7322c4394a9a..872066317fa5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
@@ -1046,19 +1046,11 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm) | |||
1046 | { | 1046 | { |
1047 | struct iwl_mvm_sar_table sar_table; | 1047 | struct iwl_mvm_sar_table sar_table; |
1048 | struct iwl_dev_tx_power_cmd cmd = { | 1048 | struct iwl_dev_tx_power_cmd cmd = { |
1049 | .v3.v2.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS), | 1049 | .v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS), |
1050 | }; | 1050 | }; |
1051 | int ret, i, j, idx; | 1051 | int ret, i, j, idx; |
1052 | int len = sizeof(cmd); | 1052 | int len = sizeof(cmd); |
1053 | 1053 | ||
1054 | /* we can't do anything with the table if the FW doesn't support it */ | ||
1055 | if (!fw_has_api(&mvm->fw->ucode_capa, | ||
1056 | IWL_UCODE_TLV_API_TX_POWER_CHAIN)) { | ||
1057 | IWL_DEBUG_RADIO(mvm, | ||
1058 | "FW doesn't support per-chain TX power settings.\n"); | ||
1059 | return 0; | ||
1060 | } | ||
1061 | |||
1062 | if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK)) | 1054 | if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK)) |
1063 | len = sizeof(cmd.v3); | 1055 | len = sizeof(cmd.v3); |
1064 | 1056 | ||
@@ -1115,27 +1107,27 @@ int iwl_mvm_up(struct iwl_mvm *mvm) | |||
1115 | * (for example, if we were in RFKILL) | 1107 | * (for example, if we were in RFKILL) |
1116 | */ | 1108 | */ |
1117 | ret = iwl_run_init_mvm_ucode(mvm, false); | 1109 | ret = iwl_run_init_mvm_ucode(mvm, false); |
1118 | if (ret && !iwlmvm_mod_params.init_dbg) { | 1110 | |
1111 | if (iwlmvm_mod_params.init_dbg) | ||
1112 | return 0; | ||
1113 | |||
1114 | if (ret) { | ||
1119 | IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret); | 1115 | IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret); |
1120 | /* this can't happen */ | 1116 | /* this can't happen */ |
1121 | if (WARN_ON(ret > 0)) | 1117 | if (WARN_ON(ret > 0)) |
1122 | ret = -ERFKILL; | 1118 | ret = -ERFKILL; |
1123 | goto error; | 1119 | goto error; |
1124 | } | 1120 | } |
1125 | if (!iwlmvm_mod_params.init_dbg) { | ||
1126 | /* | ||
1127 | * Stop and start the transport without entering low power | ||
1128 | * mode. This will save the state of other components on the | ||
1129 | * device that are triggered by the INIT firwmare (MFUART). | ||
1130 | */ | ||
1131 | _iwl_trans_stop_device(mvm->trans, false); | ||
1132 | ret = _iwl_trans_start_hw(mvm->trans, false); | ||
1133 | if (ret) | ||
1134 | goto error; | ||
1135 | } | ||
1136 | 1121 | ||
1137 | if (iwlmvm_mod_params.init_dbg) | 1122 | /* |
1138 | return 0; | 1123 | * Stop and start the transport without entering low power |
1124 | * mode. This will save the state of other components on the | ||
1125 | * device that are triggered by the INIT firwmare (MFUART). | ||
1126 | */ | ||
1127 | _iwl_trans_stop_device(mvm->trans, false); | ||
1128 | ret = _iwl_trans_start_hw(mvm->trans, false); | ||
1129 | if (ret) | ||
1130 | goto error; | ||
1139 | 1131 | ||
1140 | ret = iwl_mvm_load_ucode_wait_alive(mvm, IWL_UCODE_REGULAR); | 1132 | ret = iwl_mvm_load_ucode_wait_alive(mvm, IWL_UCODE_REGULAR); |
1141 | if (ret) { | 1133 | if (ret) { |
@@ -1233,9 +1225,12 @@ int iwl_mvm_up(struct iwl_mvm *mvm) | |||
1233 | } | 1225 | } |
1234 | 1226 | ||
1235 | /* TODO: read the budget from BIOS / Platform NVM */ | 1227 | /* TODO: read the budget from BIOS / Platform NVM */ |
1236 | if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0) | 1228 | if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0) { |
1237 | ret = iwl_mvm_ctdp_command(mvm, CTDP_CMD_OPERATION_START, | 1229 | ret = iwl_mvm_ctdp_command(mvm, CTDP_CMD_OPERATION_START, |
1238 | mvm->cooling_dev.cur_state); | 1230 | mvm->cooling_dev.cur_state); |
1231 | if (ret) | ||
1232 | goto error; | ||
1233 | } | ||
1239 | #else | 1234 | #else |
1240 | /* Initialize tx backoffs to the minimal possible */ | 1235 | /* Initialize tx backoffs to the minimal possible */ |
1241 | iwl_mvm_tt_tx_backoff(mvm, 0); | 1236 | iwl_mvm_tt_tx_backoff(mvm, 0); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index a5ede8c9bea2..318efd814037 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
@@ -479,13 +479,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
479 | hw->wiphy->n_cipher_suites++; | 479 | hw->wiphy->n_cipher_suites++; |
480 | } | 480 | } |
481 | 481 | ||
482 | /* | 482 | /* Enable 11w if software crypto is not enabled (as the |
483 | * Enable 11w if advertised by firmware and software crypto | 483 | * firmware will interpret some mgmt packets, so enabling it |
484 | * is not enabled (as the firmware will interpret some mgmt | 484 | * with software crypto isn't safe). |
485 | * packets, so enabling it with software crypto isn't safe) | ||
486 | */ | 485 | */ |
487 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_MFP && | 486 | if (!iwlwifi_mod_params.sw_crypto) { |
488 | !iwlwifi_mod_params.sw_crypto) { | ||
489 | ieee80211_hw_set(hw, MFP_CAPABLE); | 487 | ieee80211_hw_set(hw, MFP_CAPABLE); |
490 | mvm->ciphers[hw->wiphy->n_cipher_suites] = | 488 | mvm->ciphers[hw->wiphy->n_cipher_suites] = |
491 | WLAN_CIPHER_SUITE_AES_CMAC; | 489 | WLAN_CIPHER_SUITE_AES_CMAC; |
@@ -547,9 +545,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
547 | hw->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG | | 545 | hw->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG | |
548 | REGULATORY_DISABLE_BEACON_HINTS; | 546 | REGULATORY_DISABLE_BEACON_HINTS; |
549 | 547 | ||
550 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_GO_UAPSD) | 548 | hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; |
551 | hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; | ||
552 | |||
553 | hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; | 549 | hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; |
554 | 550 | ||
555 | hw->wiphy->iface_combinations = iwl_mvm_iface_combinations; | 551 | hw->wiphy->iface_combinations = iwl_mvm_iface_combinations; |
@@ -1273,20 +1269,18 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
1273 | s16 tx_power) | 1269 | s16 tx_power) |
1274 | { | 1270 | { |
1275 | struct iwl_dev_tx_power_cmd cmd = { | 1271 | struct iwl_dev_tx_power_cmd cmd = { |
1276 | .v3.v2.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC), | 1272 | .v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC), |
1277 | .v3.v2.mac_context_id = | 1273 | .v3.mac_context_id = |
1278 | cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id), | 1274 | cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id), |
1279 | .v3.v2.pwr_restriction = cpu_to_le16(8 * tx_power), | 1275 | .v3.pwr_restriction = cpu_to_le16(8 * tx_power), |
1280 | }; | 1276 | }; |
1281 | int len = sizeof(cmd); | 1277 | int len = sizeof(cmd); |
1282 | 1278 | ||
1283 | if (tx_power == IWL_DEFAULT_MAX_TX_POWER) | 1279 | if (tx_power == IWL_DEFAULT_MAX_TX_POWER) |
1284 | cmd.v3.v2.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER); | 1280 | cmd.v3.pwr_restriction = cpu_to_le16(IWL_DEV_MAX_TX_POWER); |
1285 | 1281 | ||
1286 | if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK)) | 1282 | if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TX_POWER_ACK)) |
1287 | len = sizeof(cmd.v3); | 1283 | len = sizeof(cmd.v3); |
1288 | if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_TX_POWER_CHAIN)) | ||
1289 | len = sizeof(cmd.v3.v2); | ||
1290 | 1284 | ||
1291 | return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd); | 1285 | return iwl_mvm_send_cmd_pdu(mvm, REDUCE_TX_POWER_CMD, 0, len, &cmd); |
1292 | } | 1286 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index b7cfdcbcf95b..d17cbf603f7c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
@@ -1305,8 +1305,6 @@ static inline void iwl_mvm_set_tx_cmd_ccmp(struct ieee80211_tx_info *info, | |||
1305 | 1305 | ||
1306 | tx_cmd->sec_ctl = TX_CMD_SEC_CCM; | 1306 | tx_cmd->sec_ctl = TX_CMD_SEC_CCM; |
1307 | memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); | 1307 | memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); |
1308 | if (info->flags & IEEE80211_TX_CTL_AMPDU) | ||
1309 | tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_CCMP_AGG); | ||
1310 | } | 1308 | } |
1311 | 1309 | ||
1312 | static inline void iwl_mvm_wait_for_async_handlers(struct iwl_mvm *mvm) | 1310 | static inline void iwl_mvm_wait_for_async_handlers(struct iwl_mvm *mvm) |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 75f3ca0504fd..05fe6dd1a2c8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -653,11 +653,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
653 | /* the hardware splits the A-MSDU */ | 653 | /* the hardware splits the A-MSDU */ |
654 | if (mvm->cfg->mq_rx_supported) | 654 | if (mvm->cfg->mq_rx_supported) |
655 | trans_cfg.rx_buf_size = IWL_AMSDU_4K; | 655 | trans_cfg.rx_buf_size = IWL_AMSDU_4K; |
656 | trans->wide_cmd_header = fw_has_api(&mvm->fw->ucode_capa, | ||
657 | IWL_UCODE_TLV_API_WIDE_CMD_HDR); | ||
658 | 656 | ||
659 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_DW_BC_TABLE) | 657 | trans->wide_cmd_header = true; |
660 | trans_cfg.bc_table_dword = true; | 658 | trans_cfg.bc_table_dword = true; |
661 | 659 | ||
662 | trans_cfg.command_groups = iwl_mvm_groups; | 660 | trans_cfg.command_groups = iwl_mvm_groups; |
663 | trans_cfg.command_groups_size = ARRAY_SIZE(iwl_mvm_groups); | 661 | trans_cfg.command_groups_size = ARRAY_SIZE(iwl_mvm_groups); |
@@ -712,37 +710,21 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
712 | IWL_DEBUG_EEPROM(mvm->trans->dev, | 710 | IWL_DEBUG_EEPROM(mvm->trans->dev, |
713 | "working without external nvm file\n"); | 711 | "working without external nvm file\n"); |
714 | 712 | ||
715 | if (WARN(cfg->no_power_up_nic_in_init && !mvm->nvm_file_name, | 713 | err = iwl_trans_start_hw(mvm->trans); |
716 | "not allowing power-up and not having nvm_file\n")) | 714 | if (err) |
717 | goto out_free; | 715 | goto out_free; |
718 | 716 | ||
719 | /* | 717 | mutex_lock(&mvm->mutex); |
720 | * Even if nvm exists in the nvm_file driver should read again the nvm | 718 | iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE); |
721 | * from the nic because there might be entries that exist in the OTP | 719 | err = iwl_run_init_mvm_ucode(mvm, true); |
722 | * and not in the file. | 720 | if (!err || !iwlmvm_mod_params.init_dbg) |
723 | * for nics with no_power_up_nic_in_init: rely completley on nvm_file | 721 | iwl_mvm_stop_device(mvm); |
724 | */ | 722 | iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE); |
725 | if (cfg->no_power_up_nic_in_init && mvm->nvm_file_name) { | 723 | mutex_unlock(&mvm->mutex); |
726 | err = iwl_nvm_init(mvm, false); | 724 | /* returns 0 if successful, 1 if success but in rfkill */ |
727 | if (err) | 725 | if (err < 0 && !iwlmvm_mod_params.init_dbg) { |
728 | goto out_free; | 726 | IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", err); |
729 | } else { | 727 | goto out_free; |
730 | err = iwl_trans_start_hw(mvm->trans); | ||
731 | if (err) | ||
732 | goto out_free; | ||
733 | |||
734 | mutex_lock(&mvm->mutex); | ||
735 | iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE); | ||
736 | err = iwl_run_init_mvm_ucode(mvm, true); | ||
737 | if (!err || !iwlmvm_mod_params.init_dbg) | ||
738 | iwl_mvm_stop_device(mvm); | ||
739 | iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE); | ||
740 | mutex_unlock(&mvm->mutex); | ||
741 | /* returns 0 if successful, 1 if success but in rfkill */ | ||
742 | if (err < 0 && !iwlmvm_mod_params.init_dbg) { | ||
743 | IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", err); | ||
744 | goto out_free; | ||
745 | } | ||
746 | } | 728 | } |
747 | 729 | ||
748 | scan_size = iwl_mvm_scan_size(mvm); | 730 | scan_size = iwl_mvm_scan_size(mvm); |
@@ -784,8 +766,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
784 | flush_delayed_work(&mvm->fw_dump_wk); | 766 | flush_delayed_work(&mvm->fw_dump_wk); |
785 | iwl_phy_db_free(mvm->phy_db); | 767 | iwl_phy_db_free(mvm->phy_db); |
786 | kfree(mvm->scan_cmd); | 768 | kfree(mvm->scan_cmd); |
787 | if (!cfg->no_power_up_nic_in_init || !mvm->nvm_file_name) | 769 | iwl_trans_op_mode_leave(trans); |
788 | iwl_trans_op_mode_leave(trans); | 770 | |
789 | ieee80211_free_hw(mvm->hw); | 771 | ieee80211_free_hw(mvm->hw); |
790 | return NULL; | 772 | return NULL; |
791 | } | 773 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c index ff85865b1dda..af6d10c23e5a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c | |||
@@ -694,8 +694,7 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, | |||
694 | 694 | ||
695 | /* enable PM on p2p if p2p stand alone */ | 695 | /* enable PM on p2p if p2p stand alone */ |
696 | if (vifs->p2p_active && !vifs->bss_active && !vifs->ap_active) { | 696 | if (vifs->p2p_active && !vifs->bss_active && !vifs->ap_active) { |
697 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM) | 697 | p2p_mvmvif->pm_enabled = true; |
698 | p2p_mvmvif->pm_enabled = true; | ||
699 | return; | 698 | return; |
700 | } | 699 | } |
701 | 700 | ||
@@ -707,12 +706,10 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, | |||
707 | ap_mvmvif->phy_ctxt->id); | 706 | ap_mvmvif->phy_ctxt->id); |
708 | 707 | ||
709 | /* clients are not stand alone: enable PM if DCM */ | 708 | /* clients are not stand alone: enable PM if DCM */ |
710 | if (!(client_same_channel || ap_same_channel) && | 709 | if (!(client_same_channel || ap_same_channel)) { |
711 | (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM)) { | ||
712 | if (vifs->bss_active) | 710 | if (vifs->bss_active) |
713 | bss_mvmvif->pm_enabled = true; | 711 | bss_mvmvif->pm_enabled = true; |
714 | if (vifs->p2p_active && | 712 | if (vifs->p2p_active) |
715 | (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM)) | ||
716 | p2p_mvmvif->pm_enabled = true; | 713 | p2p_mvmvif->pm_enabled = true; |
717 | return; | 714 | return; |
718 | } | 715 | } |
@@ -721,12 +718,10 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, | |||
721 | * There is only one channel in the system and there are only | 718 | * There is only one channel in the system and there are only |
722 | * bss and p2p clients that share it | 719 | * bss and p2p clients that share it |
723 | */ | 720 | */ |
724 | if (client_same_channel && !vifs->ap_active && | 721 | if (client_same_channel && !vifs->ap_active) { |
725 | (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM)) { | ||
726 | /* share same channel*/ | 722 | /* share same channel*/ |
727 | bss_mvmvif->pm_enabled = true; | 723 | bss_mvmvif->pm_enabled = true; |
728 | if (mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PM) | 724 | p2p_mvmvif->pm_enabled = true; |
729 | p2p_mvmvif->pm_enabled = true; | ||
730 | } | 725 | } |
731 | } | 726 | } |
732 | 727 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 00b03fc5807b..f279fdd6eb44 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
@@ -739,22 +739,6 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
739 | params->preq.common_data.len = cpu_to_le16(ies->common_ie_len); | 739 | params->preq.common_data.len = cpu_to_le16(ies->common_ie_len); |
740 | } | 740 | } |
741 | 741 | ||
742 | static __le32 iwl_mvm_scan_priority(struct iwl_mvm *mvm, | ||
743 | enum iwl_scan_priority_ext prio) | ||
744 | { | ||
745 | if (fw_has_api(&mvm->fw->ucode_capa, | ||
746 | IWL_UCODE_TLV_API_EXT_SCAN_PRIORITY)) | ||
747 | return cpu_to_le32(prio); | ||
748 | |||
749 | if (prio <= IWL_SCAN_PRIORITY_EXT_2) | ||
750 | return cpu_to_le32(IWL_SCAN_PRIORITY_LOW); | ||
751 | |||
752 | if (prio <= IWL_SCAN_PRIORITY_EXT_4) | ||
753 | return cpu_to_le32(IWL_SCAN_PRIORITY_MEDIUM); | ||
754 | |||
755 | return cpu_to_le32(IWL_SCAN_PRIORITY_HIGH); | ||
756 | } | ||
757 | |||
758 | static void iwl_mvm_scan_lmac_dwell(struct iwl_mvm *mvm, | 742 | static void iwl_mvm_scan_lmac_dwell(struct iwl_mvm *mvm, |
759 | struct iwl_scan_req_lmac *cmd, | 743 | struct iwl_scan_req_lmac *cmd, |
760 | struct iwl_mvm_scan_params *params) | 744 | struct iwl_mvm_scan_params *params) |
@@ -765,7 +749,7 @@ static void iwl_mvm_scan_lmac_dwell(struct iwl_mvm *mvm, | |||
765 | cmd->extended_dwell = scan_timing[params->type].dwell_extended; | 749 | cmd->extended_dwell = scan_timing[params->type].dwell_extended; |
766 | cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time); | 750 | cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time); |
767 | cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time); | 751 | cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time); |
768 | cmd->scan_prio = iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6); | 752 | cmd->scan_prio = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6); |
769 | } | 753 | } |
770 | 754 | ||
771 | static inline bool iwl_mvm_scan_fits(struct iwl_mvm *mvm, int n_ssids, | 755 | static inline bool iwl_mvm_scan_fits(struct iwl_mvm *mvm, int n_ssids, |
@@ -1067,15 +1051,12 @@ static void iwl_mvm_scan_umac_dwell(struct iwl_mvm *mvm, | |||
1067 | cmd->fragmented_dwell = scan_timing[params->type].dwell_fragmented; | 1051 | cmd->fragmented_dwell = scan_timing[params->type].dwell_fragmented; |
1068 | cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time); | 1052 | cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time); |
1069 | cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time); | 1053 | cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time); |
1070 | cmd->scan_priority = | 1054 | cmd->scan_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6); |
1071 | iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6); | ||
1072 | 1055 | ||
1073 | if (iwl_mvm_is_regular_scan(params)) | 1056 | if (iwl_mvm_is_regular_scan(params)) |
1074 | cmd->ooc_priority = | 1057 | cmd->ooc_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_6); |
1075 | iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6); | ||
1076 | else | 1058 | else |
1077 | cmd->ooc_priority = | 1059 | cmd->ooc_priority = cpu_to_le32(IWL_SCAN_PRIORITY_EXT_2); |
1078 | iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_2); | ||
1079 | } | 1060 | } |
1080 | 1061 | ||
1081 | static void | 1062 | static void |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 258a234feb71..fc771885e383 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -933,7 +933,7 @@ static void iwl_mvm_unshare_queue(struct iwl_mvm *mvm, int queue) | |||
933 | 933 | ||
934 | /* If aggs should be turned back on - do it */ | 934 | /* If aggs should be turned back on - do it */ |
935 | if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { | 935 | if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { |
936 | struct iwl_mvm_add_sta_cmd cmd; | 936 | struct iwl_mvm_add_sta_cmd cmd = {0}; |
937 | 937 | ||
938 | mvmsta->tid_disable_agg &= ~BIT(tid); | 938 | mvmsta->tid_disable_agg &= ~BIT(tid); |
939 | 939 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c index 58fc7b3c711c..63a051be832e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c | |||
@@ -241,11 +241,8 @@ static int iwl_mvm_get_temp_cmd(struct iwl_mvm *mvm) | |||
241 | }; | 241 | }; |
242 | u32 cmdid; | 242 | u32 cmdid; |
243 | 243 | ||
244 | if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_WIDE_CMD_HDR)) | 244 | cmdid = iwl_cmd_id(CMD_DTS_MEASUREMENT_TRIGGER_WIDE, |
245 | cmdid = iwl_cmd_id(CMD_DTS_MEASUREMENT_TRIGGER_WIDE, | 245 | PHY_OPS_GROUP, 0); |
246 | PHY_OPS_GROUP, 0); | ||
247 | else | ||
248 | cmdid = CMD_DTS_MEASUREMENT_TRIGGER; | ||
249 | 246 | ||
250 | if (!fw_has_capa(&mvm->fw->ucode_capa, | 247 | if (!fw_has_capa(&mvm->fw->ucode_capa, |
251 | IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE)) | 248 | IWL_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE)) |
@@ -261,9 +258,6 @@ int iwl_mvm_get_temp(struct iwl_mvm *mvm, s32 *temp) | |||
261 | DTS_MEASUREMENT_NOTIF_WIDE) }; | 258 | DTS_MEASUREMENT_NOTIF_WIDE) }; |
262 | int ret; | 259 | int ret; |
263 | 260 | ||
264 | if (!fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_WIDE_CMD_HDR)) | ||
265 | temp_notif[0] = DTS_MEASUREMENT_NOTIFICATION; | ||
266 | |||
267 | lockdep_assert_held(&mvm->mutex); | 261 | lockdep_assert_held(&mvm->mutex); |
268 | 262 | ||
269 | iwl_init_notification_wait(&mvm->notif_wait, &wait_temp_notif, | 263 | iwl_init_notification_wait(&mvm->notif_wait, &wait_temp_notif, |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index e0c9065a3ad4..a3fe73b963c3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |||
@@ -346,7 +346,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, | |||
346 | 346 | ||
347 | rate_idx = info->control.rates[0].idx; | 347 | rate_idx = info->control.rates[0].idx; |
348 | /* if the rate isn't a well known legacy rate, take the lowest one */ | 348 | /* if the rate isn't a well known legacy rate, take the lowest one */ |
349 | if (rate_idx < 0 || rate_idx > IWL_RATE_COUNT_LEGACY) | 349 | if (rate_idx < 0 || rate_idx >= IWL_RATE_COUNT_LEGACY) |
350 | rate_idx = rate_lowest_index( | 350 | rate_idx = rate_lowest_index( |
351 | &mvm->nvm_data->bands[info->band], sta); | 351 | &mvm->nvm_data->bands[info->band], sta); |
352 | 352 | ||
@@ -441,7 +441,7 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm, | |||
441 | * one. | 441 | * one. |
442 | * Need to handle this. | 442 | * Need to handle this. |
443 | */ | 443 | */ |
444 | tx_cmd->sec_ctl |= TX_CMD_SEC_GCMP | TC_CMD_SEC_KEY_FROM_TABLE; | 444 | tx_cmd->sec_ctl |= TX_CMD_SEC_GCMP | TX_CMD_SEC_KEY_FROM_TABLE; |
445 | tx_cmd->key[0] = keyconf->hw_key_idx; | 445 | tx_cmd->key[0] = keyconf->hw_key_idx; |
446 | iwl_mvm_set_tx_cmd_pn(info, crypto_hdr); | 446 | iwl_mvm_set_tx_cmd_pn(info, crypto_hdr); |
447 | break; | 447 | break; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index 9e366e28c983..d04babd99b53 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -512,7 +512,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm) | |||
512 | base = mvm->fw->inst_errlog_ptr; | 512 | base = mvm->fw->inst_errlog_ptr; |
513 | } | 513 | } |
514 | 514 | ||
515 | if (base < 0x800000) { | 515 | if (base < 0x400000) { |
516 | IWL_ERR(mvm, | 516 | IWL_ERR(mvm, |
517 | "Not valid error log pointer 0x%08X for %s uCode\n", | 517 | "Not valid error log pointer 0x%08X for %s uCode\n", |
518 | base, | 518 | base, |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 3d766f250d3f..001be406a3d3 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
@@ -529,6 +529,8 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
529 | {IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)}, | 529 | {IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)}, |
530 | {IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)}, | 530 | {IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)}, |
531 | {IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)}, | 531 | {IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)}, |
532 | {IWL_PCI_DEVICE(0x2526, 0x1030, iwl9560_2ac_cfg)}, | ||
533 | {IWL_PCI_DEVICE(0xA370, 0x1030, iwl9560_2ac_cfg)}, | ||
532 | 534 | ||
533 | /* a000 Series */ | 535 | /* a000 Series */ |
534 | {IWL_PCI_DEVICE(0x2720, 0x0A10, iwla000_2ac_cfg)}, | 536 | {IWL_PCI_DEVICE(0x2720, 0x0A10, iwla000_2ac_cfg)}, |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h index 2d81630fba0f..cac6d99012b3 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h | |||
@@ -497,23 +497,20 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn, | |||
497 | struct sk_buff_head *skbs); | 497 | struct sk_buff_head *skbs); |
498 | void iwl_trans_pcie_tx_reset(struct iwl_trans *trans); | 498 | void iwl_trans_pcie_tx_reset(struct iwl_trans *trans); |
499 | 499 | ||
500 | static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_trans *trans, void *tfd, | 500 | static inline u16 iwl_pcie_tfd_tb_get_len(struct iwl_trans *trans, void *_tfd, |
501 | u8 idx) | 501 | u8 idx) |
502 | { | 502 | { |
503 | struct iwl_tfd *tfd_fh; | ||
504 | struct iwl_tfd_tb *tb; | ||
505 | |||
506 | if (trans->cfg->use_tfh) { | 503 | if (trans->cfg->use_tfh) { |
507 | struct iwl_tfh_tfd *tfd_fh = (void *)tfd; | 504 | struct iwl_tfh_tfd *tfd = _tfd; |
508 | struct iwl_tfh_tb *tb = &tfd_fh->tbs[idx]; | 505 | struct iwl_tfh_tb *tb = &tfd->tbs[idx]; |
509 | 506 | ||
510 | return le16_to_cpu(tb->tb_len); | 507 | return le16_to_cpu(tb->tb_len); |
511 | } | 508 | } else { |
512 | 509 | struct iwl_tfd *tfd = _tfd; | |
513 | tfd_fh = (void *)tfd; | 510 | struct iwl_tfd_tb *tb = &tfd->tbs[idx]; |
514 | tb = &tfd_fh->tbs[idx]; | ||
515 | 511 | ||
516 | return le16_to_cpu(tb->hi_n_len) >> 4; | 512 | return le16_to_cpu(tb->hi_n_len) >> 4; |
513 | } | ||
517 | } | 514 | } |
518 | 515 | ||
519 | /***************************************************** | 516 | /***************************************************** |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c index e00e7d8f197a..e9a278b60dfd 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c | |||
@@ -337,28 +337,32 @@ static inline void *iwl_pcie_get_tfd(struct iwl_trans_pcie *trans_pcie, | |||
337 | } | 337 | } |
338 | 338 | ||
339 | static inline dma_addr_t iwl_pcie_tfd_tb_get_addr(struct iwl_trans *trans, | 339 | static inline dma_addr_t iwl_pcie_tfd_tb_get_addr(struct iwl_trans *trans, |
340 | void *tfd, u8 idx) | 340 | void *_tfd, u8 idx) |
341 | { | 341 | { |
342 | struct iwl_tfd *tfd_fh; | ||
343 | struct iwl_tfd_tb *tb; | ||
344 | dma_addr_t addr; | ||
345 | 342 | ||
346 | if (trans->cfg->use_tfh) { | 343 | if (trans->cfg->use_tfh) { |
347 | struct iwl_tfh_tfd *tfd_fh = (void *)tfd; | 344 | struct iwl_tfh_tfd *tfd = _tfd; |
348 | struct iwl_tfh_tb *tb = &tfd_fh->tbs[idx]; | 345 | struct iwl_tfh_tb *tb = &tfd->tbs[idx]; |
349 | 346 | ||
350 | return (dma_addr_t)(le64_to_cpu(tb->addr)); | 347 | return (dma_addr_t)(le64_to_cpu(tb->addr)); |
351 | } | 348 | } else { |
349 | struct iwl_tfd *tfd = _tfd; | ||
350 | struct iwl_tfd_tb *tb = &tfd->tbs[idx]; | ||
351 | dma_addr_t addr = get_unaligned_le32(&tb->lo); | ||
352 | dma_addr_t hi_len; | ||
352 | 353 | ||
353 | tfd_fh = (void *)tfd; | 354 | if (sizeof(dma_addr_t) <= sizeof(u32)) |
354 | tb = &tfd_fh->tbs[idx]; | 355 | return addr; |
355 | addr = get_unaligned_le32(&tb->lo); | ||
356 | 356 | ||
357 | if (sizeof(dma_addr_t) > sizeof(u32)) | 357 | hi_len = le16_to_cpu(tb->hi_n_len) & 0xF; |
358 | addr |= | ||
359 | ((dma_addr_t)(le16_to_cpu(tb->hi_n_len) & 0xF) << 16) << 16; | ||
360 | 358 | ||
361 | return addr; | 359 | /* |
360 | * shift by 16 twice to avoid warnings on 32-bit | ||
361 | * (where this code never runs anyway due to the | ||
362 | * if statement above) | ||
363 | */ | ||
364 | return addr | ((hi_len << 16) << 16); | ||
365 | } | ||
362 | } | 366 | } |
363 | 367 | ||
364 | static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd, | 368 | static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd, |
@@ -388,18 +392,17 @@ static inline void iwl_pcie_tfd_set_tb(struct iwl_trans *trans, void *tfd, | |||
388 | } | 392 | } |
389 | } | 393 | } |
390 | 394 | ||
391 | static inline u8 iwl_pcie_tfd_get_num_tbs(struct iwl_trans *trans, void *tfd) | 395 | static inline u8 iwl_pcie_tfd_get_num_tbs(struct iwl_trans *trans, void *_tfd) |
392 | { | 396 | { |
393 | struct iwl_tfd *tfd_fh; | ||
394 | |||
395 | if (trans->cfg->use_tfh) { | 397 | if (trans->cfg->use_tfh) { |
396 | struct iwl_tfh_tfd *tfd_fh = (void *)tfd; | 398 | struct iwl_tfh_tfd *tfd = _tfd; |
397 | 399 | ||
398 | return le16_to_cpu(tfd_fh->num_tbs) & 0x1f; | 400 | return le16_to_cpu(tfd->num_tbs) & 0x1f; |
399 | } | 401 | } else { |
402 | struct iwl_tfd *tfd = _tfd; | ||
400 | 403 | ||
401 | tfd_fh = (void *)tfd; | 404 | return tfd->num_tbs & 0x1f; |
402 | return tfd_fh->num_tbs & 0x1f; | 405 | } |
403 | } | 406 | } |
404 | 407 | ||
405 | static void iwl_pcie_tfd_unmap(struct iwl_trans *trans, | 408 | static void iwl_pcie_tfd_unmap(struct iwl_trans *trans, |