diff options
author | David S. Miller <davem@davemloft.net> | 2015-07-21 03:17:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-21 03:17:53 -0400 |
commit | 27dfead164451971f2c3778857b43690e7afaa8b (patch) | |
tree | 15de55911f604b79bdd7063657c6625421561175 | |
parent | e0536cd910d5bc98300d7830f1d9317df9ab8afa (diff) | |
parent | 923b352f19d9ea971ae2536eab55f5fc9e95fedf (diff) |
Merge tag 'mac80211-for-davem-2015-07-17' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
Some fixes for the current cycle:
1. Arik introduced an rtnl-locked regulatory API to be able
to differentiate between place do/don't have the RTNL;
this fixes missing locking in some of the code paths
2. Two small mesh bugfixes from Bob, one to avoid treating
a certain malformed over-the-air frame and one to avoid
sending a garbage field over the air.
3. A fix for powersave during WoWLAN suspend from Krishna Chaitanya.
4. A fix for a powersave vs. aggregation teardown race, from Michal.
5. Thomas reduced the loglevel of CRDA messages to avoid spamming
the kernel log with mostly irrelevant information.
6. Tom fixed a dangling debugfs directory pointer that could cause
crashes if subsequent addition of the same interface to debugfs
failed for some reason.
7. A fix from myself for a list corruption issue in mac80211 during
combined interface shutdown/removal - shut down interfaces first
and only then remove them to avoid that.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/cfg80211.h | 17 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 1 | ||||
-rw-r--r-- | net/mac80211/iface.c | 25 | ||||
-rw-r--r-- | net/mac80211/mesh_plink.c | 5 | ||||
-rw-r--r-- | net/mac80211/pm.c | 16 | ||||
-rw-r--r-- | net/mac80211/tdls.c | 6 | ||||
-rw-r--r-- | net/mac80211/tx.c | 4 | ||||
-rw-r--r-- | net/wireless/chan.c | 45 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 14 | ||||
-rw-r--r-- | net/wireless/reg.c | 8 | ||||
-rw-r--r-- | net/wireless/trace.h | 11 |
11 files changed, 111 insertions, 41 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a741678f24a2..883fe1e7c5a1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -4868,6 +4868,23 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy, | |||
4868 | struct cfg80211_chan_def *chandef, | 4868 | struct cfg80211_chan_def *chandef, |
4869 | enum nl80211_iftype iftype); | 4869 | enum nl80211_iftype iftype); |
4870 | 4870 | ||
4871 | /** | ||
4872 | * cfg80211_reg_can_beacon_relax - check if beaconing is allowed with relaxation | ||
4873 | * @wiphy: the wiphy | ||
4874 | * @chandef: the channel definition | ||
4875 | * @iftype: interface type | ||
4876 | * | ||
4877 | * Return: %true if there is no secondary channel or the secondary channel(s) | ||
4878 | * can be used for beaconing (i.e. is not a radar channel etc.). This version | ||
4879 | * also checks if IR-relaxation conditions apply, to allow beaconing under | ||
4880 | * more permissive conditions. | ||
4881 | * | ||
4882 | * Requires the RTNL to be held. | ||
4883 | */ | ||
4884 | bool cfg80211_reg_can_beacon_relax(struct wiphy *wiphy, | ||
4885 | struct cfg80211_chan_def *chandef, | ||
4886 | enum nl80211_iftype iftype); | ||
4887 | |||
4871 | /* | 4888 | /* |
4872 | * cfg80211_ch_switch_notify - update wdev channel and notify userspace | 4889 | * cfg80211_ch_switch_notify - update wdev channel and notify userspace |
4873 | * @dev: the device which switched channels | 4890 | * @dev: the device which switched channels |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index 29236e832e44..c09c0131bfa2 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -723,6 +723,7 @@ void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata) | |||
723 | 723 | ||
724 | debugfs_remove_recursive(sdata->vif.debugfs_dir); | 724 | debugfs_remove_recursive(sdata->vif.debugfs_dir); |
725 | sdata->vif.debugfs_dir = NULL; | 725 | sdata->vif.debugfs_dir = NULL; |
726 | sdata->debugfs.subdir_stations = NULL; | ||
726 | } | 727 | } |
727 | 728 | ||
728 | void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata) | 729 | void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata) |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index ed1edac14372..553ac6dd4867 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -1863,10 +1863,6 @@ void ieee80211_sdata_stop(struct ieee80211_sub_if_data *sdata) | |||
1863 | ieee80211_teardown_sdata(sdata); | 1863 | ieee80211_teardown_sdata(sdata); |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | /* | ||
1867 | * Remove all interfaces, may only be called at hardware unregistration | ||
1868 | * time because it doesn't do RCU-safe list removals. | ||
1869 | */ | ||
1870 | void ieee80211_remove_interfaces(struct ieee80211_local *local) | 1866 | void ieee80211_remove_interfaces(struct ieee80211_local *local) |
1871 | { | 1867 | { |
1872 | struct ieee80211_sub_if_data *sdata, *tmp; | 1868 | struct ieee80211_sub_if_data *sdata, *tmp; |
@@ -1875,14 +1871,21 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local) | |||
1875 | 1871 | ||
1876 | ASSERT_RTNL(); | 1872 | ASSERT_RTNL(); |
1877 | 1873 | ||
1878 | /* | 1874 | /* Before destroying the interfaces, make sure they're all stopped so |
1879 | * Close all AP_VLAN interfaces first, as otherwise they | 1875 | * that the hardware is stopped. Otherwise, the driver might still be |
1880 | * might be closed while the AP interface they belong to | 1876 | * iterating the interfaces during the shutdown, e.g. from a worker |
1881 | * is closed, causing unregister_netdevice_many() to crash. | 1877 | * or from RX processing or similar, and if it does so (using atomic |
1878 | * iteration) while we're manipulating the list, the iteration will | ||
1879 | * crash. | ||
1880 | * | ||
1881 | * After this, the hardware should be stopped and the driver should | ||
1882 | * have stopped all of its activities, so that we can do RCU-unaware | ||
1883 | * manipulations of the interface list below. | ||
1882 | */ | 1884 | */ |
1883 | list_for_each_entry(sdata, &local->interfaces, list) | 1885 | cfg80211_shutdown_all_interfaces(local->hw.wiphy); |
1884 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 1886 | |
1885 | dev_close(sdata->dev); | 1887 | WARN(local->open_count, "%s: open count remains %d\n", |
1888 | wiphy_name(local->hw.wiphy), local->open_count); | ||
1886 | 1889 | ||
1887 | mutex_lock(&local->iflist_mtx); | 1890 | mutex_lock(&local->iflist_mtx); |
1888 | list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) { | 1891 | list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) { |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 5438d13e2f00..3b59099413fb 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -306,7 +306,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
306 | if (action == WLAN_SP_MESH_PEERING_CONFIRM) { | 306 | if (action == WLAN_SP_MESH_PEERING_CONFIRM) { |
307 | /* AID */ | 307 | /* AID */ |
308 | pos = skb_put(skb, 2); | 308 | pos = skb_put(skb, 2); |
309 | put_unaligned_le16(plid, pos + 2); | 309 | put_unaligned_le16(plid, pos); |
310 | } | 310 | } |
311 | if (ieee80211_add_srates_ie(sdata, skb, true, band) || | 311 | if (ieee80211_add_srates_ie(sdata, skb, true, band) || |
312 | ieee80211_add_ext_srates_ie(sdata, skb, true, band) || | 312 | ieee80211_add_ext_srates_ie(sdata, skb, true, band) || |
@@ -1122,6 +1122,9 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, | |||
1122 | WLAN_SP_MESH_PEERING_CONFIRM) { | 1122 | WLAN_SP_MESH_PEERING_CONFIRM) { |
1123 | baseaddr += 4; | 1123 | baseaddr += 4; |
1124 | baselen += 4; | 1124 | baselen += 4; |
1125 | |||
1126 | if (baselen > len) | ||
1127 | return; | ||
1125 | } | 1128 | } |
1126 | ieee802_11_parse_elems(baseaddr, len - baselen, true, &elems); | 1129 | ieee802_11_parse_elems(baseaddr, len - baselen, true, &elems); |
1127 | mesh_process_plink_frame(sdata, mgmt, &elems); | 1130 | mesh_process_plink_frame(sdata, mgmt, &elems); |
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 06b60980c62c..b676b9fa707b 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -76,6 +76,22 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) | |||
76 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 76 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
77 | continue; | 77 | continue; |
78 | ieee80211_mgd_quiesce(sdata); | 78 | ieee80211_mgd_quiesce(sdata); |
79 | /* If suspended during TX in progress, and wowlan | ||
80 | * is enabled (connection will be active) there | ||
81 | * can be a race where the driver is put out | ||
82 | * of power-save due to TX and during suspend | ||
83 | * dynamic_ps_timer is cancelled and TX packet | ||
84 | * is flushed, leaving the driver in ACTIVE even | ||
85 | * after resuming until dynamic_ps_timer puts | ||
86 | * driver back in DOZE. | ||
87 | */ | ||
88 | if (sdata->u.mgd.associated && | ||
89 | sdata->u.mgd.powersave && | ||
90 | !(local->hw.conf.flags & IEEE80211_CONF_PS)) { | ||
91 | local->hw.conf.flags |= IEEE80211_CONF_PS; | ||
92 | ieee80211_hw_config(local, | ||
93 | IEEE80211_CONF_CHANGE_PS); | ||
94 | } | ||
79 | } | 95 | } |
80 | 96 | ||
81 | err = drv_suspend(local, wowlan); | 97 | err = drv_suspend(local, wowlan); |
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index ad31b2dab4f5..8db6e2994bbc 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c | |||
@@ -60,6 +60,7 @@ ieee80211_tdls_add_subband(struct ieee80211_sub_if_data *sdata, | |||
60 | struct ieee80211_channel *ch; | 60 | struct ieee80211_channel *ch; |
61 | struct cfg80211_chan_def chandef; | 61 | struct cfg80211_chan_def chandef; |
62 | int i, subband_start; | 62 | int i, subband_start; |
63 | struct wiphy *wiphy = sdata->local->hw.wiphy; | ||
63 | 64 | ||
64 | for (i = start; i <= end; i += spacing) { | 65 | for (i = start; i <= end; i += spacing) { |
65 | if (!ch_cnt) | 66 | if (!ch_cnt) |
@@ -70,9 +71,8 @@ ieee80211_tdls_add_subband(struct ieee80211_sub_if_data *sdata, | |||
70 | /* we will be active on the channel */ | 71 | /* we will be active on the channel */ |
71 | cfg80211_chandef_create(&chandef, ch, | 72 | cfg80211_chandef_create(&chandef, ch, |
72 | NL80211_CHAN_NO_HT); | 73 | NL80211_CHAN_NO_HT); |
73 | if (cfg80211_reg_can_beacon(sdata->local->hw.wiphy, | 74 | if (cfg80211_reg_can_beacon_relax(wiphy, &chandef, |
74 | &chandef, | 75 | sdata->wdev.iftype)) { |
75 | sdata->wdev.iftype)) { | ||
76 | ch_cnt++; | 76 | ch_cnt++; |
77 | /* | 77 | /* |
78 | * check if the next channel is also part of | 78 | * check if the next channel is also part of |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8410bb3bf5e8..b8233505bf9f 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1117,7 +1117,9 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx, | |||
1117 | queued = true; | 1117 | queued = true; |
1118 | info->control.vif = &tx->sdata->vif; | 1118 | info->control.vif = &tx->sdata->vif; |
1119 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 1119 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
1120 | info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS; | 1120 | info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS | |
1121 | IEEE80211_TX_CTL_NO_PS_BUFFER | | ||
1122 | IEEE80211_TX_STATUS_EOSP; | ||
1121 | __skb_queue_tail(&tid_tx->pending, skb); | 1123 | __skb_queue_tail(&tid_tx->pending, skb); |
1122 | if (skb_queue_len(&tid_tx->pending) > STA_MAX_TX_BUFFER) | 1124 | if (skb_queue_len(&tid_tx->pending) > STA_MAX_TX_BUFFER) |
1123 | purge_skb = __skb_dequeue(&tid_tx->pending); | 1125 | purge_skb = __skb_dequeue(&tid_tx->pending); |
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 915b328b9ac5..59cabc9bce69 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c | |||
@@ -797,23 +797,18 @@ static bool cfg80211_ir_permissive_chan(struct wiphy *wiphy, | |||
797 | return false; | 797 | return false; |
798 | } | 798 | } |
799 | 799 | ||
800 | bool cfg80211_reg_can_beacon(struct wiphy *wiphy, | 800 | static bool _cfg80211_reg_can_beacon(struct wiphy *wiphy, |
801 | struct cfg80211_chan_def *chandef, | 801 | struct cfg80211_chan_def *chandef, |
802 | enum nl80211_iftype iftype) | 802 | enum nl80211_iftype iftype, |
803 | bool check_no_ir) | ||
803 | { | 804 | { |
804 | bool res; | 805 | bool res; |
805 | u32 prohibited_flags = IEEE80211_CHAN_DISABLED | | 806 | u32 prohibited_flags = IEEE80211_CHAN_DISABLED | |
806 | IEEE80211_CHAN_RADAR; | 807 | IEEE80211_CHAN_RADAR; |
807 | 808 | ||
808 | trace_cfg80211_reg_can_beacon(wiphy, chandef, iftype); | 809 | trace_cfg80211_reg_can_beacon(wiphy, chandef, iftype, check_no_ir); |
809 | 810 | ||
810 | /* | 811 | if (check_no_ir) |
811 | * Under certain conditions suggested by some regulatory bodies a | ||
812 | * GO/STA can IR on channels marked with IEEE80211_NO_IR. Set this flag | ||
813 | * only if such relaxations are not enabled and the conditions are not | ||
814 | * met. | ||
815 | */ | ||
816 | if (!cfg80211_ir_permissive_chan(wiphy, iftype, chandef->chan)) | ||
817 | prohibited_flags |= IEEE80211_CHAN_NO_IR; | 812 | prohibited_flags |= IEEE80211_CHAN_NO_IR; |
818 | 813 | ||
819 | if (cfg80211_chandef_dfs_required(wiphy, chandef, iftype) > 0 && | 814 | if (cfg80211_chandef_dfs_required(wiphy, chandef, iftype) > 0 && |
@@ -827,8 +822,36 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy, | |||
827 | trace_cfg80211_return_bool(res); | 822 | trace_cfg80211_return_bool(res); |
828 | return res; | 823 | return res; |
829 | } | 824 | } |
825 | |||
826 | bool cfg80211_reg_can_beacon(struct wiphy *wiphy, | ||
827 | struct cfg80211_chan_def *chandef, | ||
828 | enum nl80211_iftype iftype) | ||
829 | { | ||
830 | return _cfg80211_reg_can_beacon(wiphy, chandef, iftype, true); | ||
831 | } | ||
830 | EXPORT_SYMBOL(cfg80211_reg_can_beacon); | 832 | EXPORT_SYMBOL(cfg80211_reg_can_beacon); |
831 | 833 | ||
834 | bool cfg80211_reg_can_beacon_relax(struct wiphy *wiphy, | ||
835 | struct cfg80211_chan_def *chandef, | ||
836 | enum nl80211_iftype iftype) | ||
837 | { | ||
838 | bool check_no_ir; | ||
839 | |||
840 | ASSERT_RTNL(); | ||
841 | |||
842 | /* | ||
843 | * Under certain conditions suggested by some regulatory bodies a | ||
844 | * GO/STA can IR on channels marked with IEEE80211_NO_IR. Set this flag | ||
845 | * only if such relaxations are not enabled and the conditions are not | ||
846 | * met. | ||
847 | */ | ||
848 | check_no_ir = !cfg80211_ir_permissive_chan(wiphy, iftype, | ||
849 | chandef->chan); | ||
850 | |||
851 | return _cfg80211_reg_can_beacon(wiphy, chandef, iftype, check_no_ir); | ||
852 | } | ||
853 | EXPORT_SYMBOL(cfg80211_reg_can_beacon_relax); | ||
854 | |||
832 | int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev, | 855 | int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev, |
833 | struct cfg80211_chan_def *chandef) | 856 | struct cfg80211_chan_def *chandef) |
834 | { | 857 | { |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index c264effd00a6..76b41578a838 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2003,7 +2003,8 @@ static int __nl80211_set_channel(struct cfg80211_registered_device *rdev, | |||
2003 | switch (iftype) { | 2003 | switch (iftype) { |
2004 | case NL80211_IFTYPE_AP: | 2004 | case NL80211_IFTYPE_AP: |
2005 | case NL80211_IFTYPE_P2P_GO: | 2005 | case NL80211_IFTYPE_P2P_GO: |
2006 | if (!cfg80211_reg_can_beacon(&rdev->wiphy, &chandef, iftype)) { | 2006 | if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, |
2007 | iftype)) { | ||
2007 | result = -EINVAL; | 2008 | result = -EINVAL; |
2008 | break; | 2009 | break; |
2009 | } | 2010 | } |
@@ -3403,8 +3404,8 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) | |||
3403 | } else if (!nl80211_get_ap_channel(rdev, ¶ms)) | 3404 | } else if (!nl80211_get_ap_channel(rdev, ¶ms)) |
3404 | return -EINVAL; | 3405 | return -EINVAL; |
3405 | 3406 | ||
3406 | if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef, | 3407 | if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms.chandef, |
3407 | wdev->iftype)) | 3408 | wdev->iftype)) |
3408 | return -EINVAL; | 3409 | return -EINVAL; |
3409 | 3410 | ||
3410 | if (info->attrs[NL80211_ATTR_ACL_POLICY]) { | 3411 | if (info->attrs[NL80211_ATTR_ACL_POLICY]) { |
@@ -6492,8 +6493,8 @@ skip_beacons: | |||
6492 | if (err) | 6493 | if (err) |
6493 | return err; | 6494 | return err; |
6494 | 6495 | ||
6495 | if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef, | 6496 | if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms.chandef, |
6496 | wdev->iftype)) | 6497 | wdev->iftype)) |
6497 | return -EINVAL; | 6498 | return -EINVAL; |
6498 | 6499 | ||
6499 | err = cfg80211_chandef_dfs_required(wdev->wiphy, | 6500 | err = cfg80211_chandef_dfs_required(wdev->wiphy, |
@@ -10170,7 +10171,8 @@ static int nl80211_tdls_channel_switch(struct sk_buff *skb, | |||
10170 | return -EINVAL; | 10171 | return -EINVAL; |
10171 | 10172 | ||
10172 | /* we will be active on the TDLS link */ | 10173 | /* we will be active on the TDLS link */ |
10173 | if (!cfg80211_reg_can_beacon(&rdev->wiphy, &chandef, wdev->iftype)) | 10174 | if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, |
10175 | wdev->iftype)) | ||
10174 | return -EINVAL; | 10176 | return -EINVAL; |
10175 | 10177 | ||
10176 | /* don't allow switching to DFS channels */ | 10178 | /* don't allow switching to DFS channels */ |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index d359e0610198..aa2d75482017 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -544,15 +544,15 @@ static int call_crda(const char *alpha2) | |||
544 | reg_regdb_query(alpha2); | 544 | reg_regdb_query(alpha2); |
545 | 545 | ||
546 | if (reg_crda_timeouts > REG_MAX_CRDA_TIMEOUTS) { | 546 | if (reg_crda_timeouts > REG_MAX_CRDA_TIMEOUTS) { |
547 | pr_info("Exceeded CRDA call max attempts. Not calling CRDA\n"); | 547 | pr_debug("Exceeded CRDA call max attempts. Not calling CRDA\n"); |
548 | return -EINVAL; | 548 | return -EINVAL; |
549 | } | 549 | } |
550 | 550 | ||
551 | if (!is_world_regdom((char *) alpha2)) | 551 | if (!is_world_regdom((char *) alpha2)) |
552 | pr_info("Calling CRDA for country: %c%c\n", | 552 | pr_debug("Calling CRDA for country: %c%c\n", |
553 | alpha2[0], alpha2[1]); | 553 | alpha2[0], alpha2[1]); |
554 | else | 554 | else |
555 | pr_info("Calling CRDA to update world regulatory domain\n"); | 555 | pr_debug("Calling CRDA to update world regulatory domain\n"); |
556 | 556 | ||
557 | return kobject_uevent_env(®_pdev->dev.kobj, KOBJ_CHANGE, env); | 557 | return kobject_uevent_env(®_pdev->dev.kobj, KOBJ_CHANGE, env); |
558 | } | 558 | } |
@@ -1589,7 +1589,7 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev) | |||
1589 | case NL80211_IFTYPE_AP: | 1589 | case NL80211_IFTYPE_AP: |
1590 | case NL80211_IFTYPE_P2P_GO: | 1590 | case NL80211_IFTYPE_P2P_GO: |
1591 | case NL80211_IFTYPE_ADHOC: | 1591 | case NL80211_IFTYPE_ADHOC: |
1592 | return cfg80211_reg_can_beacon(wiphy, &chandef, iftype); | 1592 | return cfg80211_reg_can_beacon_relax(wiphy, &chandef, iftype); |
1593 | case NL80211_IFTYPE_STATION: | 1593 | case NL80211_IFTYPE_STATION: |
1594 | case NL80211_IFTYPE_P2P_CLIENT: | 1594 | case NL80211_IFTYPE_P2P_CLIENT: |
1595 | return cfg80211_chandef_usable(wiphy, &chandef, | 1595 | return cfg80211_chandef_usable(wiphy, &chandef, |
diff --git a/net/wireless/trace.h b/net/wireless/trace.h index af3617c9879e..a808279a432a 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h | |||
@@ -2358,20 +2358,23 @@ TRACE_EVENT(cfg80211_cqm_rssi_notify, | |||
2358 | 2358 | ||
2359 | TRACE_EVENT(cfg80211_reg_can_beacon, | 2359 | TRACE_EVENT(cfg80211_reg_can_beacon, |
2360 | TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, | 2360 | TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, |
2361 | enum nl80211_iftype iftype), | 2361 | enum nl80211_iftype iftype, bool check_no_ir), |
2362 | TP_ARGS(wiphy, chandef, iftype), | 2362 | TP_ARGS(wiphy, chandef, iftype, check_no_ir), |
2363 | TP_STRUCT__entry( | 2363 | TP_STRUCT__entry( |
2364 | WIPHY_ENTRY | 2364 | WIPHY_ENTRY |
2365 | CHAN_DEF_ENTRY | 2365 | CHAN_DEF_ENTRY |
2366 | __field(enum nl80211_iftype, iftype) | 2366 | __field(enum nl80211_iftype, iftype) |
2367 | __field(bool, check_no_ir) | ||
2367 | ), | 2368 | ), |
2368 | TP_fast_assign( | 2369 | TP_fast_assign( |
2369 | WIPHY_ASSIGN; | 2370 | WIPHY_ASSIGN; |
2370 | CHAN_DEF_ASSIGN(chandef); | 2371 | CHAN_DEF_ASSIGN(chandef); |
2371 | __entry->iftype = iftype; | 2372 | __entry->iftype = iftype; |
2373 | __entry->check_no_ir = check_no_ir; | ||
2372 | ), | 2374 | ), |
2373 | TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d", | 2375 | TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d check_no_ir=%s", |
2374 | WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype) | 2376 | WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype, |
2377 | BOOL_TO_STR(__entry->check_no_ir)) | ||
2375 | ); | 2378 | ); |
2376 | 2379 | ||
2377 | TRACE_EVENT(cfg80211_chandef_dfs_required, | 2380 | TRACE_EVENT(cfg80211_chandef_dfs_required, |