All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] wifi: cfg80211: check radio iface combination for multi radio per wiphy
@ 2024-08-19 16:39 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-08-19 16:39 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20240813055917.2320582-1-quic_periyasa@quicinc.com>
References: <20240813055917.2320582-1-quic_periyasa@quicinc.com>
TO: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
TO: johannes@sipsolutions.net
CC: linux-wireless@vger.kernel.org
CC: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>

Hi Karthikeyan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cc32e9fb380d8afdbf3486d7063d5520bfb0f071]

url:    https://github.com/intel-lab-lkp/linux/commits/Karthikeyan-Periyasamy/wifi-cfg80211-check-radio-iface-combination-for-multi-radio-per-wiphy/20240815-005751
base:   cc32e9fb380d8afdbf3486d7063d5520bfb0f071
patch link:    https://lore.kernel.org/r/20240813055917.2320582-1-quic_periyasa%40quicinc.com
patch subject: [PATCH v2] wifi: cfg80211: check radio iface combination for multi radio per wiphy
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: csky-randconfig-r072-20240819 (https://download.01.org/0day-ci/archive/20240820/202408200004.5sqDWe4e-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202408200004.5sqDWe4e-lkp@intel.com/

smatch warnings:
net/wireless/core.c:719 wiphy_verify_combinations() error: uninitialized symbol 'ret'.

vim +/ret +719 net/wireless/core.c

7527a782e187d1 Johannes Berg          2011-05-13  698  
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  699  static int wiphy_verify_combinations(struct wiphy *wiphy)
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  700  {
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  701  	int i, ret;
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  702  
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  703  	if (wiphy->n_radio) {
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  704  		for (i = 0; i < wiphy->n_radio; i++) {
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  705  			const struct wiphy_radio *radio = &wiphy->radio[i];
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  706  
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  707  			ret = wiphy_verify_iface_combinations(wiphy,
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  708  							      radio->iface_combinations,
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  709  							      radio->n_iface_combinations);
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  710  			if (ret)
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  711  				return ret;
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  712  		}
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  713  	} else {
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  714  		ret = wiphy_verify_iface_combinations(wiphy,
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  715  						      wiphy->iface_combinations,
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  716  						      wiphy->n_iface_combinations);
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  717  	}
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  718  
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13 @719  	return ret;
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  720  }
acac11b3dc4e4f Karthikeyan Periyasamy 2024-08-13  721  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH v2] wifi: cfg80211: check radio iface combination for multi radio per wiphy
@ 2024-08-13  5:59 Karthikeyan Periyasamy
  2024-08-28 10:49 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Karthikeyan Periyasamy @ 2024-08-13  5:59 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Karthikeyan Periyasamy

Currently, wiphy_verify_combinations() fails for the multi-radio per wiphy
due to the condition check on global interface combination that DFS only
works on one channel. In a multi-radio scenario, global interface
combination encompasses the capabilities of all radio combinations, so it
supports more than one channel with DFS. For multi-radio per wiphy,
interface combination verification needs to be performed for radio specific
interface combinations. This is necessary as the global interface
combination combines the capabilities of all radio combinations.

Fixes: a01b1e9f9955 ("wifi: mac80211: add support for DFS with multiple radios")
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
 v2:
  - Rebased to ToT

 net/wireless/core.c | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/net/wireless/core.c b/net/wireless/core.c
index 4d5d351bd0b5..de33bdde1e29 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -603,16 +603,19 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
 }
 EXPORT_SYMBOL(wiphy_new_nm);
 
-static int wiphy_verify_combinations(struct wiphy *wiphy)
+static
+int wiphy_verify_iface_combinations(struct wiphy *wiphy,
+				    const struct ieee80211_iface_combination *iface_comb,
+				    int n_iface_comb)
 {
 	const struct ieee80211_iface_combination *c;
 	int i, j;
 
-	for (i = 0; i < wiphy->n_iface_combinations; i++) {
+	for (i = 0; i < n_iface_comb; i++) {
 		u32 cnt = 0;
 		u16 all_iftypes = 0;
 
-		c = &wiphy->iface_combinations[i];
+		c = &iface_comb[i];
 
 		/*
 		 * Combinations with just one interface aren't real,
@@ -693,6 +696,29 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
 	return 0;
 }
 
+static int wiphy_verify_combinations(struct wiphy *wiphy)
+{
+	int i, ret;
+
+	if (wiphy->n_radio) {
+		for (i = 0; i < wiphy->n_radio; i++) {
+			const struct wiphy_radio *radio = &wiphy->radio[i];
+
+			ret = wiphy_verify_iface_combinations(wiphy,
+							      radio->iface_combinations,
+							      radio->n_iface_combinations);
+			if (ret)
+				return ret;
+		}
+	} else {
+		ret = wiphy_verify_iface_combinations(wiphy,
+						      wiphy->iface_combinations,
+						      wiphy->n_iface_combinations);
+	}
+
+	return ret;
+}
+
 int wiphy_register(struct wiphy *wiphy)
 {
 	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);

base-commit: cc32e9fb380d8afdbf3486d7063d5520bfb0f071
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-28 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 16:39 [PATCH v2] wifi: cfg80211: check radio iface combination for multi radio per wiphy kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-08-13  5:59 Karthikeyan Periyasamy
2024-08-28 10:49 ` Johannes Berg
2024-08-28 10:51   ` Johannes Berg
2024-08-28 16:36   ` Karthikeyan Periyasamy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.