Hi Fabio, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Fabio-Aiuto/staging-rtl8723bs-remove-RT_TRACE-logs-in-core/20210402-180617 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 305271ab4f54f9ae7b9080473d1699c9511ae235 config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.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/82938cd5ff3eee363edd3d213473b248daa1be0c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Fabio-Aiuto/staging-rtl8723bs-remove-RT_TRACE-logs-in-core/20210402-180617 git checkout 82938cd5ff3eee363edd3d213473b248daa1be0c # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): drivers/staging/rtl8723bs/core/rtw_wlan_util.c: In function 'rtw_check_bcn_info': >> drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1379:5: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 1379 | ; | ^ drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1386:6: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 1386 | ; | ^ drivers/staging/rtl8723bs/core/rtw_wlan_util.c: In function 'process_addba_req': drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1776:11: warning: variable 'start_seq' set but not used [-Wunused-but-set-variable] 1776 | u16 tid, start_seq, param; | ^~~~~~~~~ In file included from drivers/staging/rtl8723bs/include/drv_types.h:33, from drivers/staging/rtl8723bs/core/rtw_wlan_util.c:9: At top level: drivers/staging/rtl8723bs/include/rtw_security.h:336:28: warning: 'K' defined but not used [-Wunused-const-variable=] 336 | static const unsigned long K[64] = { | ^ vim +/if +1379 drivers/staging/rtl8723bs/core/rtw_wlan_util.c 1213 1214 int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) 1215 { 1216 unsigned int len; 1217 unsigned char *p; 1218 unsigned short val16, subtype; 1219 struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network); 1220 /* u8 wpa_ie[255], rsn_ie[255]; */ 1221 u16 wpa_len = 0, rsn_len = 0; 1222 u8 encryp_protocol = 0; 1223 struct wlan_bssid_ex *bssid; 1224 int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0; 1225 unsigned char *pbuf; 1226 u32 wpa_ielen = 0; 1227 u8 *pbssid = GetAddr3Ptr(pframe); 1228 struct HT_info_element *pht_info = NULL; 1229 struct ieee80211_ht_cap *pht_cap = NULL; 1230 u32 bcn_channel; 1231 unsigned short ht_cap_info; 1232 unsigned char ht_info_infos_0; 1233 struct mlme_priv *pmlmepriv = &Adapter->mlmepriv; 1234 int ssid_len; 1235 1236 if (is_client_associated_to_ap(Adapter) == false) 1237 return true; 1238 1239 len = packet_len - sizeof(struct ieee80211_hdr_3addr); 1240 1241 if (len > MAX_IE_SZ) { 1242 DBG_871X("%s IE too long for survey event\n", __func__); 1243 return _FAIL; 1244 } 1245 1246 if (memcmp(cur_network->network.MacAddress, pbssid, 6)) { 1247 DBG_871X("Oops: rtw_check_network_encrypt linked but recv other bssid bcn %pM %pM\n", 1248 MAC_ARG(pbssid), MAC_ARG(cur_network->network.MacAddress)); 1249 return true; 1250 } 1251 1252 bssid = rtw_zmalloc(sizeof(struct wlan_bssid_ex)); 1253 if (!bssid) { 1254 DBG_871X("%s rtw_zmalloc fail !!!\n", __func__); 1255 return true; 1256 } 1257 1258 if ((pmlmepriv->timeBcnInfoChkStart != 0) && (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) > DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)) { 1259 pmlmepriv->timeBcnInfoChkStart = 0; 1260 pmlmepriv->NumOfBcnInfoChkFail = 0; 1261 } 1262 1263 subtype = GetFrameSubType(pframe) >> 4; 1264 1265 if (subtype == WIFI_BEACON) 1266 bssid->Reserved[0] = 1; 1267 1268 bssid->Length = sizeof(struct wlan_bssid_ex) - MAX_IE_SZ + len; 1269 1270 /* below is to copy the information element */ 1271 bssid->IELength = len; 1272 memcpy(bssid->IEs, (pframe + sizeof(struct ieee80211_hdr_3addr)), bssid->IELength); 1273 1274 /* check bw and channel offset */ 1275 /* parsing HT_CAP_IE */ 1276 p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_CAPABILITY, &len, bssid->IELength - _FIXED_IE_LENGTH_); 1277 if (p && len > 0) { 1278 pht_cap = (struct ieee80211_ht_cap *)(p + 2); 1279 ht_cap_info = le16_to_cpu(pht_cap->cap_info); 1280 } else { 1281 ht_cap_info = 0; 1282 } 1283 /* parsing HT_INFO_IE */ 1284 p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_); 1285 if (p && len > 0) { 1286 pht_info = (struct HT_info_element *)(p + 2); 1287 ht_info_infos_0 = pht_info->infos[0]; 1288 } else { 1289 ht_info_infos_0 = 0; 1290 } 1291 if (ht_cap_info != cur_network->BcnInfo.ht_cap_info || 1292 ((ht_info_infos_0&0x03) != (cur_network->BcnInfo.ht_info_infos_0&0x03))) { 1293 DBG_871X("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", __func__, 1294 ht_cap_info, ht_info_infos_0); 1295 DBG_871X("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", __func__, 1296 cur_network->BcnInfo.ht_cap_info, cur_network->BcnInfo.ht_info_infos_0); 1297 DBG_871X("%s bw mode change\n", __func__); 1298 { 1299 /* bcn_info_update */ 1300 cur_network->BcnInfo.ht_cap_info = ht_cap_info; 1301 cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0; 1302 /* to do : need to check that whether modify related register of BB or not */ 1303 } 1304 /* goto _mismatch; */ 1305 } 1306 1307 /* Checking for channel */ 1308 p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_DS_PARAMS, &len, bssid->IELength - _FIXED_IE_LENGTH_); 1309 if (p) { 1310 bcn_channel = *(p + 2); 1311 } else {/* In 5G, some ap do not have DSSET IE checking HT info for channel */ 1312 rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_); 1313 if (pht_info) { 1314 bcn_channel = pht_info->primary_channel; 1315 } else { /* we don't find channel IE, so don't check it */ 1316 /* DBG_871X("Oops: %s we don't find channel IE, so don't check it\n", __func__); */ 1317 bcn_channel = Adapter->mlmeextpriv.cur_channel; 1318 } 1319 } 1320 if (bcn_channel != Adapter->mlmeextpriv.cur_channel) { 1321 DBG_871X("%s beacon channel:%d cur channel:%d disconnect\n", __func__, 1322 bcn_channel, Adapter->mlmeextpriv.cur_channel); 1323 goto _mismatch; 1324 } 1325 1326 /* checking SSID */ 1327 ssid_len = 0; 1328 p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_SSID, &len, bssid->IELength - _FIXED_IE_LENGTH_); 1329 if (p) { 1330 ssid_len = *(p + 1); 1331 if (ssid_len > NDIS_802_11_LENGTH_SSID) 1332 ssid_len = 0; 1333 } 1334 memcpy(bssid->Ssid.Ssid, (p + 2), ssid_len); 1335 bssid->Ssid.SsidLength = ssid_len; 1336 1337 if (memcmp(bssid->Ssid.Ssid, cur_network->network.Ssid.Ssid, 32) || 1338 bssid->Ssid.SsidLength != cur_network->network.Ssid.SsidLength) { 1339 if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) { /* not hidden ssid */ 1340 DBG_871X("%s(), SSID is not match\n", __func__); 1341 goto _mismatch; 1342 } 1343 } 1344 1345 /* check encryption info */ 1346 val16 = rtw_get_capability((struct wlan_bssid_ex *)bssid); 1347 1348 if (val16 & BIT(4)) 1349 bssid->Privacy = 1; 1350 else 1351 bssid->Privacy = 0; 1352 1353 if (cur_network->network.Privacy != bssid->Privacy) { 1354 DBG_871X("%s(), privacy is not match\n", __func__); 1355 goto _mismatch; 1356 } 1357 1358 rtw_get_sec_ie(bssid->IEs, bssid->IELength, NULL, &rsn_len, NULL, &wpa_len); 1359 1360 if (rsn_len > 0) { 1361 encryp_protocol = ENCRYP_PROTOCOL_WPA2; 1362 } else if (wpa_len > 0) { 1363 encryp_protocol = ENCRYP_PROTOCOL_WPA; 1364 } else { 1365 if (bssid->Privacy) 1366 encryp_protocol = ENCRYP_PROTOCOL_WEP; 1367 } 1368 1369 if (cur_network->BcnInfo.encryp_protocol != encryp_protocol) { 1370 DBG_871X("%s(): enctyp is not match\n", __func__); 1371 goto _mismatch; 1372 } 1373 1374 if (encryp_protocol == ENCRYP_PROTOCOL_WPA || encryp_protocol == ENCRYP_PROTOCOL_WPA2) { 1375 pbuf = rtw_get_wpa_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12); 1376 if (pbuf && (wpa_ielen > 0)) { 1377 if (rtw_parse_wpa_ie(pbuf, wpa_ielen + 2, &group_cipher, 1378 &pairwise_cipher, &is_8021x) == _SUCCESS) > 1379 ; 1380 } else { 1381 pbuf = rtw_get_wpa2_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12); 1382 1383 if (pbuf && (wpa_ielen > 0)) { 1384 if (rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher, 1385 &pairwise_cipher, &is_8021x) == _SUCCESS) 1386 ; 1387 } 1388 } 1389 1390 if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher) { 1391 DBG_871X("%s pairwise_cipher(%x:%x) or group_cipher(%x:%x) is not match\n", __func__, 1392 pairwise_cipher, cur_network->BcnInfo.pairwise_cipher, 1393 group_cipher, cur_network->BcnInfo.group_cipher); 1394 goto _mismatch; 1395 } 1396 1397 if (is_8021x != cur_network->BcnInfo.is_8021x) { 1398 DBG_871X("%s authentication is not match\n", __func__); 1399 goto _mismatch; 1400 } 1401 } 1402 1403 kfree(bssid); 1404 return _SUCCESS; 1405 1406 _mismatch: 1407 kfree(bssid); 1408 1409 if (pmlmepriv->NumOfBcnInfoChkFail == 0) 1410 pmlmepriv->timeBcnInfoChkStart = jiffies; 1411 1412 pmlmepriv->NumOfBcnInfoChkFail++; 1413 DBG_871X("%s by %s - NumOfChkFail = %d (SeqNum of this Beacon frame = %d).\n", __func__, ADPT_ARG(Adapter), pmlmepriv->NumOfBcnInfoChkFail, GetSequence(pframe)); 1414 1415 if ((pmlmepriv->timeBcnInfoChkStart != 0) && (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) <= DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS) 1416 && (pmlmepriv->NumOfBcnInfoChkFail >= DISCONNECT_BY_CHK_BCN_FAIL_THRESHOLD)) { 1417 DBG_871X("%s by %s - NumOfChkFail = %d >= threshold : %d (in %d ms), return FAIL.\n", __func__, ADPT_ARG(Adapter), pmlmepriv->NumOfBcnInfoChkFail, 1418 DISCONNECT_BY_CHK_BCN_FAIL_THRESHOLD, jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart)); 1419 pmlmepriv->timeBcnInfoChkStart = 0; 1420 pmlmepriv->NumOfBcnInfoChkFail = 0; 1421 return _FAIL; 1422 } 1423 1424 return _SUCCESS; 1425 } 1426 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip