Search Linux Wireless

Re: [PATCH v3 07/10] wifi: mac80211: extend ifcomb check functions for multi-radio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.07.24 12:32, Karthikeyan Periyasamy wrote:


On 7/1/2024 7:43 PM, Felix Fietkau wrote:
Add support for counting global and per-radio max/current number of
channels, as well as checking radio-specific interface combinations.

Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
---
  net/mac80211/cfg.c         |   7 +-
  net/mac80211/chan.c        |  17 +++--
  net/mac80211/ibss.c        |   2 +-
  net/mac80211/ieee80211_i.h |   5 +-
  net/mac80211/iface.c       |   2 +-
  net/mac80211/util.c        | 126 ++++++++++++++++++++++++++------------
  6 files changed, 108 insertions(+), 51 deletions(-)


...

@@ -3982,6 +4062,8 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
  	if (iftype != NL80211_IFTYPE_UNSPECIFIED)
  		params.iftype_num[iftype] = 1;
+ ieee80211_fill_ifcomb_params(local, &params, shared ? chandef : NULL,
+				     sdata);
  	list_for_each_entry(ctx, &local->chanctx_list, list) {
  		if (ctx->replace_state == IEEE80211_CHANCTX_WILL_BE_REPLACED)
  			continue;
@@ -3991,28 +4073,9 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
  			params.num_different_channels++;
  			continue;
  		}
-		if (chandef && chanmode == IEEE80211_CHANCTX_SHARED &&
-		    cfg80211_chandef_compatible(chandef,
-						&ctx->conf.def))
-			continue;
  		params.num_different_channels++;
  	}
- list_for_each_entry_rcu(sdata_iter, &local->interfaces, list) {
-		struct wireless_dev *wdev_iter;
-
-		wdev_iter = &sdata_iter->wdev;
-
-		if (sdata_iter == sdata ||
-		    !ieee80211_sdata_running(sdata_iter) ||
-		    cfg80211_iftype_allowed(local->hw.wiphy,
-					    wdev_iter->iftype, 0, 1))
-			continue;
-
-		params.iftype_num[wdev_iter->iftype]++;
-		total++;
-	}
-
  	if (total == 1 && !params.radar_detect)

Here, total is always 1. no ?

Yes, seems that I forgot to delete a few lines here.
Will fix in the next version.

Thanks,

- Felix




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux