Search Linux Wireless

Re: [PATCH wireless-next] wifi: mac80211: fix WARN_ON for monitor mode on some devices

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

 



Hi Johannes,

kernel test robot noticed the following build errors:

[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v6.16-rc7 next-20250722]
[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/Johannes-Berg/wifi-mac80211-fix-WARN_ON-for-monitor-mode-on-some-devices/20250722-233552
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/20250722152517.30340-2-johannes%40sipsolutions.net
patch subject: [PATCH wireless-next] wifi: mac80211: fix WARN_ON for monitor mode on some devices
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250723/202507230413.YIpXeSjn-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250723/202507230413.YIpXeSjn-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507230413.YIpXeSjn-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   net/mac80211/main.c: In function 'ieee80211_link_info_change_notify':
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_UNSPECIFIED' not handled in switch [-Wswitch]
     414 |         switch (sdata->vif.type)
         |         ^~~~~~
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_ADHOC' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_STATION' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_AP' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_WDS' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_MONITOR' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_MESH_POINT' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_P2P_CLIENT' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_P2P_GO' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_P2P_DEVICE' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_OCB' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_NAN' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NUM_NL80211_IFTYPES' not handled in switch [-Wswitch]
>> net/mac80211/main.c:414:9: warning: enumeration value 'NL80211_IFTYPE_MAX' not handled in switch [-Wswitch]
>> net/mac80211/main.c:417:9: error: case label not within a switch statement
     417 |         case NL80211_IFTYPE_MONITOR:
         |         ^~~~
>> net/mac80211/main.c:420:17: error: break statement not within loop or switch
     420 |                 break;
         |                 ^~~~~
>> net/mac80211/main.c:421:9: error: 'default' label not within a switch statement
     421 |         default:
         |         ^~~~~~~
   net/mac80211/main.c:422:17: error: break statement not within loop or switch
     422 |                 break;
         |                 ^~~~~
   net/mac80211/main.c: At top level:
>> net/mac80211/main.c:425:9: error: expected identifier or '(' before 'if'
     425 |         if (!check_sdata_in_driver(sdata))
         |         ^~
   In file included from net/mac80211/main.c:30:
>> net/mac80211/driver-ops.h:22:2: error: expected identifier or '(' before ')' token
      22 | })
         |  ^
   net/mac80211/main.c:425:14: note: in expansion of macro 'check_sdata_in_driver'
     425 |         if (!check_sdata_in_driver(sdata))
         |              ^~~~~~~~~~~~~~~~~~~~~
>> net/mac80211/main.c:428:49: error: expected ')' before '->' token
     428 |         drv_link_info_changed(local, sdata, link->conf, link->link_id, changed);
         |                                                 ^~
         |                                                 )
   net/mac80211/main.c:429:1: error: expected identifier or '(' before '}' token
     429 | }
         | ^


vim +417 net/mac80211/main.c

   402	
   403	void ieee80211_link_info_change_notify(struct ieee80211_sub_if_data *sdata,
   404					       struct ieee80211_link_data *link,
   405					       u64 changed)
   406	{
   407		struct ieee80211_local *local = sdata->local;
   408	
   409		WARN_ON_ONCE(changed & BSS_CHANGED_VIF_CFG_FLAGS);
   410	
   411		if (!changed)
   412			return;
   413	
 > 414		switch (sdata->vif.type)
   415		case NL80211_IFTYPE_AP_VLAN:
   416			return;
 > 417		case NL80211_IFTYPE_MONITOR:
   418			if (!ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
   419				return;
 > 420			break;
 > 421		default:
   422			break;
   423		}
   424	
 > 425		if (!check_sdata_in_driver(sdata))
   426			return;
   427	
 > 428		drv_link_info_changed(local, sdata, link->conf, link->link_id, changed);
 > 429	}
   430	

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




[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