aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-09-06 09:55:50 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-09-06 09:56:02 -0400
commit944b9e375d89271c39995d363f62cb91734fae5f (patch)
treebd6014bd0be251cdf2b32b12ca8a62e55742c0ee /net/mac80211
parenta4ed53466a289a4139405bf7190c78a8e9d8debf (diff)
parent7ce8c7a3433c6d6f4adfec0611d250782f0b4b0c (diff)
Merge remote-tracking branch 'mac80211/master' into mac80211-next
Pull in mac80211.git to let the next patch apply without conflicts, also resolving a hwsim conflict. Conflicts: drivers/net/wireless/mac80211_hwsim.c Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c9
-rw-r--r--net/mac80211/mesh.c3
-rw-r--r--net/mac80211/mlme.c6
-rw-r--r--net/mac80211/scan.c3
-rw-r--r--net/mac80211/tx.c38
5 files changed, 30 insertions, 29 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 929f897a8ded..03fe6d1cff42 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1389,6 +1389,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
1389 else 1389 else
1390 memset(next_hop, 0, ETH_ALEN); 1390 memset(next_hop, 0, ETH_ALEN);
1391 1391
1392 memset(pinfo, 0, sizeof(*pinfo));
1393
1392 pinfo->generation = mesh_paths_generation; 1394 pinfo->generation = mesh_paths_generation;
1393 1395
1394 pinfo->filled = MPATH_INFO_FRAME_QLEN | 1396 pinfo->filled = MPATH_INFO_FRAME_QLEN |
@@ -1407,7 +1409,6 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
1407 pinfo->discovery_timeout = 1409 pinfo->discovery_timeout =
1408 jiffies_to_msecs(mpath->discovery_timeout); 1410 jiffies_to_msecs(mpath->discovery_timeout);
1409 pinfo->discovery_retries = mpath->discovery_retries; 1411 pinfo->discovery_retries = mpath->discovery_retries;
1410 pinfo->flags = 0;
1411 if (mpath->flags & MESH_PATH_ACTIVE) 1412 if (mpath->flags & MESH_PATH_ACTIVE)
1412 pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE; 1413 pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE;
1413 if (mpath->flags & MESH_PATH_RESOLVING) 1414 if (mpath->flags & MESH_PATH_RESOLVING)
@@ -1416,10 +1417,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
1416 pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID; 1417 pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID;
1417 if (mpath->flags & MESH_PATH_FIXED) 1418 if (mpath->flags & MESH_PATH_FIXED)
1418 pinfo->flags |= NL80211_MPATH_FLAG_FIXED; 1419 pinfo->flags |= NL80211_MPATH_FLAG_FIXED;
1419 if (mpath->flags & MESH_PATH_RESOLVING) 1420 if (mpath->flags & MESH_PATH_RESOLVED)
1420 pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING; 1421 pinfo->flags |= NL80211_MPATH_FLAG_RESOLVED;
1421
1422 pinfo->flags = mpath->flags;
1423} 1422}
1424 1423
1425static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev, 1424static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev,
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index f2d0d213bcfb..5f37add1571e 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -632,6 +632,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
632 632
633 del_timer_sync(&sdata->u.mesh.housekeeping_timer); 633 del_timer_sync(&sdata->u.mesh.housekeeping_timer);
634 del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); 634 del_timer_sync(&sdata->u.mesh.mesh_path_root_timer);
635 del_timer_sync(&sdata->u.mesh.mesh_path_timer);
635 /* 636 /*
636 * If the timer fired while we waited for it, it will have 637 * If the timer fired while we waited for it, it will have
637 * requeued the work. Now the work will be running again 638 * requeued the work. Now the work will be running again
@@ -644,6 +645,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
644 local->fif_other_bss--; 645 local->fif_other_bss--;
645 atomic_dec(&local->iff_allmultis); 646 atomic_dec(&local->iff_allmultis);
646 ieee80211_configure_filter(local); 647 ieee80211_configure_filter(local);
648
649 sdata->u.mesh.timers_running = 0;
647} 650}
648 651
649static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, 652static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b65b2149b23b..5d77650d4363 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1467,6 +1467,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1467 del_timer_sync(&sdata->u.mgd.bcn_mon_timer); 1467 del_timer_sync(&sdata->u.mgd.bcn_mon_timer);
1468 del_timer_sync(&sdata->u.mgd.timer); 1468 del_timer_sync(&sdata->u.mgd.timer);
1469 del_timer_sync(&sdata->u.mgd.chswitch_timer); 1469 del_timer_sync(&sdata->u.mgd.chswitch_timer);
1470
1471 sdata->u.mgd.timers_running = 0;
1470} 1472}
1471 1473
1472void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, 1474void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
@@ -3298,6 +3300,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
3298 goto out_unlock; 3300 goto out_unlock;
3299 3301
3300 err_clear: 3302 err_clear:
3303 memset(ifmgd->bssid, 0, ETH_ALEN);
3304 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
3301 ifmgd->auth_data = NULL; 3305 ifmgd->auth_data = NULL;
3302 err_free: 3306 err_free:
3303 kfree(auth_data); 3307 kfree(auth_data);
@@ -3506,6 +3510,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
3506 err = 0; 3510 err = 0;
3507 goto out; 3511 goto out;
3508 err_clear: 3512 err_clear:
3513 memset(ifmgd->bssid, 0, ETH_ALEN);
3514 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
3509 ifmgd->assoc_data = NULL; 3515 ifmgd->assoc_data = NULL;
3510 err_free: 3516 err_free:
3511 kfree(assoc_data); 3517 kfree(assoc_data);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index ef1d69306315..740e414d44f4 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -299,7 +299,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
299 if (local->scan_req != local->int_scan_req) 299 if (local->scan_req != local->int_scan_req)
300 cfg80211_scan_done(local->scan_req, aborted); 300 cfg80211_scan_done(local->scan_req, aborted);
301 local->scan_req = NULL; 301 local->scan_req = NULL;
302 local->scan_sdata = NULL; 302 rcu_assign_pointer(local->scan_sdata, NULL);
303 303
304 local->scanning = 0; 304 local->scanning = 0;
305 local->scan_channel = NULL; 305 local->scan_channel = NULL;
@@ -984,7 +984,6 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
984 kfree(local->sched_scan_ies.ie[i]); 984 kfree(local->sched_scan_ies.ie[i]);
985 985
986 drv_sched_scan_stop(local, sdata); 986 drv_sched_scan_stop(local, sdata);
987 rcu_assign_pointer(local->sched_scan_sdata, NULL);
988 } 987 }
989out: 988out:
990 mutex_unlock(&local->mtx); 989 mutex_unlock(&local->mtx);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3b807bcb8fc9..29eb4e678235 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1807,37 +1807,31 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1807 meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, 1807 meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
1808 sdata, NULL, NULL); 1808 sdata, NULL, NULL);
1809 } else { 1809 } else {
1810 int is_mesh_mcast = 1; 1810 /* DS -> MBSS (802.11-2012 13.11.3.3).
1811 const u8 *mesh_da; 1811 * For unicast with unknown forwarding information,
1812 * destination might be in the MBSS or if that fails
1813 * forwarded to another mesh gate. In either case
1814 * resolution will be handled in ieee80211_xmit(), so
1815 * leave the original DA. This also works for mcast */
1816 const u8 *mesh_da = skb->data;
1817
1818 if (mppath)
1819 mesh_da = mppath->mpp;
1820 else if (mpath)
1821 mesh_da = mpath->dst;
1822 rcu_read_unlock();
1812 1823
1813 if (is_multicast_ether_addr(skb->data))
1814 /* DA TA mSA AE:SA */
1815 mesh_da = skb->data;
1816 else {
1817 static const u8 bcast[ETH_ALEN] =
1818 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
1819 if (mppath) {
1820 /* RA TA mDA mSA AE:DA SA */
1821 mesh_da = mppath->mpp;
1822 is_mesh_mcast = 0;
1823 } else if (mpath) {
1824 mesh_da = mpath->dst;
1825 is_mesh_mcast = 0;
1826 } else {
1827 /* DA TA mSA AE:SA */
1828 mesh_da = bcast;
1829 }
1830 }
1831 hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, 1824 hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc,
1832 mesh_da, sdata->vif.addr); 1825 mesh_da, sdata->vif.addr);
1833 rcu_read_unlock(); 1826 if (is_multicast_ether_addr(mesh_da))
1834 if (is_mesh_mcast) 1827 /* DA TA mSA AE:SA */
1835 meshhdrlen = 1828 meshhdrlen =
1836 ieee80211_new_mesh_header(&mesh_hdr, 1829 ieee80211_new_mesh_header(&mesh_hdr,
1837 sdata, 1830 sdata,
1838 skb->data + ETH_ALEN, 1831 skb->data + ETH_ALEN,
1839 NULL); 1832 NULL);
1840 else 1833 else
1834 /* RA TA mDA mSA AE:DA SA */
1841 meshhdrlen = 1835 meshhdrlen =
1842 ieee80211_new_mesh_header(&mesh_hdr, 1836 ieee80211_new_mesh_header(&mesh_hdr,
1843 sdata, 1837 sdata,