Search Linux Wireless

[wireless-next:main 24/27] drivers/net/wireless/virtual/virt_wifi.c:151:24: error: initializer element is not constant

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

 



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/202407090934.NnR1TUbW-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240709/202407090934.NnR1TUbW-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/202407090934.NnR1TUbW-lkp@xxxxxxxxx/

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	

-- 
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