Skip to contentSkip to conversation

drivers/net/wireless/virtual/virt_wifi.c:151:24: error: initializer element is not constant

PATCH kernel test robot 1 participant 1 message Jul 9, 2024

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
head:   b3603133d3b727b0b07a7094ab74cf27c8aee3bd
commit: b5d14b0c6716fad7f0c94ac6e1d6f60a49f985c7 [24/27] wifi: virt_wifi: avoid reporting connection success with wrong SSID
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240709/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240709/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

drivers/net/wireless/virtual/virt_wifi.c: In function 'virt_wifi_inform_bss':

>> drivers/net/wireless/virtual/virt_wifi.c:151:24: error: initializer element is not constant

151 | .len = strlen(VIRT_WIFI_SSID),
| ^~~~~~
drivers/net/wireless/virtual/virt_wifi.c:151:24: note: (near initialization for 'ssid.len')

vim +151 drivers/net/wireless/virtual/virt_wifi.c

140
141 static void virt_wifi_inform_bss(struct wiphy *wiphy)
142 {
143 u64 tsf = div_u64(ktime_get_boottime_ns(), 1000);
144 struct cfg80211_bss *informed_bss;
145 static const struct {
146 u8 tag;
147 u8 len;
148 u8 ssid[8];
149 } __packed ssid = {
150 .tag = WLAN_EID_SSID,

 > 151			.len = strlen(VIRT_WIFI_SSID),
   152			.ssid = VIRT_WIFI_SSID,
   153		};
   154	
   155		informed_bss = cfg80211_inform_bss(wiphy, &channel_5ghz,
   156						   CFG80211_BSS_FTYPE_PRESP,
   157						   fake_router_bssid, tsf,
   158						   WLAN_CAPABILITY_ESS, 0,
   159						   (void *)&ssid, sizeof(ssid),
   160						   DBM_TO_MBM(-50), GFP_KERNEL);

161 cfg80211_put_bss(wiphy, informed_bss);
162 }
163

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