Hi Tawah, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Tawah-Peggy/Staging-wlan-ng-cfg80211-A-better-fix-for-Lines-should-end-with-a/20210914-020515 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 8757f705d936ad9579110aa621995172539aa16b config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/d94af532d09e347e4e331da138f658a49199354f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Tawah-Peggy/Staging-wlan-ng-cfg80211-A-better-fix-for-Lines-should-end-with-a/20210914-020515 git checkout d94af532d09e347e4e331da138f658a49199354f # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from drivers/staging/wlan-ng/p80211netdev.c:92: drivers/staging/wlan-ng/cfg80211.c: In function 'prism2_scan': >> drivers/staging/wlan-ng/cfg80211.c:331:25: error: implicit declaration of function 'ieee80211_freq_to_channel'; did you mean 'ieee80211_freq_khz_to_channel'? [-Werror=implicit-function-declaration] 331 | ieee80211_freq_to_channel(request->channels[i]->center_freq); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | ieee80211_freq_khz_to_channel cc1: all warnings being treated as errors vim +331 drivers/staging/wlan-ng/cfg80211.c 271 272 static int prism2_scan(struct wiphy *wiphy, 273 struct cfg80211_scan_request *request) 274 { 275 struct net_device *dev; 276 struct prism2_wiphy_private *priv = wiphy_priv(wiphy); 277 struct wlandevice *wlandev; 278 struct p80211msg_dot11req_scan msg1; 279 struct p80211msg_dot11req_scan_results *msg2; 280 struct cfg80211_bss *bss; 281 struct cfg80211_scan_info info = {}; 282 283 int result; 284 int err = 0; 285 int numbss = 0; 286 int i = 0; 287 u8 ie_buf[46]; 288 int ie_len; 289 290 if (!request) 291 return -EINVAL; 292 293 dev = request->wdev->netdev; 294 wlandev = dev->ml_priv; 295 296 if (priv->scan_request && priv->scan_request != request) 297 return -EBUSY; 298 299 if (wlandev->macmode == WLAN_MACMODE_ESS_AP) { 300 netdev_err(dev, "Can't scan in AP mode\n"); 301 return -EOPNOTSUPP; 302 } 303 304 msg2 = kzalloc(sizeof(*msg2), GFP_KERNEL); 305 if (!msg2) 306 return -ENOMEM; 307 308 priv->scan_request = request; 309 310 memset(&msg1, 0x00, sizeof(msg1)); 311 msg1.msgcode = DIDMSG_DOT11REQ_SCAN; 312 msg1.bsstype.data = P80211ENUM_bsstype_any; 313 314 memset(&msg1.bssid.data.data, 0xFF, sizeof(msg1.bssid.data.data)); 315 msg1.bssid.data.len = 6; 316 317 if (request->n_ssids > 0) { 318 msg1.scantype.data = P80211ENUM_scantype_active; 319 msg1.ssid.data.len = request->ssids->ssid_len; 320 memcpy(msg1.ssid.data.data, 321 request->ssids->ssid, request->ssids->ssid_len); 322 } else { 323 msg1.scantype.data = 0; 324 } 325 msg1.probedelay.data = 0; 326 327 for (i = 0; 328 (i < request->n_channels) && i < ARRAY_SIZE(prism2_channels); 329 i++) 330 msg1.channellist.data.data[i] = > 331 ieee80211_freq_to_channel(request->channels[i]->center_freq); 332 msg1.channellist.data.len = request->n_channels; 333 334 msg1.maxchanneltime.data = 250; 335 msg1.minchanneltime.data = 200; 336 337 result = p80211req_dorequest(wlandev, (u8 *)&msg1); 338 if (result) { 339 err = prism2_result2err(msg1.resultcode.data); 340 goto exit; 341 } 342 /* Now retrieve scan results */ 343 numbss = msg1.numbss.data; 344 345 for (i = 0; i < numbss; i++) { 346 int freq; 347 348 msg2->msgcode = DIDMSG_DOT11REQ_SCAN_RESULTS; 349 msg2->bssindex.data = i; 350 351 result = p80211req_dorequest(wlandev, (u8 *)&msg2); 352 if ((result != 0) || 353 (msg2->resultcode.data != P80211ENUM_resultcode_success)) { 354 break; 355 } 356 357 ie_buf[0] = WLAN_EID_SSID; 358 ie_buf[1] = msg2->ssid.data.len; 359 ie_len = ie_buf[1] + 2; 360 memcpy(&ie_buf[2], &msg2->ssid.data.data, msg2->ssid.data.len); 361 freq = ieee80211_channel_to_frequency(msg2->dschannel.data, 362 NL80211_BAND_2GHZ); 363 bss = cfg80211_inform_bss(wiphy, 364 ieee80211_get_channel(wiphy, freq), 365 CFG80211_BSS_FTYPE_UNKNOWN, 366 (const u8 *)&msg2->bssid.data.data, 367 msg2->timestamp.data, msg2->capinfo.data, 368 msg2->beaconperiod.data, 369 ie_buf, 370 ie_len, 371 (msg2->signal.data - 65536) * 100, /* Conversion to signed type */ 372 GFP_KERNEL); 373 374 if (!bss) { 375 err = -ENOMEM; 376 goto exit; 377 } 378 379 cfg80211_put_bss(wiphy, bss); 380 } 381 382 if (result) 383 err = prism2_result2err(msg2->resultcode.data); 384 385 exit: 386 info.aborted = !!(err); 387 cfg80211_scan_done(request, &info); 388 priv->scan_request = NULL; 389 kfree(msg2); 390 return err; 391 } 392 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org