linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
@ 2024-08-12 12:09 root
  2024-08-12 17:49 ` kernel test robot
  2024-08-12 20:14 ` kernel test robot
  0 siblings, 2 replies; 13+ messages in thread
From: root @ 2024-08-12 12:09 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Issam Hamdi, Kretschmer Mathias

From: Issam Hamdi <ih@simonwunderlich.de>

When starting CAC in a mode other than AP mode, it return a
"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
caused by the chandef.chan being null at the end of CAC.

Solution: Ensure the channel definition is set for the different modes
when starting CAC to avoid getting a NULL 'chan' at the end of CAC.

 Call Trace:
  ? show_regs.part.0+0x14/0x16
  ? __warn+0x67/0xc0
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? report_bug+0xa7/0x130
  ? exc_overflow+0x30/0x30
  ? handle_bug+0x27/0x50
  ? exc_invalid_op+0x18/0x60
  ? handle_exception+0xf6/0xf6
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
  ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
  ? process_one_work+0x165/0x280
  ? worker_thread+0x120/0x3f0
  ? kthread+0xc2/0xf0
  ? process_one_work+0x280/0x280
  ? kthread_complete_and_exit+0x20/0x20
  ? ret_from_fork+0x19/0x24

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>
---
 net/wireless/nl80211.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7397a372c78e..d200c365339a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10143,7 +10143,21 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
 
 	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 	if (!err) {
-		wdev->links[0].ap.chandef = chandef;
+		switch (wdev->iftype) {
+		case NL80211_IFTYPE_MESH_POINT:
+			wdev->u.mesh.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_ADHOC:
+			wdev->u.ibss.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_OCB:
+			wdev->u.ocb.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_AP:
+		case NL80211_IFTYPE_P2P_GO:
+			wdev->links[0].ap.chandef = chandef;
+			break;
+		}
 		wdev->cac_started = true;
 		wdev->cac_start_time = jiffies;
 		wdev->cac_time_ms = cac_time_ms;
-- 
2.39.2


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

* Re: [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-12 12:09 [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC root
@ 2024-08-12 17:49 ` kernel test robot
  2024-08-12 20:14 ` kernel test robot
  1 sibling, 0 replies; 13+ messages in thread
From: kernel test robot @ 2024-08-12 17:49 UTC (permalink / raw)
  To: johannes; +Cc: oe-kbuild-all, linux-wireless, Issam Hamdi, Kretschmer Mathias

Hi root,

kernel test robot noticed the following build warnings:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.11-rc3 next-20240812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/root/cfg80211-Set-the-channel-definition-for-the-different-Wi-Fi-modes-when-starting-CAC/20240812-202257
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/20240812120909.2721400-1-root%40hissam.office.simonwunderlich.net
patch subject: [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
config: arm-u8500_defconfig (https://download.01.org/0day-ci/archive/20240813/202408130125.u2jlMVQM-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240813/202408130125.u2jlMVQM-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408130125.u2jlMVQM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/wireless/nl80211.c: In function 'nl80211_start_radar_detection':
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_UNSPECIFIED' not handled in switch [-Wswitch]
   10146 |                 switch (wdev->iftype) {
         |                 ^~~~~~
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_STATION' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_AP_VLAN' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_WDS' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_MONITOR' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_P2P_CLIENT' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_P2P_DEVICE' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_NAN' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NUM_NL80211_IFTYPES' not handled in switch [-Wswitch]
>> net/wireless/nl80211.c:10146:17: warning: enumeration value 'NL80211_IFTYPE_MAX' not handled in switch [-Wswitch]


vim +/NL80211_IFTYPE_UNSPECIFIED +10146 net/wireless/nl80211.c

 10068	
 10069	static int nl80211_start_radar_detection(struct sk_buff *skb,
 10070						 struct genl_info *info)
 10071	{
 10072		struct cfg80211_registered_device *rdev = info->user_ptr[0];
 10073		struct net_device *dev = info->user_ptr[1];
 10074		struct wireless_dev *wdev = dev->ieee80211_ptr;
 10075		struct wiphy *wiphy = wdev->wiphy;
 10076		struct cfg80211_chan_def chandef;
 10077		enum nl80211_dfs_regions dfs_region;
 10078		unsigned int cac_time_ms;
 10079		int err = -EINVAL;
 10080	
 10081		flush_delayed_work(&rdev->dfs_update_channels_wk);
 10082	
 10083		switch (wdev->iftype) {
 10084		case NL80211_IFTYPE_AP:
 10085		case NL80211_IFTYPE_P2P_GO:
 10086		case NL80211_IFTYPE_MESH_POINT:
 10087		case NL80211_IFTYPE_ADHOC:
 10088			break;
 10089		default:
 10090			/* caution - see cfg80211_beaconing_iface_active() below */
 10091			return -EINVAL;
 10092		}
 10093	
 10094		wiphy_lock(wiphy);
 10095	
 10096		dfs_region = reg_get_dfs_region(wiphy);
 10097		if (dfs_region == NL80211_DFS_UNSET)
 10098			goto unlock;
 10099	
 10100		err = nl80211_parse_chandef(rdev, info, &chandef);
 10101		if (err)
 10102			goto unlock;
 10103	
 10104		err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
 10105		if (err < 0)
 10106			goto unlock;
 10107	
 10108		if (err == 0) {
 10109			err = -EINVAL;
 10110			goto unlock;
 10111		}
 10112	
 10113		if (!cfg80211_chandef_dfs_usable(wiphy, &chandef)) {
 10114			err = -EINVAL;
 10115			goto unlock;
 10116		}
 10117	
 10118		if (nla_get_flag(info->attrs[NL80211_ATTR_RADAR_BACKGROUND])) {
 10119			err = cfg80211_start_background_radar_detection(rdev, wdev,
 10120									&chandef);
 10121			goto unlock;
 10122		}
 10123	
 10124		if (cfg80211_beaconing_iface_active(wdev) || wdev->cac_started) {
 10125			err = -EBUSY;
 10126			goto unlock;
 10127		}
 10128	
 10129		/* CAC start is offloaded to HW and can't be started manually */
 10130		if (wiphy_ext_feature_isset(wiphy, NL80211_EXT_FEATURE_DFS_OFFLOAD)) {
 10131			err = -EOPNOTSUPP;
 10132			goto unlock;
 10133		}
 10134	
 10135		if (!rdev->ops->start_radar_detection) {
 10136			err = -EOPNOTSUPP;
 10137			goto unlock;
 10138		}
 10139	
 10140		cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
 10141		if (WARN_ON(!cac_time_ms))
 10142			cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
 10143	
 10144		err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 10145		if (!err) {
 10146			switch (wdev->iftype) {
 10147			case NL80211_IFTYPE_MESH_POINT:
 10148				wdev->u.mesh.chandef = chandef;
 10149				break;
 10150			case NL80211_IFTYPE_ADHOC:
 10151				wdev->u.ibss.chandef = chandef;
 10152				break;
 10153			case NL80211_IFTYPE_OCB:
 10154				wdev->u.ocb.chandef = chandef;
 10155				break;
 10156			case NL80211_IFTYPE_AP:
 10157			case NL80211_IFTYPE_P2P_GO:
 10158				wdev->links[0].ap.chandef = chandef;
 10159				break;
 10160			}
 10161			wdev->cac_started = true;
 10162			wdev->cac_start_time = jiffies;
 10163			wdev->cac_time_ms = cac_time_ms;
 10164		}
 10165	unlock:
 10166		wiphy_unlock(wiphy);
 10167	
 10168		return err;
 10169	}
 10170	

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

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

* Re: [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-12 12:09 [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC root
  2024-08-12 17:49 ` kernel test robot
@ 2024-08-12 20:14 ` kernel test robot
  2024-08-13 11:12   ` Issam Hamdi
  1 sibling, 1 reply; 13+ messages in thread
From: kernel test robot @ 2024-08-12 20:14 UTC (permalink / raw)
  To: johannes
  Cc: llvm, oe-kbuild-all, linux-wireless, Issam Hamdi,
	Kretschmer Mathias

Hi root,

kernel test robot noticed the following build warnings:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.11-rc3 next-20240812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/root/cfg80211-Set-the-channel-definition-for-the-different-Wi-Fi-modes-when-starting-CAC/20240812-202257
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/20240812120909.2721400-1-root%40hissam.office.simonwunderlich.net
patch subject: [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
config: i386-buildonly-randconfig-005-20240813 (https://download.01.org/0day-ci/archive/20240813/202408130337.tnSP4Qys-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240813/202408130337.tnSP4Qys-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408130337.tnSP4Qys-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/wireless/nl80211.c:10146:11: warning: 9 enumeration values not handled in switch: 'NL80211_IFTYPE_UNSPECIFIED', 'NL80211_IFTYPE_STATION', 'NL80211_IFTYPE_AP_VLAN'... [-Wswitch]
    10146 |                 switch (wdev->iftype) {
          |                         ^~~~~~~~~~~~
   1 warning generated.


vim +10146 net/wireless/nl80211.c

 10068	
 10069	static int nl80211_start_radar_detection(struct sk_buff *skb,
 10070						 struct genl_info *info)
 10071	{
 10072		struct cfg80211_registered_device *rdev = info->user_ptr[0];
 10073		struct net_device *dev = info->user_ptr[1];
 10074		struct wireless_dev *wdev = dev->ieee80211_ptr;
 10075		struct wiphy *wiphy = wdev->wiphy;
 10076		struct cfg80211_chan_def chandef;
 10077		enum nl80211_dfs_regions dfs_region;
 10078		unsigned int cac_time_ms;
 10079		int err = -EINVAL;
 10080	
 10081		flush_delayed_work(&rdev->dfs_update_channels_wk);
 10082	
 10083		switch (wdev->iftype) {
 10084		case NL80211_IFTYPE_AP:
 10085		case NL80211_IFTYPE_P2P_GO:
 10086		case NL80211_IFTYPE_MESH_POINT:
 10087		case NL80211_IFTYPE_ADHOC:
 10088			break;
 10089		default:
 10090			/* caution - see cfg80211_beaconing_iface_active() below */
 10091			return -EINVAL;
 10092		}
 10093	
 10094		wiphy_lock(wiphy);
 10095	
 10096		dfs_region = reg_get_dfs_region(wiphy);
 10097		if (dfs_region == NL80211_DFS_UNSET)
 10098			goto unlock;
 10099	
 10100		err = nl80211_parse_chandef(rdev, info, &chandef);
 10101		if (err)
 10102			goto unlock;
 10103	
 10104		err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
 10105		if (err < 0)
 10106			goto unlock;
 10107	
 10108		if (err == 0) {
 10109			err = -EINVAL;
 10110			goto unlock;
 10111		}
 10112	
 10113		if (!cfg80211_chandef_dfs_usable(wiphy, &chandef)) {
 10114			err = -EINVAL;
 10115			goto unlock;
 10116		}
 10117	
 10118		if (nla_get_flag(info->attrs[NL80211_ATTR_RADAR_BACKGROUND])) {
 10119			err = cfg80211_start_background_radar_detection(rdev, wdev,
 10120									&chandef);
 10121			goto unlock;
 10122		}
 10123	
 10124		if (cfg80211_beaconing_iface_active(wdev) || wdev->cac_started) {
 10125			err = -EBUSY;
 10126			goto unlock;
 10127		}
 10128	
 10129		/* CAC start is offloaded to HW and can't be started manually */
 10130		if (wiphy_ext_feature_isset(wiphy, NL80211_EXT_FEATURE_DFS_OFFLOAD)) {
 10131			err = -EOPNOTSUPP;
 10132			goto unlock;
 10133		}
 10134	
 10135		if (!rdev->ops->start_radar_detection) {
 10136			err = -EOPNOTSUPP;
 10137			goto unlock;
 10138		}
 10139	
 10140		cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
 10141		if (WARN_ON(!cac_time_ms))
 10142			cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
 10143	
 10144		err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 10145		if (!err) {
 10146			switch (wdev->iftype) {
 10147			case NL80211_IFTYPE_MESH_POINT:
 10148				wdev->u.mesh.chandef = chandef;
 10149				break;
 10150			case NL80211_IFTYPE_ADHOC:
 10151				wdev->u.ibss.chandef = chandef;
 10152				break;
 10153			case NL80211_IFTYPE_OCB:
 10154				wdev->u.ocb.chandef = chandef;
 10155				break;
 10156			case NL80211_IFTYPE_AP:
 10157			case NL80211_IFTYPE_P2P_GO:
 10158				wdev->links[0].ap.chandef = chandef;
 10159				break;
 10160			}
 10161			wdev->cac_started = true;
 10162			wdev->cac_start_time = jiffies;
 10163			wdev->cac_time_ms = cac_time_ms;
 10164		}
 10165	unlock:
 10166		wiphy_unlock(wiphy);
 10167	
 10168		return err;
 10169	}
 10170	

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

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

* [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-12 20:14 ` kernel test robot
@ 2024-08-13 11:12   ` Issam Hamdi
  2024-08-15  6:35     ` Kalle Valo
  0 siblings, 1 reply; 13+ messages in thread
From: Issam Hamdi @ 2024-08-13 11:12 UTC (permalink / raw)
  To: lkp; +Cc: ih, johannes, linux-wireless, llvm, mathias.kretschmer,
	oe-kbuild-all

When starting CAC in a mode other than AP mode, it return a
"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
caused by the chandef.chan being null at the end of CAC.

Solution: Ensure the channel definition is set for the different modes
when starting CAC to avoid getting a NULL 'chan' at the end of CAC.

 Call Trace:
  ? show_regs.part.0+0x14/0x16
  ? __warn+0x67/0xc0
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? report_bug+0xa7/0x130
  ? exc_overflow+0x30/0x30
  ? handle_bug+0x27/0x50
  ? exc_invalid_op+0x18/0x60
  ? handle_exception+0xf6/0xf6
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
  ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
  ? process_one_work+0x165/0x280
  ? worker_thread+0x120/0x3f0
  ? kthread+0xc2/0xf0
  ? process_one_work+0x280/0x280
  ? kthread_complete_and_exit+0x20/0x20
  ? ret_from_fork+0x19/0x24

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>
---
 net/wireless/nl80211.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7397a372c78e..36ae2594753e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10143,7 +10143,23 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
 
 	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 	if (!err) {
-		wdev->links[0].ap.chandef = chandef;
+		switch (wdev->iftype) {
+		case NL80211_IFTYPE_MESH_POINT:
+			wdev->u.mesh.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_ADHOC:
+			wdev->u.ibss.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_OCB:
+			wdev->u.ocb.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_AP:
+		case NL80211_IFTYPE_P2P_GO:
+			wdev->links[0].ap.chandef = chandef;
+			break;
+		default:
+			break;
+		}
 		wdev->cac_started = true;
 		wdev->cac_start_time = jiffies;
 		wdev->cac_time_ms = cac_time_ms;

base-commit: cc32e9fb380d8afdbf3486d7063d5520bfb0f071
-- 
2.39.2


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

* Re: [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-13 11:12   ` Issam Hamdi
@ 2024-08-15  6:35     ` Kalle Valo
  2024-08-15  7:54       ` [PATCH] wifi: " Issam Hamdi
  0 siblings, 1 reply; 13+ messages in thread
From: Kalle Valo @ 2024-08-15  6:35 UTC (permalink / raw)
  To: Issam Hamdi
  Cc: lkp, johannes, linux-wireless, llvm, mathias.kretschmer,
	oe-kbuild-all

Issam Hamdi <ih@simonwunderlich.de> writes:

> When starting CAC in a mode other than AP mode, it return a
> "WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
> caused by the chandef.chan being null at the end of CAC.
>
> Solution: Ensure the channel definition is set for the different modes
> when starting CAC to avoid getting a NULL 'chan' at the end of CAC.
>
>  Call Trace:
>   ? show_regs.part.0+0x14/0x16
>   ? __warn+0x67/0xc0
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? report_bug+0xa7/0x130
>   ? exc_overflow+0x30/0x30
>   ? handle_bug+0x27/0x50
>   ? exc_invalid_op+0x18/0x60
>   ? handle_exception+0xf6/0xf6
>   ? exc_overflow+0x30/0x30
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? exc_overflow+0x30/0x30
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
>   ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
>   ? process_one_work+0x165/0x280
>   ? worker_thread+0x120/0x3f0
>   ? kthread+0xc2/0xf0
>   ? process_one_work+0x280/0x280
>   ? kthread_complete_and_exit+0x20/0x20
>   ? ret_from_fork+0x19/0x24
>
> Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
> Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>

'wifi:' missing from the subject.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* [PATCH] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-15  6:35     ` Kalle Valo
@ 2024-08-15  7:54       ` Issam Hamdi
  2024-08-15  8:53         ` Kalle Valo
  0 siblings, 1 reply; 13+ messages in thread
From: Issam Hamdi @ 2024-08-15  7:54 UTC (permalink / raw)
  To: kvalo
  Cc: ih, johannes, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all

When starting CAC in a mode other than AP mode, it return a
"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
caused by the chandef.chan being null at the end of CAC.

Solution: Ensure the channel definition is set for the different modes
when starting CAC to avoid getting a NULL 'chan' at the end of CAC.

 Call Trace:
  ? show_regs.part.0+0x14/0x16
  ? __warn+0x67/0xc0
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? report_bug+0xa7/0x130
  ? exc_overflow+0x30/0x30
  ? handle_bug+0x27/0x50
  ? exc_invalid_op+0x18/0x60
  ? handle_exception+0xf6/0xf6
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
  ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
  ? process_one_work+0x165/0x280
  ? worker_thread+0x120/0x3f0
  ? kthread+0xc2/0xf0
  ? process_one_work+0x280/0x280
  ? kthread_complete_and_exit+0x20/0x20
  ? ret_from_fork+0x19/0x24

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>
---
 net/wireless/nl80211.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7397a372c78e..36ae2594753e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10143,7 +10143,23 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
 
 	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 	if (!err) {
-		wdev->links[0].ap.chandef = chandef;
+		switch (wdev->iftype) {
+		case NL80211_IFTYPE_MESH_POINT:
+			wdev->u.mesh.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_ADHOC:
+			wdev->u.ibss.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_OCB:
+			wdev->u.ocb.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_AP:
+		case NL80211_IFTYPE_P2P_GO:
+			wdev->links[0].ap.chandef = chandef;
+			break;
+		default:
+			break;
+		}
 		wdev->cac_started = true;
 		wdev->cac_start_time = jiffies;
 		wdev->cac_time_ms = cac_time_ms;

base-commit: cc32e9fb380d8afdbf3486d7063d5520bfb0f071
-- 
2.39.2


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

* Re: [PATCH] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-15  7:54       ` [PATCH] wifi: " Issam Hamdi
@ 2024-08-15  8:53         ` Kalle Valo
  2024-08-15 11:32           ` [PATCH v2] " Issam Hamdi
  0 siblings, 1 reply; 13+ messages in thread
From: Kalle Valo @ 2024-08-15  8:53 UTC (permalink / raw)
  To: Issam Hamdi
  Cc: johannes, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all

Issam Hamdi <ih@simonwunderlich.de> writes:

> When starting CAC in a mode other than AP mode, it return a
> "WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
> caused by the chandef.chan being null at the end of CAC.
>
> Solution: Ensure the channel definition is set for the different modes
> when starting CAC to avoid getting a NULL 'chan' at the end of CAC.
>
>  Call Trace:
>   ? show_regs.part.0+0x14/0x16
>   ? __warn+0x67/0xc0
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? report_bug+0xa7/0x130
>   ? exc_overflow+0x30/0x30
>   ? handle_bug+0x27/0x50
>   ? exc_invalid_op+0x18/0x60
>   ? handle_exception+0xf6/0xf6
>   ? exc_overflow+0x30/0x30
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? exc_overflow+0x30/0x30
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
>   ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
>   ? process_one_work+0x165/0x280
>   ? worker_thread+0x120/0x3f0
>   ? kthread+0xc2/0xf0
>   ? process_one_work+0x280/0x280
>   ? kthread_complete_and_exit+0x20/0x20
>   ? ret_from_fork+0x19/0x24
>
> Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
> Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>

When you submit a new version you should mark it as v2 and include a
change log what has changed from v1. More info:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing

And please read the whole wiki page.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* [PATCH v2] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-15  8:53         ` Kalle Valo
@ 2024-08-15 11:32           ` Issam Hamdi
  2024-08-15 17:42             ` Jeff Johnson
  0 siblings, 1 reply; 13+ messages in thread
From: Issam Hamdi @ 2024-08-15 11:32 UTC (permalink / raw)
  To: kvalo
  Cc: ih, johannes, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all

When starting CAC in a mode other than AP mode, it return a
"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
caused by the chandef.chan being null at the end of CAC.

Solution: Ensure the channel definition is set for the different modes
when starting CAC to avoid getting a NULL 'chan' at the end of CAC.

 Call Trace:
  ? show_regs.part.0+0x14/0x16
  ? __warn+0x67/0xc0
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? report_bug+0xa7/0x130
  ? exc_overflow+0x30/0x30
  ? handle_bug+0x27/0x50
  ? exc_invalid_op+0x18/0x60
  ? handle_exception+0xf6/0xf6
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
  ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
  ? process_one_work+0x165/0x280
  ? worker_thread+0x120/0x3f0
  ? kthread+0xc2/0xf0
  ? process_one_work+0x280/0x280
  ? kthread_complete_and_exit+0x20/0x20
  ? ret_from_fork+0x19/0x24

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>
---
v2: update the subject
---
 net/wireless/nl80211.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7397a372c78e..36ae2594753e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10143,7 +10143,23 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
 
 	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 	if (!err) {
-		wdev->links[0].ap.chandef = chandef;
+		switch (wdev->iftype) {
+		case NL80211_IFTYPE_MESH_POINT:
+			wdev->u.mesh.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_ADHOC:
+			wdev->u.ibss.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_OCB:
+			wdev->u.ocb.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_AP:
+		case NL80211_IFTYPE_P2P_GO:
+			wdev->links[0].ap.chandef = chandef;
+			break;
+		default:
+			break;
+		}
 		wdev->cac_started = true;
 		wdev->cac_start_time = jiffies;
 		wdev->cac_time_ms = cac_time_ms;

base-commit: cc32e9fb380d8afdbf3486d7063d5520bfb0f071
-- 
2.39.2


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

* Re: [PATCH v2] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-15 11:32           ` [PATCH v2] " Issam Hamdi
@ 2024-08-15 17:42             ` Jeff Johnson
  2024-08-16 14:24               ` [PATCH v3] " Issam Hamdi
  0 siblings, 1 reply; 13+ messages in thread
From: Jeff Johnson @ 2024-08-15 17:42 UTC (permalink / raw)
  To: Issam Hamdi, kvalo
  Cc: johannes, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all

On 8/15/2024 4:32 AM, Issam Hamdi wrote:
> When starting CAC in a mode other than AP mode, it return a
> "WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
> caused by the chandef.chan being null at the end of CAC.
> 
> Solution: Ensure the channel definition is set for the different modes
> when starting CAC to avoid getting a NULL 'chan' at the end of CAC.
> 
>  Call Trace:
>   ? show_regs.part.0+0x14/0x16
>   ? __warn+0x67/0xc0
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? report_bug+0xa7/0x130
>   ? exc_overflow+0x30/0x30
>   ? handle_bug+0x27/0x50
>   ? exc_invalid_op+0x18/0x60
>   ? handle_exception+0xf6/0xf6
>   ? exc_overflow+0x30/0x30
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? exc_overflow+0x30/0x30
>   ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
>   ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
>   ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
>   ? process_one_work+0x165/0x280
>   ? worker_thread+0x120/0x3f0
>   ? kthread+0xc2/0xf0
>   ? process_one_work+0x280/0x280
>   ? kthread_complete_and_exit+0x20/0x20
>   ? ret_from_fork+0x19/0x24
> 
> Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
> Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>

who is this and why is their S-O-B here?
the last S-O-B should be the person who last touched the patch, which is you

please see:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

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

* [PATCH v3] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-15 17:42             ` Jeff Johnson
@ 2024-08-16 14:24               ` Issam Hamdi
  2024-08-23 10:42                 ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Issam Hamdi @ 2024-08-16 14:24 UTC (permalink / raw)
  To: quic_jjohnson
  Cc: ih, johannes, kvalo, linux-wireless, lkp, llvm,
	mathias.kretschmer, oe-kbuild-all

When starting CAC in a mode other than AP mode, it return a
"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
caused by the chandef.chan being null at the end of CAC.

Solution: Ensure the channel definition is set for the different modes
when starting CAC to avoid getting a NULL 'chan' at the end of CAC.

 Call Trace:
  ? show_regs.part.0+0x14/0x16
  ? __warn+0x67/0xc0
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? report_bug+0xa7/0x130
  ? exc_overflow+0x30/0x30
  ? handle_bug+0x27/0x50
  ? exc_invalid_op+0x18/0x60
  ? handle_exception+0xf6/0xf6
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
  ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
  ? process_one_work+0x165/0x280
  ? worker_thread+0x120/0x3f0
  ? kthread+0xc2/0xf0
  ? process_one_work+0x280/0x280
  ? kthread_complete_and_exit+0x20/0x20
  ? ret_from_fork+0x19/0x24

Reported-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>
Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
---
v2: update the subject
v3: update the second Signed-off-by to Reported-by
---
 net/wireless/nl80211.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7397a372c78e..36ae2594753e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10143,7 +10143,23 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
 
 	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 	if (!err) {
-		wdev->links[0].ap.chandef = chandef;
+		switch (wdev->iftype) {
+		case NL80211_IFTYPE_MESH_POINT:
+			wdev->u.mesh.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_ADHOC:
+			wdev->u.ibss.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_OCB:
+			wdev->u.ocb.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_AP:
+		case NL80211_IFTYPE_P2P_GO:
+			wdev->links[0].ap.chandef = chandef;
+			break;
+		default:
+			break;
+		}
 		wdev->cac_started = true;
 		wdev->cac_start_time = jiffies;
 		wdev->cac_time_ms = cac_time_ms;

base-commit: cc32e9fb380d8afdbf3486d7063d5520bfb0f071
-- 
2.39.2


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

* Re: [PATCH v3] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-16 14:24               ` [PATCH v3] " Issam Hamdi
@ 2024-08-23 10:42                 ` Johannes Berg
  2024-08-26  9:51                   ` Hamdi Issam
  2024-08-29  9:09                   ` [PATCH v4] " Issam Hamdi
  0 siblings, 2 replies; 13+ messages in thread
From: Johannes Berg @ 2024-08-23 10:42 UTC (permalink / raw)
  To: Issam Hamdi, quic_jjohnson
  Cc: kvalo, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all

On Fri, 2024-08-16 at 16:24 +0200, Issam Hamdi wrote:
> 
> @@ -10143,7 +10143,23 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
>  
>  	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
>  	if (!err) {
> -		wdev->links[0].ap.chandef = chandef;
> +		switch (wdev->iftype) {
> +		case NL80211_IFTYPE_MESH_POINT:
> +			wdev->u.mesh.chandef = chandef;
> +			break;
> +		case NL80211_IFTYPE_ADHOC:
> +			wdev->u.ibss.chandef = chandef;
> +			break;
> +		case NL80211_IFTYPE_OCB:
> +			wdev->u.ocb.chandef = chandef;
> +			break;
> 

OCB cannot even get to this code given earlier conditions, why are you
adding it here?


I guess this should conflict:

https://lore.kernel.org/linux-wireless/20240711035147.1896538-1-quic_adisi@quicinc.com/

but it's probably not too hard to resolve that.

johannes

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

* Re: [PATCH v3] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-23 10:42                 ` Johannes Berg
@ 2024-08-26  9:51                   ` Hamdi Issam
  2024-08-29  9:09                   ` [PATCH v4] " Issam Hamdi
  1 sibling, 0 replies; 13+ messages in thread
From: Hamdi Issam @ 2024-08-26  9:51 UTC (permalink / raw)
  To: Johannes Berg, quic_jjohnson
  Cc: kvalo, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all

Hello,

On 8/23/24 12:42, Johannes Berg wrote:
> On Fri, 2024-08-16 at 16:24 +0200, Issam Hamdi wrote:
>> @@ -10143,7 +10143,23 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
>>   
>>   	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
>>   	if (!err) {
>> -		wdev->links[0].ap.chandef = chandef;
>> +		switch (wdev->iftype) {
>> +		case NL80211_IFTYPE_MESH_POINT:
>> +			wdev->u.mesh.chandef = chandef;
>> +			break;
>> +		case NL80211_IFTYPE_ADHOC:
>> +			wdev->u.ibss.chandef = chandef;
>> +			break;
>> +		case NL80211_IFTYPE_OCB:
>> +			wdev->u.ocb.chandef = chandef;
>> +			break;
>>
> OCB cannot even get to this code given earlier conditions, why are you
> adding it here?

Actually I didn't test it with OCB mode, I added the check on the 
different modes to make sure that the function "wdev_chandef" return a 
no NULL chandef for the different modes.

I will remove the check on the OCB mode, if it will impact other 
implementation.

>
> I guess this should conflict:
>
> https://lore.kernel.org/linux-wireless/20240711035147.1896538-1-quic_adisi@quicinc.com/
>
> but it's probably not too hard to resolve that.
>
> johannes
Issam

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

* [PATCH v4] wifi: cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC
  2024-08-23 10:42                 ` Johannes Berg
  2024-08-26  9:51                   ` Hamdi Issam
@ 2024-08-29  9:09                   ` Issam Hamdi
  1 sibling, 0 replies; 13+ messages in thread
From: Issam Hamdi @ 2024-08-29  9:09 UTC (permalink / raw)
  To: johannes
  Cc: ih, kvalo, linux-wireless, lkp, llvm, mathias.kretschmer,
	oe-kbuild-all, quic_jjohnson

When starting CAC in a mode other than AP mode, it return a
"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]"
caused by the chandef.chan being null at the end of CAC.

Solution: Ensure the channel definition is set for the different modes
when starting CAC to avoid getting a NULL 'chan' at the end of CAC.

 Call Trace:
  ? show_regs.part.0+0x14/0x16
  ? __warn+0x67/0xc0
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? report_bug+0xa7/0x130
  ? exc_overflow+0x30/0x30
  ? handle_bug+0x27/0x50
  ? exc_invalid_op+0x18/0x60
  ? handle_exception+0xf6/0xf6
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? exc_overflow+0x30/0x30
  ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]
  ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211]
  ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211]
  ? process_one_work+0x165/0x280
  ? worker_thread+0x120/0x3f0
  ? kthread+0xc2/0xf0
  ? process_one_work+0x280/0x280
  ? kthread_complete_and_exit+0x20/0x20
  ? ret_from_fork+0x19/0x24

Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
Signed-off-by: Kretschmer Mathias <mathias.kretschmer@fit.fraunhofer.de>
---
---
v2: update the subject
v3: update the second Signed-off-by to Reported-by
v4: Remove the check on the OCB mode
---
 net/wireless/nl80211.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7397a372c78e..60cf6d3dd3ca 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10143,7 +10143,20 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
 
 	err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms);
 	if (!err) {
-		wdev->links[0].ap.chandef = chandef;
+		switch (wdev->iftype) {
+		case NL80211_IFTYPE_MESH_POINT:
+			wdev->u.mesh.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_ADHOC:
+			wdev->u.ibss.chandef = chandef;
+			break;
+		case NL80211_IFTYPE_AP:
+		case NL80211_IFTYPE_P2P_GO:
+			wdev->links[0].ap.chandef = chandef;
+			break;
+		default:
+			break;
+		}
 		wdev->cac_started = true;
 		wdev->cac_start_time = jiffies;
 		wdev->cac_time_ms = cac_time_ms;

base-commit: cc32e9fb380d8afdbf3486d7063d5520bfb0f071
-- 
2.39.2


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

end of thread, other threads:[~2024-08-29  9:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 12:09 [PATCH] cfg80211: Set the channel definition for the different Wi-Fi modes when starting CAC root
2024-08-12 17:49 ` kernel test robot
2024-08-12 20:14 ` kernel test robot
2024-08-13 11:12   ` Issam Hamdi
2024-08-15  6:35     ` Kalle Valo
2024-08-15  7:54       ` [PATCH] wifi: " Issam Hamdi
2024-08-15  8:53         ` Kalle Valo
2024-08-15 11:32           ` [PATCH v2] " Issam Hamdi
2024-08-15 17:42             ` Jeff Johnson
2024-08-16 14:24               ` [PATCH v3] " Issam Hamdi
2024-08-23 10:42                 ` Johannes Berg
2024-08-26  9:51                   ` Hamdi Issam
2024-08-29  9:09                   ` [PATCH v4] " Issam Hamdi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).