Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f1059f

Browse files
committed
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== This pull request is intended for the 3.11 stream. It is a bit larger than usual, as it includes pulls from most of my feeder trees as well... For the Bluetooth bits, Gustavo says: "A few fixes and devices ID additions for 3.11: * There are 4 new ath3k device ids * Fixed stack memory usage in ath3k. * Fixed the init process of BlueFRITZ! devices, they were failing to init due to an unsupported command we sent. * Fixed wrong use of PTR_ERR in btusb code that was preventing intel devices to work properly. * Fixed race condition between hci_register_dev() and hci_dev_open() that could cause a NULL pointer dereference. * Fixed race condition that could call hci_req_cmd_complete() and make some devices to fail as showed in the log added to the commit message." Regarding the NFC bits, Samuel says: "We have: 1) A build failure fix for the NCI SPI transport layer due to a missing CRC_CCITT Kconfig dependency. 2) A netlink command rename: CMD_FW_UPLOAD was merged during the 3.11 merge window but the typical terminology for loading a firmware to a target is firmware download rather than upload. In order to avoid any confusion in a file exported to userspace, we rename this command to CMD_FW_DOWNLOAD." Samuel's item #2 isn't strictly a fix, but it seems safe and should avoid confusion in the future. As for the mac80211 bits, Johannes says: "I only have three fixes this time, a fix for a suspend regression, a patch correcting the initiator in regulatory code and one fix for mesh station powersave." With respect to the iwlwifi bits, Johannes says: "We have a scan fix for passive channels, a new PCI device ID for an old device, a NIC reset fix, an RF-Kill fix, a fix for powersave when GO interfaces are present as well as an aggregation session fix (for a corner case) and a workaround for a firmware design issue - it only supports a single GTK in D3." Bringing-up the rear with the Atheros trees, Kalle says: "Geert Uytterhoeven fixed an ath10k build problem when NO_DMA=y. I added a missing MAINTAINERS entry for ath10k and updated ath6kl git tree location." Along with the above... Arend van Spriel fixes a brcmfmac WARNING when unplugging the device. Avinash Patil proves a couple of minor mwifiex fixes relating to P2P mode. Luciano Coelho updates the MAINTAINERS entry for the wilink drivers. Stanislaw Gruszka brings an rt2x00 fix for a queue start/stop problem. Stone Piao fixes another mwifiex problem, a command timeout related to P2P mode. Tomasz Moń corrects an endian problem in mwifiex. I'll remind my feeder maintainers to slowdown the patchflow. Beyond that, please let me know if there are problems! ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents b00589a + 22e02a0 commit 1f1059f

File tree

32 files changed

+203
-116
lines changed

32 files changed

+203
-116
lines changed

MAINTAINERS

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ ATHEROS ATH6KL WIRELESS DRIVER
14061406
M: Kalle Valo <[email protected]>
14071407
14081408
W: http://wireless.kernel.org/en/users/Drivers/ath6kl
1409-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath6kl.git
1409+
T: git git://github.com/kvalo/ath.git
14101410
S: Supported
14111411
F: drivers/net/wireless/ath/ath6kl/
14121412

@@ -6726,6 +6726,14 @@ T: git git://linuxtv.org/anttip/media_tree.git
67266726
S: Maintained
67276727
F: drivers/media/tuners/qt1010*
67286728

6729+
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
6730+
M: Kalle Valo <[email protected]>
6731+
6732+
W: http://wireless.kernel.org/en/users/Drivers/ath10k
6733+
T: git git://github.com/kvalo/ath.git
6734+
S: Supported
6735+
F: drivers/net/wireless/ath/ath10k/
6736+
67296737
QUALCOMM HEXAGON ARCHITECTURE
67306738
M: Richard Kuo <[email protected]>
67316739
@@ -8270,7 +8278,7 @@ S: Maintained
82708278
F: sound/soc/codecs/twl4030*
82718279

82728280
TI WILINK WIRELESS DRIVERS
8273-
M: Luciano Coelho <[email protected]>
8281+
M: Luciano Coelho <[email protected]>
82748282
82758283
W: http://wireless.kernel.org/en/users/Drivers/wl12xx
82768284
W: http://wireless.kernel.org/en/users/Drivers/wl1251

drivers/bluetooth/ath3k.c

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ static struct usb_device_id ath3k_table[] = {
9191
{ USB_DEVICE(0x0489, 0xe04e) },
9292
{ USB_DEVICE(0x0489, 0xe056) },
9393
{ USB_DEVICE(0x0489, 0xe04d) },
94+
{ USB_DEVICE(0x04c5, 0x1330) },
95+
{ USB_DEVICE(0x13d3, 0x3402) },
96+
{ USB_DEVICE(0x0cf3, 0x3121) },
97+
{ USB_DEVICE(0x0cf3, 0xe003) },
9498

9599
/* Atheros AR5BBU12 with sflash firmware */
96100
{ USB_DEVICE(0x0489, 0xE02C) },
@@ -128,6 +132,10 @@ static struct usb_device_id ath3k_blist_tbl[] = {
128132
{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
129133
{ USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
130134
{ USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 },
135+
{ USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
136+
{ USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 },
137+
{ USB_DEVICE(0x0cf3, 0x3121), .driver_info = BTUSB_ATH3012 },
138+
{ USB_DEVICE(0x0cf3, 0xe003), .driver_info = BTUSB_ATH3012 },
131139

132140
/* Atheros AR5BBU22 with sflash firmware */
133141
{ USB_DEVICE(0x0489, 0xE03C), .driver_info = BTUSB_ATH3012 },
@@ -193,24 +201,44 @@ static int ath3k_load_firmware(struct usb_device *udev,
193201

194202
static int ath3k_get_state(struct usb_device *udev, unsigned char *state)
195203
{
196-
int pipe = 0;
204+
int ret, pipe = 0;
205+
char *buf;
206+
207+
buf = kmalloc(sizeof(*buf), GFP_KERNEL);
208+
if (!buf)
209+
return -ENOMEM;
197210

198211
pipe = usb_rcvctrlpipe(udev, 0);
199-
return usb_control_msg(udev, pipe, ATH3K_GETSTATE,
200-
USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
201-
state, 0x01, USB_CTRL_SET_TIMEOUT);
212+
ret = usb_control_msg(udev, pipe, ATH3K_GETSTATE,
213+
USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
214+
buf, sizeof(*buf), USB_CTRL_SET_TIMEOUT);
215+
216+
*state = *buf;
217+
kfree(buf);
218+
219+
return ret;
202220
}
203221

204222
static int ath3k_get_version(struct usb_device *udev,
205223
struct ath3k_version *version)
206224
{
207-
int pipe = 0;
225+
int ret, pipe = 0;
226+
struct ath3k_version *buf;
227+
const int size = sizeof(*buf);
228+
229+
buf = kmalloc(size, GFP_KERNEL);
230+
if (!buf)
231+
return -ENOMEM;
208232

209233
pipe = usb_rcvctrlpipe(udev, 0);
210-
return usb_control_msg(udev, pipe, ATH3K_GETVERSION,
211-
USB_TYPE_VENDOR | USB_DIR_IN, 0, 0, version,
212-
sizeof(struct ath3k_version),
213-
USB_CTRL_SET_TIMEOUT);
234+
ret = usb_control_msg(udev, pipe, ATH3K_GETVERSION,
235+
USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
236+
buf, size, USB_CTRL_SET_TIMEOUT);
237+
238+
memcpy(version, buf, size);
239+
kfree(buf);
240+
241+
return ret;
214242
}
215243

216244
static int ath3k_load_fwfile(struct usb_device *udev,

drivers/bluetooth/btusb.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ static struct usb_device_id blacklist_table[] = {
154154
{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
155155
{ USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
156156
{ USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 },
157+
{ USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
158+
{ USB_DEVICE(0x13d3, 0x3402), .driver_info = BTUSB_ATH3012 },
159+
{ USB_DEVICE(0x0cf3, 0x3121), .driver_info = BTUSB_ATH3012 },
160+
{ USB_DEVICE(0x0cf3, 0xe003), .driver_info = BTUSB_ATH3012 },
157161

158162
/* Atheros AR5BBU12 with sflash firmware */
159163
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
@@ -1095,7 +1099,7 @@ static int btusb_setup_intel_patching(struct hci_dev *hdev,
10951099
if (IS_ERR(skb)) {
10961100
BT_ERR("%s sending Intel patch command (0x%4.4x) failed (%ld)",
10971101
hdev->name, cmd->opcode, PTR_ERR(skb));
1098-
return -PTR_ERR(skb);
1102+
return PTR_ERR(skb);
10991103
}
11001104

11011105
/* It ensures that the returned event matches the event data read from
@@ -1147,7 +1151,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
11471151
if (IS_ERR(skb)) {
11481152
BT_ERR("%s sending initial HCI reset command failed (%ld)",
11491153
hdev->name, PTR_ERR(skb));
1150-
return -PTR_ERR(skb);
1154+
return PTR_ERR(skb);
11511155
}
11521156
kfree_skb(skb);
11531157

@@ -1161,7 +1165,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
11611165
if (IS_ERR(skb)) {
11621166
BT_ERR("%s reading Intel fw version command failed (%ld)",
11631167
hdev->name, PTR_ERR(skb));
1164-
return -PTR_ERR(skb);
1168+
return PTR_ERR(skb);
11651169
}
11661170

11671171
if (skb->len != sizeof(*ver)) {
@@ -1219,7 +1223,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
12191223
BT_ERR("%s entering Intel manufacturer mode failed (%ld)",
12201224
hdev->name, PTR_ERR(skb));
12211225
release_firmware(fw);
1222-
return -PTR_ERR(skb);
1226+
return PTR_ERR(skb);
12231227
}
12241228

12251229
if (skb->data[0]) {
@@ -1276,7 +1280,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
12761280
if (IS_ERR(skb)) {
12771281
BT_ERR("%s exiting Intel manufacturer mode failed (%ld)",
12781282
hdev->name, PTR_ERR(skb));
1279-
return -PTR_ERR(skb);
1283+
return PTR_ERR(skb);
12801284
}
12811285
kfree_skb(skb);
12821286

@@ -1292,7 +1296,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
12921296
if (IS_ERR(skb)) {
12931297
BT_ERR("%s exiting Intel manufacturer mode failed (%ld)",
12941298
hdev->name, PTR_ERR(skb));
1295-
return -PTR_ERR(skb);
1299+
return PTR_ERR(skb);
12961300
}
12971301
kfree_skb(skb);
12981302

@@ -1310,7 +1314,7 @@ static int btusb_setup_intel(struct hci_dev *hdev)
13101314
if (IS_ERR(skb)) {
13111315
BT_ERR("%s exiting Intel manufacturer mode failed (%ld)",
13121316
hdev->name, PTR_ERR(skb));
1313-
return -PTR_ERR(skb);
1317+
return PTR_ERR(skb);
13141318
}
13151319
kfree_skb(skb);
13161320

drivers/net/wireless/ath/ath10k/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config ATH10K
22
tristate "Atheros 802.11ac wireless cards support"
3-
depends on MAC80211
3+
depends on MAC80211 && HAS_DMA
44
select ATH_COMMON
55
---help---
66
This module adds support for wireless adapters based on

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,11 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif)
10931093
brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n ");
10941094
err = brcmf_fil_cmd_data_set(vif->ifp,
10951095
BRCMF_C_DISASSOC, NULL, 0);
1096-
if (err)
1096+
if (err) {
10971097
brcmf_err("WLC_DISASSOC failed (%d)\n", err);
1098+
cfg80211_disconnected(vif->wdev.netdev, 0,
1099+
NULL, 0, GFP_KERNEL);
1100+
}
10981101
clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state);
10991102
}
11001103
clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state);

drivers/net/wireless/iwlwifi/iwl-prph.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@
9797

9898
#define APMG_PCIDEV_STT_VAL_L1_ACT_DIS (0x00000800)
9999

100+
#define APMG_RTC_INT_STT_RFKILL (0x10000000)
101+
100102
/* Device system time */
101103
#define DEVICE_SYSTEM_TIME_REG 0xA0206C
102104

drivers/net/wireless/iwlwifi/mvm/d3.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct wowlan_key_data {
134134
struct iwl_wowlan_rsc_tsc_params_cmd *rsc_tsc;
135135
struct iwl_wowlan_tkip_params_cmd *tkip;
136136
bool error, use_rsc_tsc, use_tkip;
137-
int gtk_key_idx;
137+
int wep_key_idx;
138138
};
139139

140140
static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
@@ -188,8 +188,8 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
188188
wkc.wep_key.key_offset = 0;
189189
} else {
190190
/* others start at 1 */
191-
data->gtk_key_idx++;
192-
wkc.wep_key.key_offset = data->gtk_key_idx;
191+
data->wep_key_idx++;
192+
wkc.wep_key.key_offset = data->wep_key_idx;
193193
}
194194

195195
ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, CMD_SYNC,
@@ -316,8 +316,13 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
316316
mvm->ptk_ivlen = key->iv_len;
317317
mvm->ptk_icvlen = key->icv_len;
318318
} else {
319-
data->gtk_key_idx++;
320-
key->hw_key_idx = data->gtk_key_idx;
319+
/*
320+
* firmware only supports TSC/RSC for a single key,
321+
* so if there are multiple keep overwriting them
322+
* with new ones -- this relies on mac80211 doing
323+
* list_add_tail().
324+
*/
325+
key->hw_key_idx = 1;
321326
mvm->gtk_ivlen = key->iv_len;
322327
mvm->gtk_icvlen = key->icv_len;
323328
}

drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
/* Scan Commands, Responses, Notifications */
7070

7171
/* Masks for iwl_scan_channel.type flags */
72-
#define SCAN_CHANNEL_TYPE_PASSIVE 0
7372
#define SCAN_CHANNEL_TYPE_ACTIVE BIT(0)
7473
#define SCAN_CHANNEL_NARROW_BAND BIT(22)
7574

drivers/net/wireless/iwlwifi/mvm/mac80211.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,27 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
511511
if (ret)
512512
goto out_unlock;
513513

514+
/*
515+
* TODO: remove this temporary code.
516+
* Currently MVM FW supports power management only on single MAC.
517+
* If new interface added, disable PM on existing interface.
518+
* P2P device is a special case, since it is handled by FW similary to
519+
* scan. If P2P deviced is added, PM remains enabled on existing
520+
* interface.
521+
* Note: the method below does not count the new interface being added
522+
* at this moment.
523+
*/
524+
if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
525+
mvm->vif_count++;
526+
if (mvm->vif_count > 1) {
527+
IWL_DEBUG_MAC80211(mvm,
528+
"Disable power on existing interfaces\n");
529+
ieee80211_iterate_active_interfaces_atomic(
530+
mvm->hw,
531+
IEEE80211_IFACE_ITER_NORMAL,
532+
iwl_mvm_pm_disable_iterator, mvm);
533+
}
534+
514535
/*
515536
* The AP binding flow can be done only after the beacon
516537
* template is configured (which happens only in the mac80211
@@ -534,27 +555,6 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
534555
goto out_unlock;
535556
}
536557

537-
/*
538-
* TODO: remove this temporary code.
539-
* Currently MVM FW supports power management only on single MAC.
540-
* If new interface added, disable PM on existing interface.
541-
* P2P device is a special case, since it is handled by FW similary to
542-
* scan. If P2P deviced is added, PM remains enabled on existing
543-
* interface.
544-
* Note: the method below does not count the new interface being added
545-
* at this moment.
546-
*/
547-
if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
548-
mvm->vif_count++;
549-
if (mvm->vif_count > 1) {
550-
IWL_DEBUG_MAC80211(mvm,
551-
"Disable power on existing interfaces\n");
552-
ieee80211_iterate_active_interfaces_atomic(
553-
mvm->hw,
554-
IEEE80211_IFACE_ITER_NORMAL,
555-
iwl_mvm_pm_disable_iterator, mvm);
556-
}
557-
558558
ret = iwl_mvm_mac_ctxt_add(mvm, vif);
559559
if (ret)
560560
goto out_release;

drivers/net/wireless/iwlwifi/mvm/scan.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,12 @@ static void iwl_mvm_scan_fill_channels(struct iwl_scan_cmd *cmd,
178178
struct iwl_scan_channel *chan = (struct iwl_scan_channel *)
179179
(cmd->data + le16_to_cpu(cmd->tx_cmd.len));
180180
int i;
181-
__le32 chan_type_value;
182-
183-
if (req->n_ssids > 0)
184-
chan_type_value = cpu_to_le32(BIT(req->n_ssids) - 1);
185-
else
186-
chan_type_value = SCAN_CHANNEL_TYPE_PASSIVE;
187181

188182
for (i = 0; i < cmd->channel_count; i++) {
189183
chan->channel = cpu_to_le16(req->channels[i]->hw_value);
184+
chan->type = cpu_to_le32(BIT(req->n_ssids) - 1);
190185
if (req->channels[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN)
191-
chan->type = SCAN_CHANNEL_TYPE_PASSIVE;
192-
else
193-
chan->type = chan_type_value;
186+
chan->type &= cpu_to_le32(~SCAN_CHANNEL_TYPE_ACTIVE);
194187
chan->active_dwell = cpu_to_le16(active_dwell);
195188
chan->passive_dwell = cpu_to_le16(passive_dwell);
196189
chan->iteration_count = cpu_to_le16(1);

0 commit comments

Comments
 (0)