forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/wireless/rockchip_wlan/rtl8723cs/os_dep/linux/ioctl_cfg80211.c
....@@ -454,20 +454,7 @@
454454
455455 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
456456 if (started) {
457
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0))
458
-
459
- /* --- cfg80211_ch_switch_started_notfiy() ---
460
- * A new parameter, bool quiet, is added from Linux kernel v5.11,
461
- * to see if block-tx was requested by the AP. since currently,
462
- * the API is used for station before connected in rtw_chk_start_clnt_join()
463
- * the quiet is set to false here first. May need to refine it if
464
- * called by others with block-tx.
465
- */
466
-
467
- cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
468
-#else
469457 cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
470
-#endif
471458 goto exit;
472459 }
473460 #endif
....@@ -3013,8 +3000,8 @@
30133000 _rtw_memcpy(pmlmepriv->p2p_probe_req_ie, p2p_ie, p2p_ielen);
30143001 pmlmepriv->p2p_probe_req_ie_len = p2p_ielen;
30153002
3016
- attr_contentlen = sizeof(listen_ch_attr);
3017
- if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, (u8 *)listen_ch_attr, (uint *) &attr_contentlen)) {
3003
+ if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_LISTEN_CH, (u8 *)listen_ch_attr, (uint *) &attr_contentlen)
3004
+ && attr_contentlen == 5) {
30183005 if (wdinfo->listen_channel != listen_ch_attr[4]) {
30193006 RTW_INFO(FUNC_ADPT_FMT" listen channel - country:%c%c%c, class:%u, ch:%u\n",
30203007 FUNC_ADPT_ARG(padapter), listen_ch_attr[0], listen_ch_attr[1], listen_ch_attr[2],
....@@ -3829,7 +3816,7 @@
38293816
38303817 pwpa2 = rtw_get_wpa2_ie(buf, &wpa2_ielen, ielen);
38313818 if (pwpa2 && wpa2_ielen > 0) {
3832
- if (rtw_parse_wpa2_ie(pwpa2, wpa2_ielen + 2, &group_cipher, &pairwise_cipher, NULL, NULL, &mfp_opt, NULL) == _SUCCESS) {
3819
+ if (rtw_parse_wpa2_ie(pwpa2, wpa2_ielen + 2, &group_cipher, &pairwise_cipher, NULL, NULL, &mfp_opt) == _SUCCESS) {
38333820 padapter->securitypriv.dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
38343821 padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeWPA2PSK;
38353822 _rtw_memcpy(padapter->securitypriv.supplicant_ie, &pwpa2[0], wpa2_ielen + 2);
....@@ -6404,7 +6391,6 @@
64046391 #endif
64056392
64066393 /* Check P2P Capability ATTR */
6407
- attr_contentlen = sizeof(cap_attr);
64086394 if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&cap_attr, (uint *) &attr_contentlen)) {
64096395 u8 grp_cap = 0;
64106396 /* RTW_INFO( "[%s] Got P2P Capability Attr!!\n", __FUNCTION__ ); */
....@@ -7183,7 +7169,6 @@
71837169 pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_PUSH_BUTTON;
71847170
71857171 rtw_get_wps_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, wpsie, &wpsielen);
7186
- wps_devicepassword_id_len = sizeof(wps_devicepassword_id);
71877172 rtw_get_wps_attr_content(wpsie, wpsielen, WPS_ATTR_DEVICE_PWID, (u8 *) &wps_devicepassword_id, &wps_devicepassword_id_len);
71887173 wps_devicepassword_id = be16_to_cpu(wps_devicepassword_id);
71897174
....@@ -7211,9 +7196,7 @@
72117196
72127197 if (rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, p2p_ie, &p2p_ielen)) {
72137198
7214
- devinfo_contentlen = sizeof(devinfo_content);
72157199 rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, devinfo_content, &devinfo_contentlen);
7216
- capability_len = sizeof(capability);
72177200 rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8 *)&capability, &capability_len);
72187201
72197202 }