Skip to content

Commit 6ab882a

Browse files
author
Kalle Valo
committed
Merge tag 'iwlwifi-next-for-kalle-2016-03-09_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
* update GSCAN capabilities (Ayala) * fix AES-CMAC in AP mode (Johannes) * adapt prints to new firmware API * rx path improvements (Sara and Gregory) * fixes for the thermal / cooling device code (Chaya Rachel) * fixes for GO uAPSD handling * more code for the 9000 device family (Sara) * infrastructure work for firmware notification (Chaya Rachel) * improve association reliablity (Sara) * runtime PM fixes * fixes for ROC (HS2.0)
2 parents 836856e + 5ed4722 commit 6ab882a

27 files changed

+565
-351
lines changed

drivers/net/wireless/intel/iwlwifi/dvm/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,10 +1652,10 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)
16521652

16531653
trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low,
16541654
table.data1, table.data2, table.line,
1655-
table.blink1, table.blink2, table.ilink1,
1656-
table.ilink2, table.bcon_time, table.gp1,
1657-
table.gp2, table.gp3, table.ucode_ver,
1658-
table.hw_ver, 0, table.brd_ver);
1655+
table.blink2, table.ilink1, table.ilink2,
1656+
table.bcon_time, table.gp1, table.gp2,
1657+
table.gp3, table.ucode_ver, table.hw_ver,
1658+
0, table.brd_ver);
16591659
IWL_ERR(priv, "0x%08X | %-28s\n", table.error_id,
16601660
desc_lookup(table.error_id));
16611661
IWL_ERR(priv, "0x%08X | uPc\n", table.pc);

drivers/net/wireless/intel/iwlwifi/iwl-9000.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ static const struct iwl_tt_params iwl9000_tt_params = {
140140
.thermal_params = &iwl9000_tt_params, \
141141
.apmg_not_supported = true, \
142142
.mq_rx_supported = true, \
143-
.vht_mu_mimo_supported = true
143+
.vht_mu_mimo_supported = true, \
144+
.mac_addr_from_csr = true
144145

145146
const struct iwl_cfg iwl9260_2ac_cfg = {
146147
.name = "Intel(R) Dual Band Wireless AC 9260",

drivers/net/wireless/intel/iwlwifi/iwl-config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ struct iwl_pwr_tx_backoff {
297297
* @host_interrupt_operation_mode: device needs host interrupt operation
298298
* mode set
299299
* @nvm_hw_section_num: the ID of the HW NVM section
300+
* @mac_addr_from_csr: read HW address from CSR registers
300301
* @features: hw features, any combination of feature_whitelist
301302
* @pwr_tx_backoffs: translation table between power limits and backoffs
302303
* @max_rx_agg_size: max RX aggregation size of the ADDBA request/response
@@ -345,6 +346,7 @@ struct iwl_cfg {
345346
const bool host_interrupt_operation_mode;
346347
bool high_temp;
347348
u8 nvm_hw_section_num;
349+
bool mac_addr_from_csr;
348350
bool lp_xtal_workaround;
349351
const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
350352
bool no_power_up_nic_in_init;

drivers/net/wireless/intel/iwlwifi/iwl-csr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,4 +598,14 @@ enum msix_hw_int_causes {
598598
#define MSIX_AUTO_CLEAR_CAUSE 0
599599
#define MSIX_NON_AUTO_CLEAR_CAUSE BIT(7)
600600

601+
/*****************************************************************************
602+
* HW address related registers *
603+
*****************************************************************************/
604+
605+
#define CSR_ADDR_BASE (0x380)
606+
#define CSR_MAC_ADDR0_OTP (CSR_ADDR_BASE)
607+
#define CSR_MAC_ADDR1_OTP (CSR_ADDR_BASE + 4)
608+
#define CSR_MAC_ADDR0_STRAP (CSR_ADDR_BASE + 8)
609+
#define CSR_MAC_ADDR1_STRAP (CSR_ADDR_BASE + 0xC)
610+
601611
#endif /* !__iwl_csr_h__ */

drivers/net/wireless/intel/iwlwifi/iwl-devtrace-iwlwifi.h

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*
33
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
44
* Copyright(c) 2015 Intel Mobile Communications GmbH
5+
* Copyright(c) 2016 Intel Deutschland GmbH
56
*
67
* This program is free software; you can redistribute it and/or modify it
78
* under the terms of version 2 of the GNU General Public License as
@@ -121,28 +122,26 @@ TRACE_EVENT(iwlwifi_dev_tx,
121122

122123
TRACE_EVENT(iwlwifi_dev_ucode_error,
123124
TP_PROTO(const struct device *dev, u32 desc, u32 tsf_low,
124-
u32 data1, u32 data2, u32 line, u32 blink1,
125-
u32 blink2, u32 ilink1, u32 ilink2, u32 bcon_time,
126-
u32 gp1, u32 gp2, u32 gp3, u32 major, u32 minor, u32 hw_ver,
127-
u32 brd_ver),
125+
u32 data1, u32 data2, u32 line, u32 blink2, u32 ilink1,
126+
u32 ilink2, u32 bcon_time, u32 gp1, u32 gp2, u32 rev_type,
127+
u32 major, u32 minor, u32 hw_ver, u32 brd_ver),
128128
TP_ARGS(dev, desc, tsf_low, data1, data2, line,
129-
blink1, blink2, ilink1, ilink2, bcon_time, gp1, gp2,
130-
gp3, major, minor, hw_ver, brd_ver),
129+
blink2, ilink1, ilink2, bcon_time, gp1, gp2,
130+
rev_type, major, minor, hw_ver, brd_ver),
131131
TP_STRUCT__entry(
132132
DEV_ENTRY
133133
__field(u32, desc)
134134
__field(u32, tsf_low)
135135
__field(u32, data1)
136136
__field(u32, data2)
137137
__field(u32, line)
138-
__field(u32, blink1)
139138
__field(u32, blink2)
140139
__field(u32, ilink1)
141140
__field(u32, ilink2)
142141
__field(u32, bcon_time)
143142
__field(u32, gp1)
144143
__field(u32, gp2)
145-
__field(u32, gp3)
144+
__field(u32, rev_type)
146145
__field(u32, major)
147146
__field(u32, minor)
148147
__field(u32, hw_ver)
@@ -155,29 +154,27 @@ TRACE_EVENT(iwlwifi_dev_ucode_error,
155154
__entry->data1 = data1;
156155
__entry->data2 = data2;
157156
__entry->line = line;
158-
__entry->blink1 = blink1;
159157
__entry->blink2 = blink2;
160158
__entry->ilink1 = ilink1;
161159
__entry->ilink2 = ilink2;
162160
__entry->bcon_time = bcon_time;
163161
__entry->gp1 = gp1;
164162
__entry->gp2 = gp2;
165-
__entry->gp3 = gp3;
163+
__entry->rev_type = rev_type;
166164
__entry->major = major;
167165
__entry->minor = minor;
168166
__entry->hw_ver = hw_ver;
169167
__entry->brd_ver = brd_ver;
170168
),
171169
TP_printk("[%s] #%02d %010u data 0x%08X 0x%08X line %u, "
172-
"blink 0x%05X 0x%05X ilink 0x%05X 0x%05X "
173-
"bcon_tm %010u gp 0x%08X 0x%08X 0x%08X major 0x%08X "
170+
"blink2 0x%05X ilink 0x%05X 0x%05X "
171+
"bcon_tm %010u gp 0x%08X 0x%08X rev_type 0x%08X major 0x%08X "
174172
"minor 0x%08X hw 0x%08X brd 0x%08X",
175173
__get_str(dev), __entry->desc, __entry->tsf_low,
176-
__entry->data1,
177-
__entry->data2, __entry->line, __entry->blink1,
174+
__entry->data1, __entry->data2, __entry->line,
178175
__entry->blink2, __entry->ilink1, __entry->ilink2,
179176
__entry->bcon_time, __entry->gp1, __entry->gp2,
180-
__entry->gp3, __entry->major, __entry->minor,
177+
__entry->rev_type, __entry->major, __entry->minor,
181178
__entry->hw_ver, __entry->brd_ver)
182179
);
183180

drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*
88
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
99
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10+
* Copyright(c) 2016 Intel Deutschland GmbH
1011
*
1112
* This program is free software; you can redistribute it and/or modify
1213
* it under the terms of version 2 of the GNU General Public License as
@@ -33,6 +34,7 @@
3334
*
3435
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
3536
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
37+
* Copyright(c) 2016 Intel Deutschland GmbH
3638
* All rights reserved.
3739
*
3840
* Redistribution and use in source and binary forms, with or without
@@ -374,15 +376,12 @@ static int iwl_store_cscheme(struct iwl_fw *fw, const u8 *data, const u32 len)
374376
return 0;
375377
}
376378

377-
static int iwl_store_gscan_capa(struct iwl_fw *fw, const u8 *data,
378-
const u32 len)
379+
static void iwl_store_gscan_capa(struct iwl_fw *fw, const u8 *data,
380+
const u32 len)
379381
{
380382
struct iwl_fw_gscan_capabilities *fw_capa = (void *)data;
381383
struct iwl_gscan_capabilities *capa = &fw->gscan_capa;
382384

383-
if (len < sizeof(*fw_capa))
384-
return -EINVAL;
385-
386385
capa->max_scan_cache_size = le32_to_cpu(fw_capa->max_scan_cache_size);
387386
capa->max_scan_buckets = le32_to_cpu(fw_capa->max_scan_buckets);
388387
capa->max_ap_cache_per_scan =
@@ -395,7 +394,15 @@ static int iwl_store_gscan_capa(struct iwl_fw *fw, const u8 *data,
395394
le32_to_cpu(fw_capa->max_significant_change_aps);
396395
capa->max_bssid_history_entries =
397396
le32_to_cpu(fw_capa->max_bssid_history_entries);
398-
return 0;
397+
capa->max_hotlist_ssids = le32_to_cpu(fw_capa->max_hotlist_ssids);
398+
capa->max_number_epno_networks =
399+
le32_to_cpu(fw_capa->max_number_epno_networks);
400+
capa->max_number_epno_networks_by_ssid =
401+
le32_to_cpu(fw_capa->max_number_epno_networks_by_ssid);
402+
capa->max_number_of_white_listed_ssid =
403+
le32_to_cpu(fw_capa->max_number_of_white_listed_ssid);
404+
capa->max_number_of_black_listed_ssid =
405+
le32_to_cpu(fw_capa->max_number_of_black_listed_ssid);
399406
}
400407

401408
/*
@@ -1023,8 +1030,15 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
10231030
le32_to_cpup((__le32 *)tlv_data);
10241031
break;
10251032
case IWL_UCODE_TLV_FW_GSCAN_CAPA:
1026-
if (iwl_store_gscan_capa(&drv->fw, tlv_data, tlv_len))
1027-
goto invalid_tlv_len;
1033+
/*
1034+
* Don't return an error in case of a shorter tlv_len
1035+
* to enable loading of FW that has an old format
1036+
* of GSCAN capabilities TLV.
1037+
*/
1038+
if (tlv_len < sizeof(struct iwl_fw_gscan_capabilities))
1039+
break;
1040+
1041+
iwl_store_gscan_capa(&drv->fw, tlv_data, tlv_len);
10281042
gscan_capa = true;
10291043
break;
10301044
default:
@@ -1046,12 +1060,8 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
10461060
return -EINVAL;
10471061
}
10481062

1049-
/*
1050-
* If ucode advertises that it supports GSCAN but GSCAN
1051-
* capabilities TLV is not present, warn and continue without GSCAN.
1052-
*/
1053-
if (fw_has_capa(capa, IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT) &&
1054-
WARN(!gscan_capa,
1063+
if (WARN(fw_has_capa(capa, IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT) &&
1064+
!gscan_capa,
10551065
"GSCAN is supported but capabilities TLV is unavailable\n"))
10561066
__clear_bit((__force long)IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT,
10571067
capa->_capa);

drivers/net/wireless/intel/iwlwifi/iwl-fh.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,12 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl)
511511
*/
512512
#define FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN (0x00000002)
513513

514-
#define MQ_RX_TABLE_SIZE 512
515-
#define MQ_RX_TABLE_MASK (MQ_RX_TABLE_SIZE - 1)
516-
#define MQ_RX_POOL_SIZE MQ_RX_TABLE_MASK
514+
#define MQ_RX_TABLE_SIZE 512
515+
#define MQ_RX_TABLE_MASK (MQ_RX_TABLE_SIZE - 1)
516+
#define MQ_RX_NUM_RBDS (MQ_RX_TABLE_SIZE - 1)
517+
#define RX_POOL_SIZE (MQ_RX_NUM_RBDS + \
518+
IWL_MAX_RX_HW_QUEUES * \
519+
(RX_CLAIM_REQ_ALLOC - RX_POST_REQ_ALLOC))
517520

518521
#define RX_QUEUE_SIZE 256
519522
#define RX_QUEUE_MASK 255

drivers/net/wireless/intel/iwlwifi/iwl-fw-file.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,12 @@ struct iwl_fw_dbg_conf_tlv {
809809
* change APs.
810810
* @max_bssid_history_entries: number of BSSID/RSSI entries that the device can
811811
* hold.
812+
* @max_hotlist_ssids: maximum number of entries for hotlist SSIDs.
813+
* @max_number_epno_networks: max number of epno entries.
814+
* @max_number_epno_networks_by_ssid: max number of epno entries if ssid is
815+
* specified.
816+
* @max_number_of_white_listed_ssid: max number of white listed SSIDs.
817+
* @max_number_of_black_listed_ssid: max number of black listed SSIDs.
812818
*/
813819
struct iwl_fw_gscan_capabilities {
814820
__le32 max_scan_cache_size;
@@ -819,6 +825,11 @@ struct iwl_fw_gscan_capabilities {
819825
__le32 max_hotlist_aps;
820826
__le32 max_significant_change_aps;
821827
__le32 max_bssid_history_entries;
828+
__le32 max_hotlist_ssids;
829+
__le32 max_number_epno_networks;
830+
__le32 max_number_epno_networks_by_ssid;
831+
__le32 max_number_of_white_listed_ssid;
832+
__le32 max_number_of_black_listed_ssid;
822833
} __packed;
823834

824835
#endif /* __iwl_fw_file_h__ */

drivers/net/wireless/intel/iwlwifi/iwl-fw.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*
88
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
99
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10+
* Copyright(c) 2016 Intel Deutschland GmbH
1011
*
1112
* This program is free software; you can redistribute it and/or modify
1213
* it under the terms of version 2 of the GNU General Public License as
@@ -33,6 +34,7 @@
3334
*
3435
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
3536
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
37+
* Copyright(c) 2016 Intel Deutschland GmbH
3638
* All rights reserved.
3739
*
3840
* Redistribution and use in source and binary forms, with or without
@@ -205,6 +207,12 @@ struct iwl_fw_cscheme_list {
205207
* change APs.
206208
* @max_bssid_history_entries: number of BSSID/RSSI entries that the device can
207209
* hold.
210+
* @max_hotlist_ssids: maximum number of entries for hotlist SSIDs.
211+
* @max_number_epno_networks: max number of epno entries.
212+
* @max_number_epno_networks_by_ssid: max number of epno entries if ssid is
213+
* specified.
214+
* @max_number_of_white_listed_ssid: max number of white listed SSIDs.
215+
* @max_number_of_black_listed_ssid: max number of black listed SSIDs.
208216
*/
209217
struct iwl_gscan_capabilities {
210218
u32 max_scan_cache_size;
@@ -215,6 +223,11 @@ struct iwl_gscan_capabilities {
215223
u32 max_hotlist_aps;
216224
u32 max_significant_change_aps;
217225
u32 max_bssid_history_entries;
226+
u32 max_hotlist_ssids;
227+
u32 max_number_epno_networks;
228+
u32 max_number_epno_networks_by_ssid;
229+
u32 max_number_of_white_listed_ssid;
230+
u32 max_number_of_black_listed_ssid;
218231
};
219232

220233
/**

0 commit comments

Comments
 (0)