diff options
-rw-r--r-- | include/net/cfg80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 3 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 | ||||
-rw-r--r-- | net/mac80211/scan.c | 3 | ||||
-rw-r--r-- | net/wireless/reg.c | 19 |
5 files changed, 26 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 493fa0c79005..3d254e10ff30 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -96,6 +96,7 @@ enum ieee80211_band { | |||
96 | * is not permitted. | 96 | * is not permitted. |
97 | * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel | 97 | * @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel |
98 | * is not permitted. | 98 | * is not permitted. |
99 | * @IEEE80211_CHAN_NO_OFDM: OFDM is not allowed on this channel. | ||
99 | */ | 100 | */ |
100 | enum ieee80211_channel_flags { | 101 | enum ieee80211_channel_flags { |
101 | IEEE80211_CHAN_DISABLED = 1<<0, | 102 | IEEE80211_CHAN_DISABLED = 1<<0, |
@@ -104,6 +105,7 @@ enum ieee80211_channel_flags { | |||
104 | IEEE80211_CHAN_RADAR = 1<<3, | 105 | IEEE80211_CHAN_RADAR = 1<<3, |
105 | IEEE80211_CHAN_NO_HT40PLUS = 1<<4, | 106 | IEEE80211_CHAN_NO_HT40PLUS = 1<<4, |
106 | IEEE80211_CHAN_NO_HT40MINUS = 1<<5, | 107 | IEEE80211_CHAN_NO_HT40MINUS = 1<<5, |
108 | IEEE80211_CHAN_NO_OFDM = 1<<6, | ||
107 | }; | 109 | }; |
108 | 110 | ||
109 | #define IEEE80211_CHAN_NO_HT40 \ | 111 | #define IEEE80211_CHAN_NO_HT40 \ |
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..a4a5acdbaa4d 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, |
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/wireless/reg.c b/net/wireless/reg.c index 2303ee73b50a..2ded3c7fad06 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -680,6 +680,8 @@ static u32 map_regdom_flags(u32 rd_flags) | |||
680 | channel_flags |= IEEE80211_CHAN_NO_IBSS; | 680 | channel_flags |= IEEE80211_CHAN_NO_IBSS; |
681 | if (rd_flags & NL80211_RRF_DFS) | 681 | if (rd_flags & NL80211_RRF_DFS) |
682 | channel_flags |= IEEE80211_CHAN_RADAR; | 682 | channel_flags |= IEEE80211_CHAN_RADAR; |
683 | if (rd_flags & NL80211_RRF_NO_OFDM) | ||
684 | channel_flags |= IEEE80211_CHAN_NO_OFDM; | ||
683 | return channel_flags; | 685 | return channel_flags; |
684 | } | 686 | } |
685 | 687 | ||
@@ -901,7 +903,21 @@ static void handle_channel(struct wiphy *wiphy, | |||
901 | chan->max_antenna_gain = min(chan->orig_mag, | 903 | chan->max_antenna_gain = min(chan->orig_mag, |
902 | (int) MBI_TO_DBI(power_rule->max_antenna_gain)); | 904 | (int) MBI_TO_DBI(power_rule->max_antenna_gain)); |
903 | chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp); | 905 | chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp); |
904 | chan->max_power = min(chan->max_power, chan->max_reg_power); | 906 | if (chan->orig_mpwr) { |
907 | /* | ||
908 | * Devices that have their own custom regulatory domain | ||
909 | * but also use WIPHY_FLAG_STRICT_REGULATORY will follow the | ||
910 | * passed country IE power settings. | ||
911 | */ | ||
912 | if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE && | ||
913 | wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY && | ||
914 | wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) | ||
915 | chan->max_power = chan->max_reg_power; | ||
916 | else | ||
917 | chan->max_power = min(chan->orig_mpwr, | ||
918 | chan->max_reg_power); | ||
919 | } else | ||
920 | chan->max_power = chan->max_reg_power; | ||
905 | } | 921 | } |
906 | 922 | ||
907 | static void handle_band(struct wiphy *wiphy, | 923 | static void handle_band(struct wiphy *wiphy, |
@@ -1885,6 +1901,7 @@ static void restore_custom_reg_settings(struct wiphy *wiphy) | |||
1885 | chan->flags = chan->orig_flags; | 1901 | chan->flags = chan->orig_flags; |
1886 | chan->max_antenna_gain = chan->orig_mag; | 1902 | chan->max_antenna_gain = chan->orig_mag; |
1887 | chan->max_power = chan->orig_mpwr; | 1903 | chan->max_power = chan->orig_mpwr; |
1904 | chan->beacon_found = false; | ||
1888 | } | 1905 | } |
1889 | } | 1906 | } |
1890 | } | 1907 | } |