aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-05-31 05:38:19 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-31 05:38:19 -0400
commitfb68e2f43887582fde8c03613ae10e7fd5405bb5 (patch)
tree72302e270e036294fcef83cbe0ccdd0d2c2f7ec2 /net
parent01e5b2c4559d084f4eaf0d160d84cc185db141ba (diff)
parent50cc1cab4cfc8ab32dc6ae470c271cdf65e82de3 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== Please pull this batch of fixes intended for the 3.10 stream... Regarding the NFC bits, Samuel says: "This is the first batch of NFC fixes for 3.10, and it contains: - 3 fixes for the NFC MEI support: * We now depend on the correct Kconfig symbol. * We register an MEI event callback whenever we enable an NFC device, otherwise we fail to read anything after an enable/disable cycle. * We only disable an MEI device from its disable mey_phy_ops, preventing useless consecutive disable calls. - An NFC Makefile cleanup, as I forgot to remove a commented out line when moving the LLCP code to the NFC top level directory." As for the mac80211 bits, Johannes says: "This time I have a fix from Stanislaw for a stupid mistake I made in the auth/assoc timeout changes, a fix from Felix for 64-bit traffic counters and one from Helmut for address mask handling in mac80211. I also have a few fixes myself for four different crashes reported by a few people." And Johannes says this about the iwlwifi bit: "This fixes a brown paper-bag bug that we really should've caught in review. More details in the changelog for the fix." On top of that... Arend van Spriel and Hante Meuleman cooperate to send a series of AP and P2P mode fixes for brcmfmac. Gabor Juhos corrects a register offset for AR9550, avoiding a bus error. Dan Carpenter provides a fixup to some dmesg output in the atmel driver. And, finally... Felix Fietkau not only gives us a trio of small AR934x fixes, but also refactors the ath9k aggregation session start/stop handling (using the generic mac80211 support) in order to avoid a deadlock. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/iface.c44
-rw-r--r--net/mac80211/mlme.c12
-rw-r--r--net/nfc/Makefile1
-rw-r--r--net/wireless/nl80211.c2
-rw-r--r--net/wireless/sme.c3
5 files changed, 47 insertions, 15 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 60f1ce5e5e52..98d20c0f6fed 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -159,9 +159,10 @@ static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
159 return 0; 159 return 0;
160} 160}
161 161
162static int ieee80211_verify_mac(struct ieee80211_local *local, u8 *addr) 162static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr)
163{ 163{
164 struct ieee80211_sub_if_data *sdata; 164 struct ieee80211_local *local = sdata->local;
165 struct ieee80211_sub_if_data *iter;
165 u64 new, mask, tmp; 166 u64 new, mask, tmp;
166 u8 *m; 167 u8 *m;
167 int ret = 0; 168 int ret = 0;
@@ -181,11 +182,14 @@ static int ieee80211_verify_mac(struct ieee80211_local *local, u8 *addr)
181 182
182 183
183 mutex_lock(&local->iflist_mtx); 184 mutex_lock(&local->iflist_mtx);
184 list_for_each_entry(sdata, &local->interfaces, list) { 185 list_for_each_entry(iter, &local->interfaces, list) {
185 if (sdata->vif.type == NL80211_IFTYPE_MONITOR) 186 if (iter == sdata)
187 continue;
188
189 if (iter->vif.type == NL80211_IFTYPE_MONITOR)
186 continue; 190 continue;
187 191
188 m = sdata->vif.addr; 192 m = iter->vif.addr;
189 tmp = ((u64)m[0] << 5*8) | ((u64)m[1] << 4*8) | 193 tmp = ((u64)m[0] << 5*8) | ((u64)m[1] << 4*8) |
190 ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) | 194 ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) |
191 ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8); 195 ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8);
@@ -209,7 +213,7 @@ static int ieee80211_change_mac(struct net_device *dev, void *addr)
209 if (ieee80211_sdata_running(sdata)) 213 if (ieee80211_sdata_running(sdata))
210 return -EBUSY; 214 return -EBUSY;
211 215
212 ret = ieee80211_verify_mac(sdata->local, sa->sa_data); 216 ret = ieee80211_verify_mac(sdata, sa->sa_data);
213 if (ret) 217 if (ret)
214 return ret; 218 return ret;
215 219
@@ -474,6 +478,9 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
474 master->control_port_protocol; 478 master->control_port_protocol;
475 sdata->control_port_no_encrypt = 479 sdata->control_port_no_encrypt =
476 master->control_port_no_encrypt; 480 master->control_port_no_encrypt;
481 sdata->vif.cab_queue = master->vif.cab_queue;
482 memcpy(sdata->vif.hw_queue, master->vif.hw_queue,
483 sizeof(sdata->vif.hw_queue));
477 break; 484 break;
478 } 485 }
479 case NL80211_IFTYPE_AP: 486 case NL80211_IFTYPE_AP:
@@ -653,7 +660,11 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
653 660
654 ieee80211_recalc_ps(local, -1); 661 ieee80211_recalc_ps(local, -1);
655 662
656 if (dev) { 663 if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
664 sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
665 /* XXX: for AP_VLAN, actually track AP queues */
666 netif_tx_start_all_queues(dev);
667 } else if (dev) {
657 unsigned long flags; 668 unsigned long flags;
658 int n_acs = IEEE80211_NUM_ACS; 669 int n_acs = IEEE80211_NUM_ACS;
659 int ac; 670 int ac;
@@ -1479,7 +1490,17 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
1479 break; 1490 break;
1480 } 1491 }
1481 1492
1493 /*
1494 * Pick address of existing interface in case user changed
1495 * MAC address manually, default to perm_addr.
1496 */
1482 m = local->hw.wiphy->perm_addr; 1497 m = local->hw.wiphy->perm_addr;
1498 list_for_each_entry(sdata, &local->interfaces, list) {
1499 if (sdata->vif.type == NL80211_IFTYPE_MONITOR)
1500 continue;
1501 m = sdata->vif.addr;
1502 break;
1503 }
1483 start = ((u64)m[0] << 5*8) | ((u64)m[1] << 4*8) | 1504 start = ((u64)m[0] << 5*8) | ((u64)m[1] << 4*8) |
1484 ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) | 1505 ((u64)m[2] << 3*8) | ((u64)m[3] << 2*8) |
1485 ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8); 1506 ((u64)m[4] << 1*8) | ((u64)m[5] << 0*8);
@@ -1696,6 +1717,15 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
1696 1717
1697 ASSERT_RTNL(); 1718 ASSERT_RTNL();
1698 1719
1720 /*
1721 * Close all AP_VLAN interfaces first, as otherwise they
1722 * might be closed while the AP interface they belong to
1723 * is closed, causing unregister_netdevice_many() to crash.
1724 */
1725 list_for_each_entry(sdata, &local->interfaces, list)
1726 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
1727 dev_close(sdata->dev);
1728
1699 mutex_lock(&local->iflist_mtx); 1729 mutex_lock(&local->iflist_mtx);
1700 list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) { 1730 list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
1701 list_del(&sdata->list); 1731 list_del(&sdata->list);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a46e490f20dd..a8c2130c8ba4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3321,10 +3321,6 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
3321 if (WARN_ON_ONCE(!auth_data)) 3321 if (WARN_ON_ONCE(!auth_data))
3322 return -EINVAL; 3322 return -EINVAL;
3323 3323
3324 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
3325 tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
3326 IEEE80211_TX_INTFL_MLME_CONN_TX;
3327
3328 auth_data->tries++; 3324 auth_data->tries++;
3329 3325
3330 if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { 3326 if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) {
@@ -3358,6 +3354,10 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
3358 auth_data->expected_transaction = trans; 3354 auth_data->expected_transaction = trans;
3359 } 3355 }
3360 3356
3357 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
3358 tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
3359 IEEE80211_TX_INTFL_MLME_CONN_TX;
3360
3361 ieee80211_send_auth(sdata, trans, auth_data->algorithm, status, 3361 ieee80211_send_auth(sdata, trans, auth_data->algorithm, status,
3362 auth_data->data, auth_data->data_len, 3362 auth_data->data, auth_data->data_len,
3363 auth_data->bss->bssid, 3363 auth_data->bss->bssid,
@@ -3381,12 +3381,12 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
3381 * will not answer to direct packet in unassociated state. 3381 * will not answer to direct packet in unassociated state.
3382 */ 3382 */
3383 ieee80211_send_probe_req(sdata, NULL, ssidie + 2, ssidie[1], 3383 ieee80211_send_probe_req(sdata, NULL, ssidie + 2, ssidie[1],
3384 NULL, 0, (u32) -1, true, tx_flags, 3384 NULL, 0, (u32) -1, true, 0,
3385 auth_data->bss->channel, false); 3385 auth_data->bss->channel, false);
3386 rcu_read_unlock(); 3386 rcu_read_unlock();
3387 } 3387 }
3388 3388
3389 if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { 3389 if (tx_flags == 0) {
3390 auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; 3390 auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
3391 ifmgd->auth_data->timeout_started = true; 3391 ifmgd->auth_data->timeout_started = true;
3392 run_again(ifmgd, auth_data->timeout); 3392 run_again(ifmgd, auth_data->timeout);
diff --git a/net/nfc/Makefile b/net/nfc/Makefile
index fb799deaed4f..a76f4533cb6c 100644
--- a/net/nfc/Makefile
+++ b/net/nfc/Makefile
@@ -5,7 +5,6 @@
5obj-$(CONFIG_NFC) += nfc.o 5obj-$(CONFIG_NFC) += nfc.o
6obj-$(CONFIG_NFC_NCI) += nci/ 6obj-$(CONFIG_NFC_NCI) += nci/
7obj-$(CONFIG_NFC_HCI) += hci/ 7obj-$(CONFIG_NFC_HCI) += hci/
8#obj-$(CONFIG_NFC_LLCP) += llcp/
9 8
10nfc-objs := core.o netlink.o af_nfc.o rawsock.o llcp_core.o llcp_commands.o \ 9nfc-objs := core.o netlink.o af_nfc.o rawsock.o llcp_core.o llcp_commands.o \
11 llcp_sock.o 10 llcp_sock.o
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index dfdb5e643211..d5aed3bb3945 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3411,7 +3411,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 portid, u32 seq,
3411 (u32)sinfo->rx_bytes)) 3411 (u32)sinfo->rx_bytes))
3412 goto nla_put_failure; 3412 goto nla_put_failure;
3413 if ((sinfo->filled & (STATION_INFO_TX_BYTES | 3413 if ((sinfo->filled & (STATION_INFO_TX_BYTES |
3414 NL80211_STA_INFO_TX_BYTES64)) && 3414 STATION_INFO_TX_BYTES64)) &&
3415 nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES, 3415 nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES,
3416 (u32)sinfo->tx_bytes)) 3416 (u32)sinfo->tx_bytes))
3417 goto nla_put_failure; 3417 goto nla_put_failure;
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 8b5eddfba1e5..3ed35c345cae 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -231,6 +231,9 @@ void cfg80211_conn_work(struct work_struct *work)
231 mutex_lock(&rdev->sched_scan_mtx); 231 mutex_lock(&rdev->sched_scan_mtx);
232 232
233 list_for_each_entry(wdev, &rdev->wdev_list, list) { 233 list_for_each_entry(wdev, &rdev->wdev_list, list) {
234 if (!wdev->netdev)
235 continue;
236
234 wdev_lock(wdev); 237 wdev_lock(wdev);
235 if (!netif_running(wdev->netdev)) { 238 if (!netif_running(wdev->netdev)) {
236 wdev_unlock(wdev); 239 wdev_unlock(wdev);