cfg80211/mac80211 patches from our internal tree 2023-11-13
cover cfg80211/mac80211 patches from our internal tree 2023-11-13
From: Gregory Greenman <[email protected]>
Hi,
A bunch of patches from our internal tree with mac80211 and cfg80211 changes. It's the usual developement, adding a few small features.
Thanks,
Gregory
Andrei Otcheretianski (4):
wifi: cfg80211: reg: Support P2P operation on DFS channels
wifi: cfg80211: Schedule regulatory check on BSS STA channel change
wifi: mac80211: Schedule regulatory channels check on bandwith change
wifi: mac80211_hwsim: Add custom reg for DFS concurrent
Ilan Peer (2):
wifi: cfg80211: Extend support for scanning while MLO connected
wifi: mac80211: Extend support for scanning while MLO connected
drivers/net/wireless/virtual/mac80211_hwsim.c | 19 ++++ include/net/cfg80211.h | 16 ++++ include/uapi/linux/nl80211.h | 25 ++++- net/mac80211/mlme.c | 1 + net/mac80211/scan.c | 48 +++++++++- net/wireless/chan.c | 94 +++++++++++++++++-- net/wireless/nl80211.c | 20 ++++ net/wireless/reg.c | 5 +- net/wireless/reg.h | 5 + net/wireless/sme.c | 2 + 10 files changed, 219 insertions(+), 16 deletions(-)
Signature · 1 line
2.38.1
PATCH 1/6 wifi: cfg80211: Extend support for scanning while MLO connected
From: Ilan Peer <[email protected]>
To extend the support of TSF accounting in scan results for MLO connections, allow to indicate in the scan request the link ID corresponding to the BSS whose TSF should be used for the TSF accounting.
--- include/net/cfg80211.h | 3 +++ include/uapi/linux/nl80211.h | 8 +++++--- net/wireless/nl80211.c | 1 + 3 files changed, 9 insertions(+), 3 deletions(-)
include/net/cfg80211.h +3 -0
@@ -2608,6 +2608,8 @@ struct cfg80211_scan_6ghz_params {* @n_6ghz_params: number of 6 GHz params * @scan_6ghz_params: 6 GHz params * @bssid: BSSID to scan for (most commonly, the wildcard BSSID) +* @tsf_report_link_id: for MLO, indicates the link ID of the BSS that should be +* used for TSF reporting. Can be set to -1 to indicate no preference. */ struct cfg80211_scan_request {struct cfg80211_ssid *ssids;
@@ -2636,6 +2638,7 @@ struct cfg80211_scan_request {bool scan_6ghz;u32 n_6ghz_params;struct cfg80211_scan_6ghz_params *scan_6ghz_params; +s8 tsf_report_link_id;/* keep last */ struct ieee80211_channel *channels[] __counted_by(n_channels);
include/uapi/linux/nl80211.h +5 -3
@@ -6241,9 +6241,11 @@ enum nl80211_feature_flags {* the BSS that the interface that requested the scan is connected to * (if available). * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the -* time the last beacon/probe was received. The time is the TSF of the -* BSS that the interface that requested the scan is connected to -* (if available). +* time the last beacon/probe was received. For a non MLO connection, the +* time is the TSF of the BSS that the interface that requested the scan is +* connected to (if available). For an MLO connection, the time is the TSF +* of the BSS corresponding with link ID specified in the scan request (if +* specified). * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of * channel dwell time. * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate
net/wireless/nl80211.c +1 -0
@@ -9337,6 +9337,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)else eth_broadcast_addr (request->bssid); + request->tsf_report_link_id =nl80211_link_id_or_invalid (info->attrs); request->wdev = wdev; request->wiphy = &rdev->wiphy; request->scan_start = jiffies;
Signature · 1 line
2.38.1
PATCH 2/6 wifi: mac80211: Extend support for scanning while MLO connected
In reply to [email protected]From: Ilan Peer <[email protected]>
- If the scan request includes a link ID, validate that it is one of the active links. Otherwise, if the scan request doesn't include a valid link ID, select one of the active links.
- When reporting the TSF for a BSS entry, use the link ID information from the Rx status or the scan request to set the parent BSSID.
--- net/mac80211/scan.c | 48 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-)
net/mac80211/scan.c +43 -5
@@ -194,11 +194,32 @@ ieee80211_bss_info_update(struct ieee80211_local *local,if (scan_sdata && scan_sdata->vif.type ==NL80211_IFTYPE_STATION && scan_sdata->vif.cfg.assoc &&ieee80211_have_rx_timestamp (rx_status)) { - bss_meta.parent_tsf = -ieee80211_calculate_rx_timestamp (local, rx_status, - len +FCS_LEN ,24 ); -ether_addr_copy (bss_meta.parent_bssid, - scan_sdata->vif.bss_conf.bssid); +struct ieee80211_bss_conf *link_conf =NULL ; + +/* for an MLO connection, set the TSF data only in case we have +* an indication on which of the links the frame was received +*/ +if (ieee80211_vif_is_mld (&scan_sdata->vif)) { +if (rx_status->link_valid) { +s8 link_id = rx_status->link_id; + + link_conf = +rcu_dereference (scan_sdata->vif.link_conf[link_id]); + } + }else { + link_conf = &scan_sdata->vif.bss_conf; + } + +if (link_conf) { + bss_meta.parent_tsf = +ieee80211_calculate_rx_timestamp (local, + rx_status, + len +FCS_LEN , +24 ); + +ether_addr_copy (bss_meta.parent_bssid, + link_conf->bssid); + } }rcu_read_unlock ();
@@ -666,6 +687,21 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,if (local->scan_req)return -EBUSY ; +/* For an MLO connection, if a link ID was specified, validate that it +* is indeed active. If no link ID was specified, select one of the +* active links. +*/ +if (ieee80211_vif_is_mld (&sdata->vif)) { +if (req->tsf_report_link_id >=0 ) { +if (!(sdata->vif.active_links & +BIT (req->tsf_report_link_id))) +return -EINVAL ; + }else { + req->tsf_report_link_id = +__ffs (sdata->vif.active_links); + } + } +if (!__ieee80211_can_leave_ch (sdata))return -EBUSY ;
@@ -714,6 +750,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, local->hw_scan_req->req.duration = req->duration; local->hw_scan_req->req.duration_mandatory = req->duration_mandatory; + local->hw_scan_req->req.tsf_report_link_id = + req->tsf_report_link_id; local->hw_scan_band =0 ; local->hw_scan_req->req.n_6ghz_params = req->n_6ghz_params;
Signature · 1 line
2.38.1
PATCH 3/6 wifi: cfg80211: reg: Support P2P operation on DFS channels
In reply to [email protected]From: Andrei Otcheretianski <[email protected]>
FCC-594280 D01 Section B.3 allows peer-to-peer and ad hoc devices to operate on DFS channels while they operate under the control of a concurrent DFS master. For example, it is possible to have a P2P GO on a DFS channel as long as BSS connection is active on the same channel. Allow such operation by adding additional regulatory flags to indicate DFS concurrent channels and capable devices. Add the required relaxations in DFS regulatory checks.
--- include/net/cfg80211.h | 2 + include/uapi/linux/nl80211.h | 17 +++++++ net/wireless/chan.c | 94 +++++++++++++++++++++++++++++++++--- net/wireless/nl80211.c | 3 ++ net/wireless/reg.c | 3 ++ 5 files changed, 112 insertions(+), 7 deletions(-)
include/net/cfg80211.h +2 -0
@@ -117,6 +117,7 @@ struct wiphy;* This may be due to the driver or due to regulatory bandwidth * restrictions. * @IEEE80211_CHAN_NO_EHT: EHT operation is not permitted on this channel. +* @IEEE80211_CHAN_DFS_CONCURRENT: See %NL80211_RRF_DFS_CONCURRENT */ enum ieee80211_channel_flags {IEEE80211_CHAN_DISABLED =1 <<0 ,
@@ -140,6 +141,7 @@ enum ieee80211_channel_flags {IEEE80211_CHAN_16MHZ =1 <<18 ,IEEE80211_CHAN_NO_320MHZ =1 <<19 ,IEEE80211_CHAN_NO_EHT =1 <<20 , + IEEE80211_CHAN_DFS_CONCURRENT = 1<<21, };#define IEEE80211_CHAN_NO_HT40 \
include/uapi/linux/nl80211.h +17 -0
@@ -4226,6 +4226,10 @@ enum nl80211_wmm_rule {* in current regulatory domain. * @NL80211_FREQUENCY_ATTR_PSD: Power spectral density (in dBm) that * is allowed on this channel in current regulatory domain. +* @NL80211_FREQUENCY_ATTR_DFS_CONCURRENT: Operation on this channel is +* allowed for peer-to-peer or adhoc communication under the control +* of a DFS master which operates on the same channel (FCC-594280 D01 +* Section B.3). Should be used together with %NL80211_RRF_DFS only. * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number * currently defined * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -4265,6 +4269,7 @@ enum nl80211_frequency_attr {NL80211_FREQUENCY_ATTR_NO_320MHZ ,NL80211_FREQUENCY_ATTR_NO_EHT ,NL80211_FREQUENCY_ATTR_PSD , +NL80211_FREQUENCY_ATTR_DFS_CONCURRENT ,/* keep last */ __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -4470,6 +4475,10 @@ enum nl80211_sched_scan_match_attr {* @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed * @NL80211_RRF_NO_EHT: EHT operation not allowed * @NL80211_RRF_PSD: Ruleset has power spectral density value +* @NL80211_RRF_DFS_CONCURRENT: Operation on this channel is allowed for +peer-to-peer or adhoc communication under the control of a DFS master +which operates on the same channel (FCC-594280 D01 Section B.3). +Should be used together with %NL80211_RRF_DFS only. */ enum nl80211_reg_rule_flags {NL80211_RRF_NO_OFDM =1 <<0 ,
@@ -4491,6 +4500,7 @@ enum nl80211_reg_rule_flags {NL80211_RRF_NO_320MHZ =1 <<18 ,NL80211_RRF_NO_EHT =1 <<19 ,NL80211_RRF_PSD =1 <<20 , + NL80211_RRF_DFS_CONCURRENT = 1<<21, };#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
@@ -6428,6 +6438,12 @@ enum nl80211_feature_flags {* @NL80211_EXT_FEATURE_OWE_OFFLOAD_AP: Driver/Device wants to do OWE DH IE * handling in AP mode. * +* @NL80211_EXT_FEATURE_DFS_CONCURRENT: The device supports peer-to-peer or +* ad hoc operation on DFS channels under the control of a concurrent +* DFS master on the same channel as described in FCC-594280 D01 +* (Section B.3). This, for example, allows P2P GO and P2P clients to +* operate on DFS channels as long as there's a concurrent BSS connection. +* * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */
@@ -6501,6 +6517,7 @@ enum nl80211_ext_feature_index {NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA ,NL80211_EXT_FEATURE_OWE_OFFLOAD ,NL80211_EXT_FEATURE_OWE_OFFLOAD_AP , +NL80211_EXT_FEATURE_DFS_CONCURRENT ,/* add new features before the definition below */ NUM_NL80211_EXT_FEATURES,
net/wireless/chan.c +87 -7
134 lines not on this page · raw message
net/wireless/nl80211.c +3 -0
@@ -1198,6 +1198,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,if ((chan->flags &IEEE80211_CHAN_NO_EHT ) &&nla_put_flag (msg,NL80211_FREQUENCY_ATTR_NO_EHT )) goto nla_put_failure; +if ((chan->flags &IEEE80211_CHAN_DFS_CONCURRENT ) && +nla_put_flag (msg,NL80211_FREQUENCY_ATTR_DFS_CONCURRENT )) + goto nla_put_failure; } if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
net/wireless/reg.c +3 -0
@@ -1595,6 +1595,9 @@ static u32 map_regdom_flags(u32 rd_flags) channel_flags |=IEEE80211_CHAN_NO_EHT ;if (rd_flags &NL80211_RRF_PSD ) channel_flags |=IEEE80211_CHAN_PSD ; +if (rd_flags &NL80211_RRF_DFS_CONCURRENT ) + channel_flags |=IEEE80211_CHAN_DFS_CONCURRENT ; +return channel_flags; }
Signature · 1 line
2.38.1
PATCH 4/6 wifi: cfg80211: Schedule regulatory check on BSS STA channel change
In reply to [email protected]From: Andrei Otcheretianski <[email protected]>
Due to different relaxation policies it may be needed to re-check channels after a BSS station interface is disconnected or performed a channel switch.
--- include/net/cfg80211.h | 11 +++++++++++ net/wireless/nl80211.c | 16 ++++++++++++++++ net/wireless/reg.c | 2 +- net/wireless/reg.h | 5 +++++ net/wireless/sme.c | 2 ++ 5 files changed, 35 insertions(+), 1 deletion(-)
include/net/cfg80211.h +11 -0
@@ -9302,6 +9302,17 @@ bool cfg80211_valid_disable_subchannel_bitmap(u16 *bitmap,* case disconnect instead. * Also note that the wdev mutex must be held. */ +void cfg80211_links_removed (struct net_device *dev,u16 link_mask); +/** +* cfg80211_schedule_channels_check - schedule regulatory check if needed +* @netdev: the device to check +* +* In case the device supports NO_IR or DFS relaxations, schedule regulatory +* channels check, as previous concurrent operation conditions may not +* hold anymore. +*/ +void cfg80211_schedule_channels_check (struct net_device *netdev); +#endif /* __NET_CFG80211_H */
net/wireless/nl80211.c +16 -0
@@ -19310,6 +19310,7 @@ void cfg80211_ch_switch_notify(struct net_device *dev,break ; } +cfg80211_schedule_channels_check (dev);cfg80211_sched_dfs_chan_update (rdev); nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
@@ -20067,6 +20068,21 @@ void cfg80211_update_owe_info_event(struct net_device *netdev, }EXPORT_SYMBOL (cfg80211_update_owe_info_event); +void cfg80211_schedule_channels_check (struct net_device *netdev) +{ +struct wireless_dev *wdev = netdev->ieee80211_ptr; +struct wiphy *wiphy = wdev->wiphy; + +/* Schedule channels check if NO_IR or DFS relaxations are supported */ +if (wdev->iftype ==NL80211_IFTYPE_STATION && + (wiphy_ext_feature_isset (wiphy, +NL80211_EXT_FEATURE_DFS_CONCURRENT ) || + (IS_ENABLED (CONFIG_CFG80211_REG_RELAX_NO_IR ) && + wiphy->regulatory_flags ®ULATORY_ENABLE_RELAX_NO_IR ))) +reg_check_channels (); +} +EXPORT_SYMBOL (cfg80211_schedule_channels_check); +/* initialisation/exit functions */ int __init nl80211_init (void )
net/wireless/reg.c +1 -1
@@ -2481,7 +2481,7 @@ static void reg_check_chans_work(struct work_struct *work)rtnl_unlock (); } -static void reg_check_channels (void ) +void reg_check_channels (void ) {/* * Give usermode a chance to do something nicer (move to another
net/wireless/reg.h +5 -0
@@ -181,6 +181,11 @@ bool reg_dfs_domain_same(struct wiphy *wiphy1, struct wiphy *wiphy2);*/ int reg_reload_regdb (void ); +/** +* reg_check_channels - schedule regulatory enforcement +*/ +void reg_check_channels (void ); +extern const u8 shipped_regdb_certs[];extern unsigned int shipped_regdb_certs_len;extern const u8 extra_regdb_certs[];
net/wireless/sme.c +2 -0
@@ -1394,6 +1394,8 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,#endif schedule_work (&cfg80211_disconnect_work); + +cfg80211_schedule_channels_check (dev); } void cfg80211_disconnected(struct net_device *dev, u16 reason,
Signature · 1 line
2.38.1
Johannes Berg
maintainerRe: [PATCH 4/6] wifi: cfg80211: Schedule regulatory check on BSS STA channel change
include/net/cfg80211.h bool cfg80211_valid_disable_subchannel_bitmap(u16 *bitmap, · line 9306
Quoted 7 lines · On Mon, 2023-11-13 at 11:35 +0200, [email protected] wrote:
include/net/cfg80211.h +1
-0@@ -9302,6 +9302,17 @@ bool cfg80211_valid_disable_subchannel_bitmap(u16 *bitmap,* case disconnect instead. * Also note that the wdev mutex must be held. */ +void cfg80211_links_removed (struct net_device *dev,u16 link_mask);
What happened there?
Quoted 8 lines
include/net/cfg80211.h +8
-0+/** +* cfg80211_schedule_channels_check - schedule regulatory check if needed +* @netdev: the device to check +* +* In case the device supports NO_IR or DFS relaxations, schedule regulatory +* channels check, as previous concurrent operation conditions may not +* hold anymore. +*/
...
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev, · line 20083
Quoted 13 lines
net/wireless/nl80211.c +13
-0+void cfg80211_schedule_channels_check (struct net_device *netdev) +{ +struct wireless_dev *wdev = netdev->ieee80211_ptr; +struct wiphy *wiphy = wdev->wiphy; + +/* Schedule channels check if NO_IR or DFS relaxations are supported */ +if (wdev->iftype ==NL80211_IFTYPE_STATION && + (wiphy_ext_feature_isset (wiphy, +NL80211_EXT_FEATURE_DFS_CONCURRENT ) || + (IS_ENABLED (CONFIG_CFG80211_REG_RELAX_NO_IR ) && + wiphy->regulatory_flags ®ULATORY_ENABLE_RELAX_NO_IR ))) +reg_check_channels (); +}
That ... doesn't even use the netdev pointer, apart from going to the wiphy? Why not have a wiphy argument instead?
johannes
RE: [PATCH 4/6] wifi: cfg80211: Schedule regulatory check on BSS STA channel change
Quoted 8 lines
cfg80211_valid_disable_subchannel_bitmap(u16 *bitmap,
Quoted 5 lines
* case disconnect instead.
* Also note that the wdev mutex must be held.
*/
+
voidcfg80211_links_removed(struct net_device *dev, u16 link_mask);What happened there?
No idea, it wasn't in the original patch.. Will recheck with Gregory and fix it.
Quoted 11 lines
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev,
Quoted 6 lines
net/wireless/nl80211.c +5
-0+void cfg80211_schedule_channels_check (struct net_device *netdev) { +struct wireless_dev *wdev = netdev->ieee80211_ptr; +struct wiphy *wiphy = wdev->wiphy; + +/* Schedule channels check if NO_IR or DFS relaxations are supported */
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev, · line 20085
Quoted 3 lines
net/wireless/nl80211.c +3
-0+ if (wdev->iftype == NL80211_IFTYPE_STATION && + (wiphy_ext_feature_isset(wiphy, +
NL80211_EXT_FEATURE_DFS_CONCURRENT) ||
Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ (IS_ENABLED(CONFIG_CFG80211_REG_RELAX_NO_IR) && + wiphy->regulatory_flags &
REGULATORY_ENABLE_RELAX_NO_IR)))net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev, · line 20083
Quoted 2 lines
net/wireless/nl80211.c +2
-0+reg_check_channels (); +}That ... doesn't even use the netdev pointer, apart from going to the wiphy? Why not have a wiphy argument instead?
We do need wdev here, I will change it to be wireless device instead
Quoted 2 lines
johannes
Johannes Berg
maintainerRe: [PATCH 4/6] wifi: cfg80211: Schedule regulatory check on BSS STA channel change
Quoted 8 lines
Quoted 8 lines
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev,
Quoted 7 lines
net/wireless/nl80211.c +5
-0+void cfg80211_schedule_channels_check (struct net_device *netdev) { +struct wireless_dev *wdev = netdev->ieee80211_ptr; +struct wiphy *wiphy = wdev->wiphy; + +/* Schedule channels check if NO_IR or DFS relaxations are supported */
Quoted 5 lines
Quoted 2 lines
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev, · line 20078
Quoted 2 lines
net/wireless/nl80211.c +2
-0+ if (wdev->iftype == NL80211_IFTYPE_STATION && + (wiphy_ext_feature_isset(wiphy,We do need wdev here,
Oh right, I missed that, sorry.
Quoted 2 lines
I will change it to be wireless device instead
No need I guess, if we're only going to check for it being a station? Would we ever have a reason to call this for a p2p/nan device? I guess not, since that doesn't affect regulatory in the same way?
johannes
RE: [PATCH 4/6] wifi: cfg80211: Schedule regulatory check on BSS STA channel change
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
+void
cfg80211_schedule_channels_check(struct net_device *netdev){
Quoted 10 lines
Quoted 7 lines
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev,
Quoted 4 lines
net/wireless/nl80211.c +4
-0+struct wireless_dev *wdev = netdev->ieee80211_ptr; +struct wiphy *wiphy = wdev->wiphy; + +/* Schedule channels check if NO_IR or DFS relaxations are supported */
net/wireless/nl80211.c void cfg80211_update_owe_info_event(struct net_device *netdev, · line 20078
Quoted 2 lines
net/wireless/nl80211.c +2
-0+ if (wdev->iftype == NL80211_IFTYPE_STATION && + (wiphy_ext_feature_isset(wiphy,We do need wdev here,
Quoted 8 lines
Oh right, I missed that, sorry.
Quoted 2 lines
I will change it to be wireless device instead
No need I guess, if we're only going to check for it being a station? Would we ever have a reason to call this for a p2p/nan device? I guess not, since that doesn't affect regulatory in the same way?
No, I don't think P2P/NAN devices can anyhow affect regulatory, for sure not for concurrent DFS case.
Quoted 2 lines
johannes
PATCH 5/6 wifi: mac80211: Schedule regulatory channels check on bandwith change
In reply to [email protected]From: Andrei Otcheretianski <[email protected]>
Some devices may support concurrent DFS operation which relies on the BSS channel width for its relaxations. Notify cfg80211 about BW change so it can schedule regulatory checks.
--- net/mac80211/mlme.c | 1 + 1 file changed, 1 insertion(+)
net/mac80211/mlme.c +1 -0
@@ -595,6 +595,7 @@ static int ieee80211_config_bw(struct ieee80211_link_data *link,return ret; } +cfg80211_schedule_channels_check (sdata->dev);return 0 ; }
Signature · 1 line
2.38.1
PATCH 6/6 wifi: mac80211_hwsim: Add custom reg for DFS concurrent
In reply to [email protected]From: Andrei Otcheretianski <[email protected]>
Add custom regulatory that marks DFS channels as DFS_CONCURRENT.
--- drivers/net/wireless/virtual/mac80211_hwsim.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/net/wireless/virtual/mac80211_hwsim.c +19 -0
@@ -190,10 +190,25 @@ static const struct ieee80211_regdomain hwsim_world_regdom_custom_03 = { } }; +static const struct ieee80211_regdomain hwsim_world_regdom_custom_04 = { + .n_reg_rules =6 , + .alpha2 ="99" , + .reg_rules = { +REG_RULE (2412 -10 ,2462 +10 ,40 ,0 ,20 ,0 ), +REG_RULE (2484 -10 ,2484 +10 ,40 ,0 ,20 ,0 ), +REG_RULE (5150 -10 ,5240 +10 ,80 ,0 ,30 ,0 ), +REG_RULE (5260 -10 ,5320 +10 ,80 ,0 ,30 , +NL80211_RRF_DFS_CONCURRENT |NL80211_RRF_DFS ), +REG_RULE (5745 -10 ,5825 +10 ,80 ,0 ,30 ,0 ), +REG_RULE (5855 -10 ,5925 +10 ,80 ,0 ,33 ,0 ), + } +}; +static const struct ieee80211_regdomain *hwsim_world_regdom_custom[] = { &hwsim_world_regdom_custom_01, &hwsim_world_regdom_custom_02, &hwsim_world_regdom_custom_03, + &hwsim_world_regdom_custom_04, };struct hwsim_vif_priv {
@@ -5288,6 +5303,10 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,schedule_timeout_interruptible (1 ); } +/* TODO: Add param */ +wiphy_ext_feature_set (hw->wiphy, +NL80211_EXT_FEATURE_DFS_CONCURRENT ); +if (param->no_vif)ieee80211_hw_set (hw,NO_AUTO_VIF );
Signature · 1 line
2.38.1
Johannes Berg
maintainerRe: [PATCH 6/6] wifi: mac80211_hwsim: Add custom reg for DFS concurrent
drivers/net/wireless/virtual/mac80211_hwsim.c static const struct ieee80211_regdomain hwsim_world_regdom_custom_03 = { · line 199
Quoted 8 lines · On Mon, 2023-11-13 at 11:35 +0200, [email protected] wrote:
drivers/net/wireless/virtual/mac80211_hwsim.c +7
-0+static const struct ieee80211_regdomain hwsim_world_regdom_custom_04 = { + .n_reg_rules =6 , + .alpha2 ="99" , + .reg_rules = { +REG_RULE (2412 -10 ,2462 +10 ,40 ,0 ,20 ,0 ), +REG_RULE (2484 -10 ,2484 +10 ,40 ,0 ,20 ,0 ), +REG_RULE (5150 -10 ,5240 +10 ,80 ,0 ,30 ,0 ),
Didn't you say that could be 160? But that'd need merging with the next range or auto-bw.
drivers/net/wireless/virtual/mac80211_hwsim.c static int mac80211_hwsim_new_radio(struct genl_info *info, · line 5308
Quoted 3 lines
drivers/net/wireless/virtual/mac80211_hwsim.c +3
-0+/* TODO: Add param */ +wiphy_ext_feature_set (hw->wiphy, +NL80211_EXT_FEATURE_DFS_CONCURRENT );
Hm, yes? :)
johannes
RE: [PATCH 6/6] wifi: mac80211_hwsim: Add custom reg for DFS concurrent
Quoted 11 lines
Quoted 1 line
+static const struct
ieee80211_regdomain
hwsim_world_regdom_custom_04= {drivers/net/wireless/virtual/mac80211_hwsim.c static const struct ieee80211_regdomain hwsim_world_regdom_custom_03 = { · line 199
Quoted 6 lines
drivers/net/wireless/virtual/mac80211_hwsim.c +6
-0+ .n_reg_rules = 6, + .alpha2 = "99", + .reg_rules = { +REG_RULE (2412 -10 ,2462 +10 ,40 ,0 ,20 ,0 ), +REG_RULE (2484 -10 ,2484 +10 ,40 ,0 ,20 ,0 ), + REG_RULE(5150 - 10, 5240 + 10, 80, 0, 30, 0),Didn't you say that could be 160? But that'd need merging with the next range or auto-bw.
The entire range here is 80, so 160 doesn't make sense here. I will add auto_bw here similar to what we have in world_regdom. And also the second DFS range with 160.
Quoted 6 lines
drivers/net/wireless/virtual/mac80211_hwsim.c static int mac80211_hwsim_new_radio(struct genl_info *info, · line 5308
Quoted 4 lines
drivers/net/wireless/virtual/mac80211_hwsim.c +3
-0+/* TODO: Add param */ +wiphy_ext_feature_set (hw->wiphy, +NL80211_EXT_FEATURE_DFS_CONCURRENT );Hm, yes? :)
Actually, as ,mac80211_hwsim should be anyway started with custom regdom, I don't think now that an addition module param is still needed. I will just remove the TODO here.
Quoted 2 lines
johannes
Johannes Berg
maintainerQuoted 5 lines
Ilan Peer (2):
wifi: cfg80211: Extend support for scanning while MLO connected
wifi: mac80211: Extend support for scanning while MLO connected
For the record, I've applied these two, didn't seem appropriate to only partially apply the DFS-concurrent patches.
johannes