diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 9 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 3 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 6 | ||||
-rw-r--r-- | net/mac80211/scan.c | 3 | ||||
-rw-r--r-- | net/mac80211/tx.c | 38 |
5 files changed, 30 insertions, 29 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d41974aacf51..a58c0b649ba1 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1378,6 +1378,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |||
1378 | else | 1378 | else |
1379 | memset(next_hop, 0, ETH_ALEN); | 1379 | memset(next_hop, 0, ETH_ALEN); |
1380 | 1380 | ||
1381 | memset(pinfo, 0, sizeof(*pinfo)); | ||
1382 | |||
1381 | pinfo->generation = mesh_paths_generation; | 1383 | pinfo->generation = mesh_paths_generation; |
1382 | 1384 | ||
1383 | pinfo->filled = MPATH_INFO_FRAME_QLEN | | 1385 | pinfo->filled = MPATH_INFO_FRAME_QLEN | |
@@ -1396,7 +1398,6 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |||
1396 | pinfo->discovery_timeout = | 1398 | pinfo->discovery_timeout = |
1397 | jiffies_to_msecs(mpath->discovery_timeout); | 1399 | jiffies_to_msecs(mpath->discovery_timeout); |
1398 | pinfo->discovery_retries = mpath->discovery_retries; | 1400 | pinfo->discovery_retries = mpath->discovery_retries; |
1399 | pinfo->flags = 0; | ||
1400 | if (mpath->flags & MESH_PATH_ACTIVE) | 1401 | if (mpath->flags & MESH_PATH_ACTIVE) |
1401 | pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE; | 1402 | pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE; |
1402 | if (mpath->flags & MESH_PATH_RESOLVING) | 1403 | if (mpath->flags & MESH_PATH_RESOLVING) |
@@ -1405,10 +1406,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop, | |||
1405 | pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID; | 1406 | pinfo->flags |= NL80211_MPATH_FLAG_SN_VALID; |
1406 | if (mpath->flags & MESH_PATH_FIXED) | 1407 | if (mpath->flags & MESH_PATH_FIXED) |
1407 | pinfo->flags |= NL80211_MPATH_FLAG_FIXED; | 1408 | pinfo->flags |= NL80211_MPATH_FLAG_FIXED; |
1408 | if (mpath->flags & MESH_PATH_RESOLVING) | 1409 | if (mpath->flags & MESH_PATH_RESOLVED) |
1409 | pinfo->flags |= NL80211_MPATH_FLAG_RESOLVING; | 1410 | pinfo->flags |= NL80211_MPATH_FLAG_RESOLVED; |
1410 | |||
1411 | pinfo->flags = mpath->flags; | ||
1412 | } | 1411 | } |
1413 | 1412 | ||
1414 | static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev, | 1413 | static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev, |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 6fac18c0423f..85572353a7e3 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -622,6 +622,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) | |||
622 | 622 | ||
623 | del_timer_sync(&sdata->u.mesh.housekeeping_timer); | 623 | del_timer_sync(&sdata->u.mesh.housekeeping_timer); |
624 | del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); | 624 | del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); |
625 | del_timer_sync(&sdata->u.mesh.mesh_path_timer); | ||
625 | /* | 626 | /* |
626 | * If the timer fired while we waited for it, it will have | 627 | * If the timer fired while we waited for it, it will have |
627 | * requeued the work. Now the work will be running again | 628 | * requeued the work. Now the work will be running again |
@@ -634,6 +635,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) | |||
634 | local->fif_other_bss--; | 635 | local->fif_other_bss--; |
635 | atomic_dec(&local->iff_allmultis); | 636 | atomic_dec(&local->iff_allmultis); |
636 | ieee80211_configure_filter(local); | 637 | ieee80211_configure_filter(local); |
638 | |||
639 | sdata->u.mesh.timers_running = 0; | ||
637 | } | 640 | } |
638 | 641 | ||
639 | static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, | 642 | static 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 cef0c9e79aba..f76b83341cf9 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1430,6 +1430,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1430 | del_timer_sync(&sdata->u.mgd.bcn_mon_timer); | 1430 | del_timer_sync(&sdata->u.mgd.bcn_mon_timer); |
1431 | del_timer_sync(&sdata->u.mgd.timer); | 1431 | del_timer_sync(&sdata->u.mgd.timer); |
1432 | del_timer_sync(&sdata->u.mgd.chswitch_timer); | 1432 | del_timer_sync(&sdata->u.mgd.chswitch_timer); |
1433 | |||
1434 | sdata->u.mgd.timers_running = 0; | ||
1433 | } | 1435 | } |
1434 | 1436 | ||
1435 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | 1437 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, |
@@ -3246,6 +3248,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, | |||
3246 | goto out_unlock; | 3248 | goto out_unlock; |
3247 | 3249 | ||
3248 | err_clear: | 3250 | err_clear: |
3251 | memset(ifmgd->bssid, 0, ETH_ALEN); | ||
3252 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); | ||
3249 | ifmgd->auth_data = NULL; | 3253 | ifmgd->auth_data = NULL; |
3250 | err_free: | 3254 | err_free: |
3251 | kfree(auth_data); | 3255 | kfree(auth_data); |
@@ -3437,6 +3441,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3437 | err = 0; | 3441 | err = 0; |
3438 | goto out; | 3442 | goto out; |
3439 | err_clear: | 3443 | err_clear: |
3444 | memset(ifmgd->bssid, 0, ETH_ALEN); | ||
3445 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); | ||
3440 | ifmgd->assoc_data = NULL; | 3446 | ifmgd->assoc_data = NULL; |
3441 | err_free: | 3447 | err_free: |
3442 | kfree(assoc_data); | 3448 | kfree(assoc_data); |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index bcaee5d12839..839dd9737989 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 | } |
989 | out: | 988 | out: |
990 | mutex_unlock(&local->mtx); | 989 | mutex_unlock(&local->mtx); |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index acf712ffb5e6..c5e8c9c31f76 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1811,37 +1811,31 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1811 | meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, | 1811 | meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, |
1812 | sdata, NULL, NULL); | 1812 | sdata, NULL, NULL); |
1813 | } else { | 1813 | } else { |
1814 | int is_mesh_mcast = 1; | 1814 | /* DS -> MBSS (802.11-2012 13.11.3.3). |
1815 | const u8 *mesh_da; | 1815 | * For unicast with unknown forwarding information, |
1816 | * destination might be in the MBSS or if that fails | ||
1817 | * forwarded to another mesh gate. In either case | ||
1818 | * resolution will be handled in ieee80211_xmit(), so | ||
1819 | * leave the original DA. This also works for mcast */ | ||
1820 | const u8 *mesh_da = skb->data; | ||
1821 | |||
1822 | if (mppath) | ||
1823 | mesh_da = mppath->mpp; | ||
1824 | else if (mpath) | ||
1825 | mesh_da = mpath->dst; | ||
1826 | rcu_read_unlock(); | ||
1816 | 1827 | ||
1817 | if (is_multicast_ether_addr(skb->data)) | ||
1818 | /* DA TA mSA AE:SA */ | ||
1819 | mesh_da = skb->data; | ||
1820 | else { | ||
1821 | static const u8 bcast[ETH_ALEN] = | ||
1822 | { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | ||
1823 | if (mppath) { | ||
1824 | /* RA TA mDA mSA AE:DA SA */ | ||
1825 | mesh_da = mppath->mpp; | ||
1826 | is_mesh_mcast = 0; | ||
1827 | } else if (mpath) { | ||
1828 | mesh_da = mpath->dst; | ||
1829 | is_mesh_mcast = 0; | ||
1830 | } else { | ||
1831 | /* DA TA mSA AE:SA */ | ||
1832 | mesh_da = bcast; | ||
1833 | } | ||
1834 | } | ||
1835 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, | 1828 | hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, |
1836 | mesh_da, sdata->vif.addr); | 1829 | mesh_da, sdata->vif.addr); |
1837 | rcu_read_unlock(); | 1830 | if (is_multicast_ether_addr(mesh_da)) |
1838 | if (is_mesh_mcast) | 1831 | /* DA TA mSA AE:SA */ |
1839 | meshhdrlen = | 1832 | meshhdrlen = |
1840 | ieee80211_new_mesh_header(&mesh_hdr, | 1833 | ieee80211_new_mesh_header(&mesh_hdr, |
1841 | sdata, | 1834 | sdata, |
1842 | skb->data + ETH_ALEN, | 1835 | skb->data + ETH_ALEN, |
1843 | NULL); | 1836 | NULL); |
1844 | else | 1837 | else |
1838 | /* RA TA mDA mSA AE:DA SA */ | ||
1845 | meshhdrlen = | 1839 | meshhdrlen = |
1846 | ieee80211_new_mesh_header(&mesh_hdr, | 1840 | ieee80211_new_mesh_header(&mesh_hdr, |
1847 | sdata, | 1841 | sdata, |