mirror of
https://github.com/RinCat/RTL88x2BU-Linux-Driver.git
synced 2024-12-25 09:31:36 +00:00
Update to 5.6.1.5
This commit is contained in:
parent
20fba52b05
commit
c8ee6e0746
2
Makefile
2
Makefile
@ -65,7 +65,7 @@ CONFIG_RTW_CHPLAN = 0xFF
|
||||
CONFIG_RTW_ADAPTIVITY_EN = disable
|
||||
CONFIG_RTW_ADAPTIVITY_MODE = normal
|
||||
CONFIG_SIGNAL_SCALE_MAPPING = n
|
||||
CONFIG_80211W = n
|
||||
CONFIG_80211W = y
|
||||
CONFIG_REDUCE_TX_CPU_LOADING = n
|
||||
CONFIG_BR_EXT = y
|
||||
CONFIG_TDLS = n
|
||||
|
BIN
ReleaseNotes.pdf
BIN
ReleaseNotes.pdf
Binary file not shown.
@ -1179,33 +1179,12 @@ void rtw_mesh_adjust_chbw(u8 req_ch, u8 *req_bw, u8 *req_offset)
|
||||
}
|
||||
}
|
||||
|
||||
int rtw_sae_check_frames(_adapter *adapter, const u8 *buf, u32 len, u8 tx)
|
||||
void rtw_mesh_sae_check_frames(_adapter *adapter, const u8 *buf, u32 len, u8 tx, u16 alg, u16 seq, u16 status)
|
||||
{
|
||||
const u8 *frame_body = buf + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
u16 alg;
|
||||
u16 seq;
|
||||
u16 status;
|
||||
int ret = 0;
|
||||
|
||||
alg = RTW_GET_LE16(frame_body);
|
||||
if (alg != 3)
|
||||
goto exit;
|
||||
|
||||
seq = RTW_GET_LE16(frame_body + 2);
|
||||
status = RTW_GET_LE16(frame_body + 4);
|
||||
|
||||
RTW_INFO("RTW_%s:AUTH alg:0x%04x, seq:0x%04x, status:0x%04x\n"
|
||||
, (tx == _TRUE) ? "Tx" : "Rx", alg, seq, status);
|
||||
|
||||
ret = 1;
|
||||
|
||||
#if CONFIG_RTW_MESH_PEER_BLACKLIST
|
||||
if (tx && seq == 1)
|
||||
rtw_mesh_plink_set_peer_conf_timeout(adapter, GetAddr1Ptr(buf));
|
||||
#endif
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if CONFIG_RTW_MPM_TX_IES_SYNC_BSS
|
||||
|
@ -454,7 +454,7 @@ void dump_mesh_networks(void *sel, _adapter *adapter);
|
||||
|
||||
void rtw_mesh_adjust_chbw(u8 req_ch, u8 *req_bw, u8 *req_offset);
|
||||
|
||||
int rtw_sae_check_frames(_adapter *adapter, const u8 *buf, u32 len, u8 tx);
|
||||
void rtw_mesh_sae_check_frames(_adapter *adapter, const u8 *buf, u32 len, u8 tx, u16 alg, u16 seq, u16 status);
|
||||
int rtw_mesh_check_frames_tx(_adapter *adapter, const u8 **buf, size_t *len);
|
||||
int rtw_mesh_check_frames_rx(_adapter *adapter, const u8 *buf, size_t len);
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1897,6 +1897,7 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
u16 cap, ht_cap = _FALSE;
|
||||
uint ie_len = 0;
|
||||
int group_cipher, pairwise_cipher;
|
||||
u32 akm;
|
||||
u8 mfp_opt = MFP_NO;
|
||||
u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
|
||||
int supportRateNum = 0;
|
||||
@ -2057,13 +2058,14 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
psecuritypriv->wpa_psk = 0;
|
||||
|
||||
/* wpa2 */
|
||||
akm = 0;
|
||||
group_cipher = 0;
|
||||
pairwise_cipher = 0;
|
||||
psecuritypriv->wpa2_group_cipher = _NO_PRIVACY_;
|
||||
psecuritypriv->wpa2_pairwise_cipher = _NO_PRIVACY_;
|
||||
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0) {
|
||||
if (rtw_parse_wpa2_ie(p, ie_len + 2, &group_cipher, &pairwise_cipher, NULL, &mfp_opt) == _SUCCESS) {
|
||||
if (rtw_parse_wpa2_ie(p, ie_len + 2, &group_cipher, &pairwise_cipher, &akm, &mfp_opt) == _SUCCESS) {
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
|
||||
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPA2PSK;
|
||||
psecuritypriv->dot8021xalg = 1;/* psk, todo:802.1x */
|
||||
@ -2071,6 +2073,15 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
|
||||
|
||||
psecuritypriv->wpa2_group_cipher = group_cipher;
|
||||
psecuritypriv->wpa2_pairwise_cipher = pairwise_cipher;
|
||||
|
||||
/*
|
||||
Kernel < v5.1, the auth_type set as NL80211_AUTHTYPE_AUTOMATIC
|
||||
in cfg80211_rtw_start_ap().
|
||||
if the AKM SAE in the RSN IE, we have to update the auth_type for SAE
|
||||
in rtw_check_beacon_data().
|
||||
*/
|
||||
if (CHECK_BIT(WLAN_AKM_TYPE_SAE, akm))
|
||||
psecuritypriv->auth_type = NL80211_AUTHTYPE_SAE;
|
||||
#if 0
|
||||
switch (group_cipher) {
|
||||
case WPA_CIPHER_NONE:
|
||||
@ -3858,6 +3869,12 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
psta->state &= ~(_FW_LINKED | WIFI_UNDER_KEY_HANDSHAKE);
|
||||
|
||||
if ((psta->auth_len != 0) && (psta->pauth_frame != NULL)) {
|
||||
rtw_mfree(psta->pauth_frame, psta->auth_len);
|
||||
psta->pauth_frame = NULL;
|
||||
psta->auth_len = 0;
|
||||
}
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
|
||||
if (!MLME_IS_MESH(padapter)) {
|
||||
@ -5172,6 +5189,7 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
||||
u8 *wpa_ie;
|
||||
int wpa_ie_len;
|
||||
int group_cipher = 0, pairwise_cipher = 0;
|
||||
u32 akm = 0;
|
||||
u8 mfp_opt = MFP_NO;
|
||||
u16 status = _STATS_SUCCESSFUL_;
|
||||
|
||||
@ -5187,13 +5205,17 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
||||
wpa_ie = elems->rsn_ie;
|
||||
wpa_ie_len = elems->rsn_ie_len;
|
||||
|
||||
if (rtw_parse_wpa2_ie(wpa_ie - 2, wpa_ie_len + 2, &group_cipher, &pairwise_cipher, NULL, &mfp_opt) == _SUCCESS) {
|
||||
if (rtw_parse_wpa2_ie(wpa_ie - 2, wpa_ie_len + 2, &group_cipher, &pairwise_cipher, &akm, &mfp_opt) == _SUCCESS) {
|
||||
sta->dot8021xalg = 1;/* psk, todo:802.1x */
|
||||
sta->wpa_psk |= BIT(1);
|
||||
|
||||
sta->wpa2_group_cipher = group_cipher & sec->wpa2_group_cipher;
|
||||
sta->wpa2_pairwise_cipher = pairwise_cipher & sec->wpa2_pairwise_cipher;
|
||||
|
||||
sta->akm_suite_type = akm;
|
||||
if ((CHECK_BIT(WLAN_AKM_TYPE_SAE, akm)) && (MFP_NO == mfp_opt))
|
||||
status = WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION;
|
||||
|
||||
if (!sta->wpa2_group_cipher)
|
||||
status = WLAN_STATUS_GROUP_CIPHER_NOT_VALID;
|
||||
|
||||
@ -5239,6 +5261,18 @@ u16 rtw_ap_parse_sta_security_ie(_adapter *adapter, struct sta_info *sta, struct
|
||||
else if (sec->mfp_opt >= MFP_OPTIONAL && mfp_opt >= MFP_OPTIONAL)
|
||||
sta->flags |= WLAN_STA_MFP;
|
||||
|
||||
if ((sec->auth_type == NL80211_AUTHTYPE_SAE) &&
|
||||
(CHECK_BIT(WLAN_AKM_TYPE_SAE, sta->akm_suite_type)) &&
|
||||
(WLAN_AUTH_OPEN == sta->authalg)) {
|
||||
/* WPA3-SAE, PMK caching */
|
||||
if (rtw_cached_pmkid(adapter, sta->cmn.mac_addr) == -1) {
|
||||
RTW_INFO("SAE: No PMKSA cache entry found\n");
|
||||
status = WLAN_STATUS_INVALID_PMKID;
|
||||
} else {
|
||||
RTW_INFO("SAE: PMKSA cache entry found\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (status != _STATS_SUCCESSFUL_)
|
||||
goto exit;
|
||||
|
||||
|
@ -33,14 +33,28 @@ u8 WPA_CIPHER_SUITE_CCMP[] = { 0x00, 0x50, 0xf2, 4 };
|
||||
u8 WPA_CIPHER_SUITE_WEP104[] = { 0x00, 0x50, 0xf2, 5 };
|
||||
|
||||
u16 RSN_VERSION_BSD = 1;
|
||||
u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X[] = { 0x00, 0x0f, 0xac, 1 };
|
||||
u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X[] = { 0x00, 0x0f, 0xac, 2 };
|
||||
u8 RSN_CIPHER_SUITE_NONE[] = { 0x00, 0x0f, 0xac, 0 };
|
||||
u8 RSN_CIPHER_SUITE_WEP40[] = { 0x00, 0x0f, 0xac, 1 };
|
||||
u8 RSN_CIPHER_SUITE_TKIP[] = { 0x00, 0x0f, 0xac, 2 };
|
||||
u8 RSN_CIPHER_SUITE_WRAP[] = { 0x00, 0x0f, 0xac, 3 };
|
||||
u8 RSN_CIPHER_SUITE_CCMP[] = { 0x00, 0x0f, 0xac, 4 };
|
||||
u8 RSN_CIPHER_SUITE_WEP104[] = { 0x00, 0x0f, 0xac, 5 };
|
||||
|
||||
u8 WLAN_AKM_8021X[] = {0x00, 0x0f, 0xac, 1};
|
||||
u8 WLAN_AKM_PSK[] = {0x00, 0x0f, 0xac, 2};
|
||||
u8 WLAN_AKM_FT_8021X[] = {0x00, 0x0f, 0xac, 3};
|
||||
u8 WLAN_AKM_FT_PSK[] = {0x00, 0x0f, 0xac, 4};
|
||||
u8 WLAN_AKM_8021X_SHA256[] = {0x00, 0x0f, 0xac, 5};
|
||||
u8 WLAN_AKM_PSK_SHA256[] = {0x00, 0x0f, 0xac, 6};
|
||||
u8 WLAN_AKM_TDLS[] = {0x00, 0x0f, 0xac, 7};
|
||||
u8 WLAN_AKM_SAE[] = {0x00, 0x0f, 0xac, 8};
|
||||
u8 WLAN_AKM_FT_OVER_SAE[] = {0x00, 0x0f, 0xac, 9};
|
||||
u8 WLAN_AKM_8021X_SUITE_B[] = {0x00, 0x0f, 0xac, 11};
|
||||
u8 WLAN_AKM_8021X_SUITE_B_192[] = {0x00, 0x0f, 0xac, 12};
|
||||
u8 WLAN_AKM_FILS_SHA256[] = {0x00, 0x0f, 0xac, 14};
|
||||
u8 WLAN_AKM_FILS_SHA384[] = {0x00, 0x0f, 0xac, 15};
|
||||
u8 WLAN_AKM_FT_FILS_SHA256[] = {0x00, 0x0f, 0xac, 16};
|
||||
u8 WLAN_AKM_FT_FILS_SHA384[] = {0x00, 0x0f, 0xac, 17};
|
||||
/* -----------------------------------------------------------
|
||||
* for adhoc-master to generate ie and provide supported-rate to fw
|
||||
* ----------------------------------------------------------- */
|
||||
@ -661,8 +675,44 @@ int rtw_get_wpa2_cipher_suite(u8 *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 rtw_get_akm_suite_bitmap(u8 *s)
|
||||
{
|
||||
if (_rtw_memcmp(s, WLAN_AKM_8021X, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_8021X;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_PSK, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_PSK;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FT_8021X, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FT_8021X;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FT_PSK, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FT_PSK;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_8021X_SHA256, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_8021X_SHA256;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_PSK_SHA256, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_PSK_SHA256;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_TDLS, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_TDLS;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_SAE, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_SAE;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FT_OVER_SAE, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FT_OVER_SAE;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_8021X_SUITE_B, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_8021X_SUITE_B;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_8021X_SUITE_B_192, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_8021X_SUITE_B_192;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FILS_SHA256, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FILS_SHA256;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FILS_SHA384, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FILS_SHA384;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FT_FILS_SHA256, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FT_FILS_SHA256;
|
||||
if (_rtw_memcmp(s, WLAN_AKM_FT_FILS_SHA384, RSN_SELECTOR_LEN) == _TRUE)
|
||||
return WLAN_AKM_TYPE_FT_FILS_SHA384;
|
||||
|
||||
int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
|
||||
int *pairwise_cipher, u32 *akm)
|
||||
{
|
||||
int i, ret = _SUCCESS;
|
||||
int left, count;
|
||||
@ -721,11 +771,11 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
if (is_8021x) {
|
||||
if (akm) {
|
||||
if (left >= 6) {
|
||||
pos += 2;
|
||||
if (_rtw_memcmp(pos, SUITE_1X, 4) == 1) {
|
||||
*is_8021x = 1;
|
||||
*akm = WLAN_AKM_TYPE_8021X;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -833,11 +883,11 @@ err:
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x, u8 *mfp_opt)
|
||||
int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher,
|
||||
int *pairwise_cipher, u32 *akm, u8 *mfp_opt)
|
||||
{
|
||||
struct rsne_info info;
|
||||
int i, ret = _SUCCESS;
|
||||
u8 SUITE_1X[4] = {0x00, 0x0f, 0xac, 0x01};
|
||||
|
||||
ret = rtw_rsne_info_parse(rsn_ie, rsn_ie_len, &info);
|
||||
if (ret != _SUCCESS)
|
||||
@ -856,11 +906,10 @@ int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
||||
*pairwise_cipher |= rtw_get_wpa2_cipher_suite(info.pcs_list + 4 * i);
|
||||
}
|
||||
|
||||
if (is_8021x) {
|
||||
*is_8021x = 0;
|
||||
/* here only check the first AKM suite */
|
||||
if (info.akm_cnt && _rtw_memcmp(SUITE_1X, info.akm_list, 4) == _TRUE)
|
||||
*is_8021x = 1;
|
||||
if (akm) {
|
||||
*akm = 0;
|
||||
for (i = 0; i < info.akm_cnt; i++)
|
||||
*akm |= rtw_get_akm_suite_bitmap(info.akm_list + 4 * i);
|
||||
}
|
||||
|
||||
if (mfp_opt) {
|
||||
@ -2660,86 +2709,6 @@ int ieee80211_get_hdrlen(u16 fc)
|
||||
return hdrlen;
|
||||
}
|
||||
|
||||
int rtw_get_cipher_info(struct wlan_network *pnetwork)
|
||||
{
|
||||
u32 wpa_ielen;
|
||||
unsigned char *pbuf;
|
||||
int group_cipher = 0, pairwise_cipher = 0, is8021x = 0;
|
||||
int ret = _FAIL;
|
||||
pbuf = rtw_get_wpa_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength - 12);
|
||||
|
||||
if (pbuf && (wpa_ielen > 0)) {
|
||||
if (_SUCCESS == rtw_parse_wpa_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher, &is8021x)) {
|
||||
|
||||
pnetwork->BcnInfo.pairwise_cipher = pairwise_cipher;
|
||||
pnetwork->BcnInfo.group_cipher = group_cipher;
|
||||
pnetwork->BcnInfo.is_8021x = is8021x;
|
||||
ret = _SUCCESS;
|
||||
}
|
||||
} else {
|
||||
|
||||
pbuf = rtw_get_wpa2_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength - 12);
|
||||
|
||||
if (pbuf && (wpa_ielen > 0)) {
|
||||
if (_SUCCESS == rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher, &pairwise_cipher, &is8021x, NULL)) {
|
||||
pnetwork->BcnInfo.pairwise_cipher = pairwise_cipher;
|
||||
pnetwork->BcnInfo.group_cipher = group_cipher;
|
||||
pnetwork->BcnInfo.is_8021x = is8021x;
|
||||
ret = _SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
||||
{
|
||||
unsigned short cap = 0;
|
||||
u8 bencrypt = 0;
|
||||
/* u8 wpa_ie[255],rsn_ie[255]; */
|
||||
u16 wpa_len = 0, rsn_len = 0;
|
||||
struct HT_info_element *pht_info = NULL;
|
||||
struct rtw_ieee80211_ht_cap *pht_cap = NULL;
|
||||
unsigned int len;
|
||||
unsigned char *p;
|
||||
|
||||
_rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(cap);
|
||||
if (cap & WLAN_CAPABILITY_PRIVACY) {
|
||||
bencrypt = 1;
|
||||
pnetwork->network.Privacy = 1;
|
||||
} else
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_OPENSYS;
|
||||
rtw_get_sec_ie(pnetwork->network.IEs , pnetwork->network.IELength, NULL, &rsn_len, NULL, &wpa_len);
|
||||
|
||||
if (rsn_len > 0)
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WPA2;
|
||||
else if (wpa_len > 0)
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WPA;
|
||||
else {
|
||||
if (bencrypt)
|
||||
pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WEP;
|
||||
}
|
||||
rtw_get_cipher_info(pnetwork);
|
||||
|
||||
/* get bwmode and ch_offset */
|
||||
/* parsing HT_CAP_IE */
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pnetwork->network.IELength - _FIXED_IE_LENGTH_);
|
||||
if (p && len > 0) {
|
||||
pht_cap = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
pnetwork->BcnInfo.ht_cap_info = pht_cap->cap_info;
|
||||
} else
|
||||
pnetwork->BcnInfo.ht_cap_info = 0;
|
||||
/* parsing HT_INFO_IE */
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, pnetwork->network.IELength - _FIXED_IE_LENGTH_);
|
||||
if (p && len > 0) {
|
||||
pht_info = (struct HT_info_element *)(p + 2);
|
||||
pnetwork->BcnInfo.ht_info_infos_0 = pht_info->infos[0];
|
||||
} else
|
||||
pnetwork->BcnInfo.ht_info_infos_0 = 0;
|
||||
}
|
||||
|
||||
u8 rtw_ht_mcsset_to_nss(u8 *supp_mcs_set)
|
||||
{
|
||||
u8 nss = 1;
|
||||
|
@ -4272,7 +4272,12 @@ static int SecIsInPMKIDList(_adapter *Adapter, u8 *bssid)
|
||||
|
||||
}
|
||||
|
||||
static int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent)
|
||||
int rtw_cached_pmkid(_adapter *Adapter, u8 *bssid)
|
||||
{
|
||||
return SecIsInPMKIDList(Adapter, bssid);
|
||||
}
|
||||
|
||||
int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent)
|
||||
{
|
||||
struct security_priv *sec = &adapter->securitypriv;
|
||||
struct rsne_info info;
|
||||
|
@ -1848,7 +1848,6 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame)
|
||||
struct beacon_keys recv_beacon;
|
||||
|
||||
update_network(&(pmlmepriv->cur_network.network), pbss, padapter, _TRUE);
|
||||
rtw_get_bcn_info(&(pmlmepriv->cur_network));
|
||||
|
||||
/* update bcn keys */
|
||||
if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon) == _TRUE) {
|
||||
@ -2087,9 +2086,9 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame)
|
||||
goto auth_fail;
|
||||
}
|
||||
|
||||
if (auth_mode == 2 &&
|
||||
psecuritypriv->dot11PrivacyAlgrthm != _WEP40_ &&
|
||||
psecuritypriv->dot11PrivacyAlgrthm != _WEP104_)
|
||||
if ((auth_mode == 2) && (algorithm != WLAN_AUTH_SAE) &&
|
||||
(psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) &&
|
||||
(psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
|
||||
auth_mode = 0;
|
||||
|
||||
if ((algorithm > 0 && auth_mode == 0) || /* rx a shared-key auth but shared not enabled */
|
||||
@ -2163,6 +2162,17 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame)
|
||||
if (pstat->auth_seq == 0)
|
||||
pstat->expire_to = pstapriv->auth_to;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (GET_CFG80211_REPORT_MGMT(adapter_wdev_data(padapter), IEEE80211_STYPE_AUTH) == _TRUE) {
|
||||
if ((algorithm == WLAN_AUTH_SAE) &&
|
||||
(auth_mode == dot11AuthAlgrthm_8021X)) {
|
||||
pstat->authalg = algorithm;
|
||||
|
||||
rtw_cfg80211_rx_mframe(padapter, precv_frame, NULL);
|
||||
return _SUCCESS;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
if ((pstat->auth_seq + 1) != seq) {
|
||||
RTW_INFO("(1)auth rejected because out of seq [rx_seq=%d, exp_seq=%d]!\n",
|
||||
@ -2284,6 +2294,21 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
RTW_INFO("%s\n", __FUNCTION__);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (GET_CFG80211_REPORT_MGMT(adapter_wdev_data(padapter), IEEE80211_STYPE_AUTH) == _TRUE) {
|
||||
if (rtw_sec_chk_auth_type(padapter, NL80211_AUTHTYPE_SAE)) {
|
||||
if (rtw_cached_pmkid(padapter, get_my_bssid(&pmlmeinfo->network)) != -1) {
|
||||
RTW_INFO("SAE: PMKSA cache entry found\n");
|
||||
goto normal;
|
||||
}
|
||||
rtw_cfg80211_rx_mframe(padapter, precv_frame, NULL);
|
||||
return _SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
normal:
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
/* check A1 matches or not */
|
||||
if (!_rtw_memcmp(adapter_mac_addr(padapter), get_da(pframe), ETH_ALEN))
|
||||
return _SUCCESS;
|
||||
@ -2421,6 +2446,17 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
RTW_INFO("%s\n", __FUNCTION__);
|
||||
|
||||
if (pstat->authalg == WLAN_AUTH_SAE) {
|
||||
/* WPA3-SAE */
|
||||
if (((pstat->state) & WIFI_FW_AUTH_NULL)) {
|
||||
/* TODO:
|
||||
Queue AssocReq and Proccess
|
||||
by external auth trigger. */
|
||||
RTW_INFO("%s: wait external auth trigger\n", __func__);
|
||||
return _SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
/* check if this stat has been successfully authenticated/assocated */
|
||||
if (!((pstat->state) & WIFI_FW_AUTH_SUCCESS)) {
|
||||
if (!((pstat->state) & WIFI_FW_ASSOC_SUCCESS)) {
|
||||
@ -9142,7 +9178,18 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
rtw_ft_update_rsnie(padapter, _TRUE, pattrib, &pframe);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (rtw_sec_chk_auth_alg(padapter, WLAN_AUTH_OPEN) &&
|
||||
rtw_sec_chk_auth_type(padapter, NL80211_AUTHTYPE_SAE)) {
|
||||
s32 entry = rtw_cached_pmkid(padapter, pmlmepriv->assoc_bssid);
|
||||
|
||||
rtw_rsn_sync_pmkid(padapter, (u8 *)pIE, (pIE->Length + 2), entry);
|
||||
}
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
pframe = rtw_set_ie(pframe, EID_WPA2, pIE->Length, pIE->data, &(pattrib->pktlen));
|
||||
}
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case EID_HTCapability:
|
||||
@ -10323,7 +10370,7 @@ void issue_action_BSSCoexistPacket(_adapter *padapter)
|
||||
u8 InfoContent[16] = {0};
|
||||
u8 ICS[8][15];
|
||||
#ifdef CONFIG_80211N_HT
|
||||
if ((pmlmepriv->num_FortyMHzIntolerant == 0) || (pmlmepriv->num_sta_no_ht == 0))
|
||||
if ((pmlmepriv->num_FortyMHzIntolerant == 0) && (pmlmepriv->num_sta_no_ht == 0))
|
||||
return;
|
||||
|
||||
if (_TRUE == pmlmeinfo->bwmode_updated)
|
||||
@ -10368,18 +10415,15 @@ void issue_action_BSSCoexistPacket(_adapter *padapter)
|
||||
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
|
||||
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
|
||||
|
||||
|
||||
/* */
|
||||
if (pmlmepriv->num_FortyMHzIntolerant > 0) {
|
||||
/* TODO calculate 40Mhz intolerant via ch and ch offset */
|
||||
/* if (pmlmepriv->num_FortyMHzIntolerant > 0) */
|
||||
{
|
||||
u8 iedata = 0;
|
||||
|
||||
iedata |= BIT(2);/* 20 MHz BSS Width Request */
|
||||
|
||||
pframe = rtw_set_ie(pframe, EID_BSSCoexistence, 1, &iedata, &(pattrib->pktlen));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* */
|
||||
_rtw_memset(ICS, 0, sizeof(ICS));
|
||||
if (pmlmepriv->num_sta_no_ht > 0) {
|
||||
@ -11305,6 +11349,7 @@ void start_clnt_auth(_adapter *padapter)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
|
||||
_cancel_timer_ex(&pmlmeext->link_timer);
|
||||
|
||||
@ -11324,6 +11369,22 @@ void start_clnt_auth(_adapter *padapter)
|
||||
} else
|
||||
#endif
|
||||
RTW_PRINT("start auth\n");
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (rtw_sec_chk_auth_type(padapter, NL80211_AUTHTYPE_SAE)) {
|
||||
if (rtw_cached_pmkid(padapter, get_my_bssid(&pmlmeinfo->network)) != -1) {
|
||||
RTW_INFO("SAE: PMKSA cache entry found\n");
|
||||
padapter->securitypriv.auth_alg = WLAN_AUTH_OPEN;
|
||||
goto no_external_auth;
|
||||
}
|
||||
|
||||
RTW_PRINT("SAE: start external auth\n");
|
||||
rtw_cfg80211_external_auth_request(padapter, NULL);
|
||||
return;
|
||||
}
|
||||
no_external_auth:
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
issue_auth(padapter, NULL, 0);
|
||||
|
||||
set_link_timer(pmlmeext, REAUTH_TO);
|
||||
@ -13005,6 +13066,12 @@ void link_timer_hdl(void *ctx)
|
||||
pmlmeinfo->state = WIFI_FW_NULL_STATE;
|
||||
report_join_res(padapter, -3, WLAN_STATUS_UNSPECIFIED_FAILURE);
|
||||
} else if (pmlmeinfo->state & WIFI_FW_AUTH_STATE) {
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (rtw_sec_chk_auth_type(padapter, NL80211_AUTHTYPE_SAE))
|
||||
return;
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
/* re-auth timer */
|
||||
if (++pmlmeinfo->reauth_count > REAUTH_LIMIT) {
|
||||
/* if (pmlmeinfo->auth_algo != dot11AuthAlgrthm_Auto) */
|
||||
@ -13183,7 +13250,6 @@ void rtw_ft_update_bcn(_adapter *padapter, union recv_frame *precv_frame)
|
||||
struct beacon_keys recv_beacon;
|
||||
|
||||
update_network(&(pmlmepriv->cur_network.network), pbss, padapter, _TRUE);
|
||||
rtw_get_bcn_info(&(pmlmepriv->cur_network));
|
||||
|
||||
/* update bcn keys */
|
||||
if (rtw_get_bcn_keys(padapter, pframe, len, &recv_beacon) == _TRUE) {
|
||||
@ -16204,11 +16270,48 @@ exit:
|
||||
*ch = u_ch;
|
||||
*bw = u_bw;
|
||||
*offset = u_offset;
|
||||
|
||||
#if defined(CONFIG_IOCTL_CFG80211) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
|
||||
{
|
||||
u8 ht_option = 0;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
ht_option = adapter->mlmepriv.htpriv.ht_option;
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
/*
|
||||
when supplicant send the mlme frame,
|
||||
the bss freq is updated by channel switch event.
|
||||
*/
|
||||
rtw_cfg80211_ch_switch_notify(adapter,
|
||||
cur_ch, cur_bw, cur_ch_offset, ht_option);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return connect_allow == _TRUE ? _SUCCESS : _FAIL;
|
||||
}
|
||||
|
||||
void rtw_set_external_auth_status(_adapter *padapter,
|
||||
const void *data, int len)
|
||||
{
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
struct net_device *dev = padapter->pnetdev;
|
||||
struct wiphy *wiphy = adapter_to_wiphy(padapter);
|
||||
struct rtw_external_auth_params params;
|
||||
|
||||
/* convert data to external_auth_params */
|
||||
params.action = RTW_GET_BE32((u8 *)data);
|
||||
_rtw_memcpy(¶ms.bssid, (u8 *)data + 4, ETH_ALEN);
|
||||
_rtw_memcpy(¶ms.ssid.ssid, (u8 *)data + 10, WLAN_SSID_MAXLEN);
|
||||
params.ssid.ssid_len = RTW_GET_BE64((u8 *)data + 42);
|
||||
params.key_mgmt_suite = RTW_GET_BE32((u8 *)data + 58);
|
||||
params.status = RTW_GET_BE16((u8 *)data + 62);
|
||||
_rtw_memcpy(¶ms.pmkid, (u8 *)data + 64, PMKID_LEN);
|
||||
|
||||
rtw_cfg80211_external_auth_status(wiphy, dev, ¶ms);
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
}
|
||||
|
||||
u8 rtw_set_chbw_hdl(_adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
@ -16591,3 +16694,65 @@ u8 rtw_getmacreg_hdl(_adapter *padapter, u8 *pbuf)
|
||||
|
||||
return H2C_SUCCESS;
|
||||
}
|
||||
|
||||
int rtw_sae_preprocess(_adapter *adapter, const u8 *buf, u32 len, u8 tx)
|
||||
{
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
const u8 *frame_body = buf + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
u16 alg;
|
||||
u16 seq;
|
||||
u16 status;
|
||||
int ret = _FAIL;
|
||||
|
||||
alg = RTW_GET_LE16(frame_body);
|
||||
if (alg != WLAN_AUTH_SAE)
|
||||
goto exit;
|
||||
|
||||
seq = RTW_GET_LE16(frame_body + 2);
|
||||
status = RTW_GET_LE16(frame_body + 4);
|
||||
|
||||
RTW_INFO("RTW_%s:AUTH alg:0x%04x, seq:0x%04x, status:0x%04x, mesg:%s\n",
|
||||
(tx == _TRUE) ? "Tx" : "Rx", alg, seq, status,
|
||||
(seq == 1) ? "Commit" : "Confirm");
|
||||
|
||||
ret = _SUCCESS;
|
||||
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
if (MLME_IS_MESH(adapter)) {
|
||||
rtw_mesh_sae_check_frames(adapter, buf, len, tx, alg, seq, status);
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (tx && (seq == 2) && (status == 0)) {
|
||||
/* quere commit frame until external auth statue update */
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct sta_info *psta = NULL;
|
||||
_irqL irqL;
|
||||
|
||||
psta = rtw_get_stainfo(pstapriv, GetAddr1Ptr(buf));
|
||||
if (psta) {
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
if (psta->pauth_frame) {
|
||||
rtw_mfree(psta->pauth_frame, psta->auth_len);
|
||||
psta->pauth_frame = NULL;
|
||||
psta->auth_len = 0;
|
||||
}
|
||||
|
||||
psta->pauth_frame = rtw_zmalloc(len);
|
||||
if (psta->pauth_frame) {
|
||||
_rtw_memcpy(psta->pauth_frame, buf, len);
|
||||
psta->auth_len = len;
|
||||
}
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
|
||||
ret = 2;
|
||||
}
|
||||
}
|
||||
exit:
|
||||
return ret;
|
||||
#else
|
||||
return _SUCCESS;
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
}
|
||||
|
||||
|
@ -743,6 +743,73 @@ u8 PS_RDY_CHECK(_adapter *padapter)
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
void rtw_set_fw_config_32k(PADAPTER padapter, u8 enable)
|
||||
{
|
||||
u8 val8 = 0;
|
||||
u8 cpwm_orig = 0, cpwm_now = 0;
|
||||
int cnt = 0;
|
||||
systime start_time;
|
||||
if (enable){
|
||||
|
||||
/* H2C done, enter 32k */
|
||||
if (val8 == 0) {
|
||||
/* ser rpwm to enter 32k */
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RPWM_TOG, &val8);
|
||||
RTW_INFO("%s: read rpwm=%02x\n", __FUNCTION__, val8);
|
||||
val8 += 0x80;
|
||||
val8 |= BIT(0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&val8));
|
||||
RTW_INFO("%s: write rpwm=%02x\n", __FUNCTION__, val8);
|
||||
adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
|
||||
cnt = val8 = 0;
|
||||
do {
|
||||
val8 = rtw_read8(padapter, REG_CR);
|
||||
cnt++;
|
||||
RTW_INFO("%s polling 0x100=0x%x, cnt=%d\n",
|
||||
__func__, val8, cnt);
|
||||
RTW_INFO("%s 0x08:%02x, 0x03:%02x\n",
|
||||
__func__,
|
||||
rtw_read8(padapter, 0x08),
|
||||
rtw_read8(padapter, 0x03));
|
||||
rtw_mdelay_os(10);
|
||||
} while (cnt < 20 && (val8 != 0xEA));
|
||||
}
|
||||
} else {
|
||||
/* for polling cpwm */
|
||||
cpwm_orig = 0;
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_orig);
|
||||
|
||||
/* ser rpwm */
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RPWM_TOG, &val8);
|
||||
val8 += 0x80;
|
||||
val8 |= BIT(6);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&val8));
|
||||
RTW_INFO("%s: write rpwm=%02x\n", __FUNCTION__, val8);
|
||||
adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
|
||||
|
||||
/* do polling cpwm */
|
||||
start_time = rtw_get_current_time();
|
||||
do {
|
||||
|
||||
rtw_mdelay_os(1);
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
|
||||
if ((cpwm_orig ^ cpwm_now) & 0x80)
|
||||
break;
|
||||
|
||||
if (rtw_get_passing_time_ms(start_time) > 100) {
|
||||
RTW_INFO("%s: polling cpwm timeout when leaving IPS in FWLPS state\n", __FUNCTION__);
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FWLPS_IN_IPS)
|
||||
void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
||||
{
|
||||
@ -785,67 +852,15 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
||||
__func__, val8, cnt);
|
||||
rtw_mdelay_os(10);
|
||||
} while (cnt < 100 && (val8 != 0));
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
/* H2C done, enter 32k */
|
||||
if (val8 == 0) {
|
||||
/* ser rpwm to enter 32k */
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RPWM_TOG, &val8);
|
||||
RTW_INFO("%s: read rpwm=%02x\n", __FUNCTION__, val8);
|
||||
val8 += 0x80;
|
||||
val8 |= BIT(0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&val8));
|
||||
RTW_INFO("%s: write rpwm=%02x\n", __FUNCTION__, val8);
|
||||
adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
|
||||
cnt = val8 = 0;
|
||||
if (parm[1] == 0 || parm[2] == 0) {
|
||||
do {
|
||||
val8 = rtw_read8(padapter, REG_CR);
|
||||
cnt++;
|
||||
RTW_INFO("%s polling 0x100=0x%x, cnt=%d\n",
|
||||
__func__, val8, cnt);
|
||||
RTW_INFO("%s 0x08:%02x, 0x03:%02x\n",
|
||||
__func__,
|
||||
rtw_read8(padapter, 0x08),
|
||||
rtw_read8(padapter, 0x03));
|
||||
rtw_mdelay_os(10);
|
||||
} while (cnt < 20 && (val8 != 0xEA));
|
||||
}
|
||||
}
|
||||
#if defined(CONFIG_LPS_LCLK) && !defined(CONFIG_PNO_SUPPORT)
|
||||
rtw_set_fw_config_32k(padapter, enable);
|
||||
#endif
|
||||
} else {
|
||||
/* Leave IPS */
|
||||
RTW_INFO("%s: Leaving IPS in FWLPS state\n", __func__);
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
/* for polling cpwm */
|
||||
cpwm_orig = 0;
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_orig);
|
||||
|
||||
/* ser rpwm */
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RPWM_TOG, &val8);
|
||||
val8 += 0x80;
|
||||
val8 |= BIT(6);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&val8));
|
||||
RTW_INFO("%s: write rpwm=%02x\n", __FUNCTION__, val8);
|
||||
adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
|
||||
|
||||
/* do polling cpwm */
|
||||
start_time = rtw_get_current_time();
|
||||
do {
|
||||
|
||||
rtw_mdelay_os(1);
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
|
||||
if ((cpwm_orig ^ cpwm_now) & 0x80)
|
||||
break;
|
||||
|
||||
if (rtw_get_passing_time_ms(start_time) > 100) {
|
||||
RTW_INFO("%s: polling cpwm timeout when leaving IPS in FWLPS state\n", __FUNCTION__);
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
#if defined(CONFIG_LPS_LCLK) && !defined(CONFIG_PNO_SUPPORT)
|
||||
rtw_set_fw_config_32k(padapter, enable);
|
||||
#endif
|
||||
parm[0] = 0x0;
|
||||
parm[1] = 0x0;
|
||||
@ -859,6 +874,23 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
||||
}
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
|
||||
void rtw_leave_lps_and_chk(_adapter *padapter, u8 ps_mode)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
_enter_critical_mutex(&pwrpriv->lps_ack_mutex, NULL);
|
||||
rtw_sctx_init(&pwrpriv->lps_ack_sctx, 100);
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_STATE_CHK, (u8 *)(&ps_mode));
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
_exit_critical_mutex(&pwrpriv->lps_ack_mutex, NULL);
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
|
||||
}
|
||||
|
||||
void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode, const char *msg)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
@ -1002,9 +1034,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_INACTIVE_IPS, (u8 *)(&ps_mode));
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_STATE_CHK, (u8 *)(&ps_mode));
|
||||
|
||||
rtw_leave_lps_and_chk(padapter, ps_mode);
|
||||
|
||||
#ifdef CONFIG_LPS_PG
|
||||
if (pwrpriv->lps_level == LPS_PG) {
|
||||
@ -1339,7 +1369,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
#if defined(CONFIG_FWLPS_IN_IPS) || defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_RTL8188E)
|
||||
#if defined(CONFIG_FWLPS_IN_IPS) || defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_RTL8188E) || defined(CONFIG_PNO_SUPPORT)
|
||||
#ifdef CONFIG_IPS
|
||||
if (_FALSE == ips_leave(pri_padapter))
|
||||
RTW_INFO("======> ips_leave fail.............\n");
|
||||
@ -2255,7 +2285,10 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_LPS_POFF_INIT, 0);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
_rtw_mutex_init(&pwrctrlpriv->lps_ack_mutex);
|
||||
pwrctrlpriv->lps_ack_status = -1;
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
}
|
||||
|
||||
|
||||
@ -2315,6 +2348,9 @@ void rtw_free_pwrctrl_priv(PADAPTER adapter)
|
||||
_free_pwrlock(&pwrctrlpriv->lock);
|
||||
_free_pwrlock(&pwrctrlpriv->check_32k_lock);
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
_rtw_mutex_free(&pwrctrlpriv->lps_ack_mutex);
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
|
@ -2461,8 +2461,6 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
||||
u16 capability;
|
||||
unsigned char *pos;
|
||||
struct rtw_ieee802_11_elems elems;
|
||||
struct rtw_ieee80211_ht_cap *pht_cap = NULL;
|
||||
struct HT_info_element *pht_info = NULL;
|
||||
|
||||
_rtw_memset(recv_beacon, 0, sizeof(*recv_beacon));
|
||||
|
||||
@ -2475,34 +2473,48 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
||||
if (rtw_ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed)
|
||||
return _FALSE;
|
||||
|
||||
/* check bw and channel offset */
|
||||
if (elems.ht_capabilities) {
|
||||
if (elems.ht_capabilities_len != sizeof(*pht_cap))
|
||||
if (elems.ht_capabilities_len != 26)
|
||||
return _FALSE;
|
||||
|
||||
pht_cap = (struct rtw_ieee80211_ht_cap *) elems.ht_capabilities;
|
||||
recv_beacon->ht_cap_info = pht_cap->cap_info;
|
||||
}
|
||||
|
||||
if (elems.ht_operation) {
|
||||
if (elems.ht_operation_len != sizeof(*pht_info))
|
||||
if (elems.ht_operation_len != 22)
|
||||
return _FALSE;
|
||||
|
||||
pht_info = (struct HT_info_element *) elems.ht_operation;
|
||||
recv_beacon->ht_info_infos_0_sco = pht_info->infos[0] & 0x03;
|
||||
}
|
||||
|
||||
/* Checking for channel */
|
||||
if (elems.ds_params && elems.ds_params_len == sizeof(recv_beacon->bcn_channel))
|
||||
_rtw_memcpy(&recv_beacon->bcn_channel, elems.ds_params,
|
||||
sizeof(recv_beacon->bcn_channel));
|
||||
else if (pht_info)
|
||||
/* In 5G, some ap do not have DSSET IE checking HT info for channel */
|
||||
recv_beacon->bcn_channel = pht_info->primary_channel;
|
||||
else {
|
||||
if (elems.vht_capabilities) {
|
||||
if (elems.vht_capabilities_len != 12)
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
if (elems.vht_operation) {
|
||||
if (elems.vht_operation_len != 5)
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
if (rtw_ies_get_supported_rate(pos, left, recv_beacon->rate_set, &recv_beacon->rate_num) == _FAIL)
|
||||
return _FALSE;
|
||||
|
||||
if (cckratesonly_included(recv_beacon->rate_set, recv_beacon->rate_num) == _TRUE)
|
||||
recv_beacon->proto_cap |= PROTO_CAP_11B;
|
||||
else if (cckrates_included(recv_beacon->rate_set, recv_beacon->rate_num) == _TRUE)
|
||||
recv_beacon->proto_cap |= PROTO_CAP_11B | PROTO_CAP_11G;
|
||||
else
|
||||
recv_beacon->proto_cap |= PROTO_CAP_11G;
|
||||
|
||||
if (elems.ht_capabilities && elems.ht_operation)
|
||||
recv_beacon->proto_cap |= PROTO_CAP_11N;
|
||||
|
||||
if (elems.vht_capabilities && elems.vht_operation)
|
||||
recv_beacon->proto_cap |= PROTO_CAP_11AC;
|
||||
|
||||
/* check bw and channel offset */
|
||||
rtw_ies_get_chbw(pos, left, &recv_beacon->ch, &recv_beacon->bw, &recv_beacon->offset, 1, 1);
|
||||
if (!recv_beacon->ch) {
|
||||
/* we don't find channel IE, so don't check it */
|
||||
/* RTW_INFO("Oops: %s we don't find channel IE, so don't check it\n", __func__); */
|
||||
recv_beacon->bcn_channel = Adapter->mlmeextpriv.cur_channel;
|
||||
recv_beacon->ch = Adapter->mlmeextpriv.cur_channel;
|
||||
}
|
||||
|
||||
/* checking SSID */
|
||||
@ -2512,22 +2524,21 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
||||
|
||||
_rtw_memcpy(recv_beacon->ssid, elems.ssid, elems.ssid_len);
|
||||
recv_beacon->ssid_len = elems.ssid_len;
|
||||
} else
|
||||
; /* means hidden ssid */
|
||||
}
|
||||
|
||||
/* checking RSN first */
|
||||
if (elems.rsn_ie && elems.rsn_ie_len) {
|
||||
recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WPA2;
|
||||
rtw_parse_wpa2_ie(elems.rsn_ie - 2, elems.rsn_ie_len + 2,
|
||||
&recv_beacon->group_cipher, &recv_beacon->pairwise_cipher,
|
||||
&recv_beacon->is_8021x, NULL);
|
||||
&recv_beacon->akm, NULL);
|
||||
}
|
||||
/* checking WPA secon */
|
||||
else if (elems.wpa_ie && elems.wpa_ie_len) {
|
||||
recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WPA;
|
||||
rtw_parse_wpa_ie(elems.wpa_ie - 2, elems.wpa_ie_len + 2,
|
||||
&recv_beacon->group_cipher, &recv_beacon->pairwise_cipher,
|
||||
&recv_beacon->is_8021x);
|
||||
&recv_beacon->akm);
|
||||
} else if (capability & BIT(4))
|
||||
recv_beacon->encryp_protocol = ENCRYP_PROTOCOL_WEP;
|
||||
|
||||
@ -2543,61 +2554,48 @@ int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon)
|
||||
void rtw_dump_bcn_keys(void *sel, struct beacon_keys *recv_beacon)
|
||||
{
|
||||
u8 ssid[IW_ESSID_MAX_SIZE + 1];
|
||||
|
||||
_rtw_memcpy(ssid, recv_beacon->ssid, recv_beacon->ssid_len);
|
||||
ssid[recv_beacon->ssid_len] = '\0';
|
||||
|
||||
RTW_INFO("%s: ssid = %s\n", __func__, ssid);
|
||||
RTW_INFO("%s: channel = %d\n", __func__, recv_beacon->bcn_channel);
|
||||
RTW_INFO("%s: ht_cap = 0x%04x\n", __func__, recv_beacon->ht_cap_info);
|
||||
RTW_INFO("%s: ht_info_infos_0_sco = 0x%02x\n", __func__, recv_beacon->ht_info_infos_0_sco);
|
||||
RTW_INFO("%s: sec=%d, group = %x, pair = %x, 8021X = %x\n", __func__,
|
||||
recv_beacon->encryp_protocol, recv_beacon->group_cipher,
|
||||
recv_beacon->pairwise_cipher, recv_beacon->is_8021x);
|
||||
RTW_PRINT_SEL(sel, "ssid = %s (len = %u)\n", ssid, recv_beacon->ssid_len);
|
||||
RTW_PRINT_SEL(sel, "ch = %u,%u,%u\n"
|
||||
, recv_beacon->ch, recv_beacon->bw, recv_beacon->offset);
|
||||
RTW_PRINT_SEL(sel, "proto_cap = 0x%02x\n", recv_beacon->proto_cap);
|
||||
RTW_MAP_DUMP_SEL(sel, "rate_set = "
|
||||
, recv_beacon->rate_set, recv_beacon->rate_num);
|
||||
RTW_PRINT_SEL(sel, "sec = %d, group = 0x%x, pair = 0x%x, akm = 0x%08x\n"
|
||||
, recv_beacon->encryp_protocol, recv_beacon->group_cipher
|
||||
, recv_beacon->pairwise_cipher, recv_beacon->akm);
|
||||
}
|
||||
#define DBG_BCN_CNT
|
||||
|
||||
int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
||||
{
|
||||
unsigned int len;
|
||||
#define BCNKEY_VERIFY_PROTO_CAP 0
|
||||
#define BCNKEY_VERIFY_WHOLE_RATE_SET 0
|
||||
|
||||
u8 *pbssid = GetAddr3Ptr(pframe);
|
||||
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||
struct wlan_network *cur_network = &(Adapter->mlmepriv.cur_network);
|
||||
struct beacon_keys *cur_beacon = &pmlmepriv->cur_beacon_keys;
|
||||
struct beacon_keys recv_beacon;
|
||||
int ret = 0;
|
||||
|
||||
if (is_client_associated_to_ap(Adapter) == _FALSE)
|
||||
return _TRUE;
|
||||
|
||||
len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
if (len > MAX_IE_SZ) {
|
||||
RTW_WARN("%s IE too long for survey event\n", __func__);
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(cur_network->network.MacAddress, pbssid, 6) == _FALSE) {
|
||||
RTW_WARN("Oops: rtw_check_network_encrypt linked but recv other bssid bcn\n" MAC_FMT MAC_FMT,
|
||||
MAC_ARG(pbssid), MAC_ARG(cur_network->network.MacAddress));
|
||||
return _TRUE;
|
||||
}
|
||||
goto exit_success;
|
||||
|
||||
if (rtw_get_bcn_keys(Adapter, pframe, packet_len, &recv_beacon) == _FALSE)
|
||||
return _TRUE; /* parsing failed => broken IE */
|
||||
goto exit_success; /* parsing failed => broken IE */
|
||||
|
||||
#ifdef DBG_RX_BCN
|
||||
rtw_debug_bcn(Adapter, pframe, packet_len);
|
||||
#endif
|
||||
|
||||
/* don't care hidden ssid, use current beacon ssid directly */
|
||||
if (recv_beacon.ssid_len == 0) {
|
||||
_rtw_memcpy(recv_beacon.ssid, pmlmepriv->cur_beacon_keys.ssid,
|
||||
pmlmepriv->cur_beacon_keys.ssid_len);
|
||||
recv_beacon.ssid_len = pmlmepriv->cur_beacon_keys.ssid_len;
|
||||
}
|
||||
#ifdef CONFIG_BCN_CNT_CONFIRM_HDL
|
||||
if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, sizeof(recv_beacon)) == _TRUE)
|
||||
if (_rtw_memcmp(&recv_beacon, cur_beacon, sizeof(recv_beacon)) == _TRUE)
|
||||
pmlmepriv->new_beacon_cnts = 0;
|
||||
else if ((pmlmepriv->new_beacon_cnts == 0) ||
|
||||
_rtw_memcmp(&recv_beacon, &pmlmepriv->new_beacon_keys, sizeof(recv_beacon)) == _FALSE) {
|
||||
@ -2605,11 +2603,11 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
||||
|
||||
if (pmlmepriv->new_beacon_cnts == 0) {
|
||||
RTW_ERR("%s: cur beacon key\n", __func__);
|
||||
RTW_DBG_EXPR(rtw_dump_bcn_keys(&pmlmepriv->cur_beacon_keys));
|
||||
RTW_DBG_EXPR(rtw_dump_bcn_keys(RTW_DBGDUMP, cur_beacon));
|
||||
}
|
||||
|
||||
RTW_DBG("%s: new beacon key\n", __func__);
|
||||
RTW_DBG_EXPR(rtw_dump_bcn_keys(&recv_beacon));
|
||||
RTW_DBG_EXPR(rtw_dump_bcn_keys(RTW_DBGDUMP, &recv_beacon));
|
||||
|
||||
_rtw_memcpy(&pmlmepriv->new_beacon_keys, &recv_beacon, sizeof(recv_beacon));
|
||||
pmlmepriv->new_beacon_cnts = 1;
|
||||
@ -2621,45 +2619,47 @@ int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len)
|
||||
/* if counter >= max, it means beacon is changed really */
|
||||
if (pmlmepriv->new_beacon_cnts >= new_bcn_max)
|
||||
#else
|
||||
if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys, sizeof(recv_beacon)) == _FALSE)
|
||||
if (_rtw_memcmp(&recv_beacon, cur_beacon, sizeof(recv_beacon)) == _FALSE)
|
||||
#endif
|
||||
{
|
||||
/* check bw mode change only? */
|
||||
pmlmepriv->cur_beacon_keys.ht_cap_info = recv_beacon.ht_cap_info;
|
||||
pmlmepriv->cur_beacon_keys.ht_info_infos_0_sco = recv_beacon.ht_info_infos_0_sco;
|
||||
if (_rtw_memcmp(&recv_beacon, &pmlmepriv->cur_beacon_keys,
|
||||
sizeof(recv_beacon)) == _FALSE) {
|
||||
/* beacon is changed, have to do disconnect/connect */
|
||||
RTW_WARN("%s: new beacon occur!!\n", __func__);
|
||||
#ifdef DBG_BCN_CNT
|
||||
rtw_dump_bcn_keys(&recv_beacon);
|
||||
#endif
|
||||
return _FAIL;
|
||||
struct beacon_keys tmp_beacon;
|
||||
|
||||
RTW_INFO(FUNC_ADPT_FMT" new beacon occur!!\n", FUNC_ADPT_ARG(Adapter));
|
||||
RTW_INFO(FUNC_ADPT_FMT" cur beacon key:\n", FUNC_ADPT_ARG(Adapter));
|
||||
rtw_dump_bcn_keys(RTW_DBGDUMP, cur_beacon);
|
||||
RTW_INFO(FUNC_ADPT_FMT" new beacon key:\n", FUNC_ADPT_ARG(Adapter));
|
||||
rtw_dump_bcn_keys(RTW_DBGDUMP, &recv_beacon);
|
||||
|
||||
if (!rtw_is_chbw_grouped(cur_beacon->ch, cur_beacon->bw, cur_beacon->offset
|
||||
, recv_beacon.ch, recv_beacon.bw, recv_beacon.offset))
|
||||
goto exit;
|
||||
|
||||
_rtw_memcpy(&tmp_beacon, cur_beacon, sizeof(tmp_beacon));
|
||||
|
||||
/* check fields excluding below */
|
||||
tmp_beacon.ch = recv_beacon.ch;
|
||||
tmp_beacon.bw = recv_beacon.bw;
|
||||
tmp_beacon.offset = recv_beacon.offset;
|
||||
if (!BCNKEY_VERIFY_PROTO_CAP)
|
||||
tmp_beacon.proto_cap = recv_beacon.proto_cap;
|
||||
if (!BCNKEY_VERIFY_WHOLE_RATE_SET) {
|
||||
tmp_beacon.rate_num = recv_beacon.rate_num;
|
||||
_rtw_memcpy(tmp_beacon.rate_set, recv_beacon.rate_set, 12);
|
||||
}
|
||||
#ifdef DBG_BCN_CNT
|
||||
RTW_INFO("%s bw mode change\n", __func__);
|
||||
RTW_INFO("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
|
||||
cur_network->BcnInfo.ht_cap_info,
|
||||
cur_network->BcnInfo.ht_info_infos_0);
|
||||
#endif
|
||||
if (_rtw_memcmp(&tmp_beacon, &recv_beacon, sizeof(recv_beacon)) == _FALSE)
|
||||
goto exit;
|
||||
|
||||
cur_network->BcnInfo.ht_cap_info = recv_beacon.ht_cap_info;
|
||||
cur_network->BcnInfo.ht_info_infos_0 =
|
||||
(cur_network->BcnInfo.ht_info_infos_0 & (~0x03)) |
|
||||
recv_beacon.ht_info_infos_0_sco;
|
||||
|
||||
#ifdef DBG_BCN_CNT
|
||||
RTW_INFO("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n", __func__,
|
||||
cur_network->BcnInfo.ht_cap_info,
|
||||
cur_network->BcnInfo.ht_info_infos_0);
|
||||
#endif
|
||||
_rtw_memcpy(&pmlmepriv->cur_beacon_keys, &recv_beacon, sizeof(recv_beacon));
|
||||
_rtw_memcpy(cur_beacon, &recv_beacon, sizeof(recv_beacon));
|
||||
#ifdef CONFIG_BCN_CNT_CONFIRM_HDL
|
||||
pmlmepriv->new_beacon_cnts = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
return _SUCCESS;
|
||||
exit_success:
|
||||
ret = 1;
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta_info *psta)
|
||||
|
158
hal/hal_com.c
158
hal/hal_com.c
@ -2002,6 +2002,49 @@ exit:
|
||||
}
|
||||
#endif /* RTW_PER_CMD_SUPPORT_FW */
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
#define GET_C2H_LPS_STATUS_RPT_GET_ACTION(_data) LE_BITS_TO_1BYTE(((u8 *)(_data)), 0, 8)
|
||||
#define GET_C2H_LPS_STATUS_RPT_GET_STATUS_CODE(_data) LE_BITS_TO_1BYTE(((u8 *)(_data)) + 1, 0, 8)
|
||||
#define DBG_LPS_STATUS_RPT 0
|
||||
|
||||
int c2h_lps_status_rpt(PADAPTER adapter, u8 *data, u8 len)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
|
||||
struct submit_ctx *lps_sctx = &pwrpriv->lps_ack_sctx;
|
||||
u8 action = 0;
|
||||
s8 status_code = 0;
|
||||
int ret = _FAIL;
|
||||
|
||||
if (len < LPS_STATUS_RPT_LEN) {
|
||||
RTW_WARN("%s len(%u) < %d\n", __func__, len, LPS_STATUS_RPT_LEN);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
action = GET_C2H_LPS_STATUS_RPT_GET_ACTION(data);
|
||||
status_code = GET_C2H_LPS_STATUS_RPT_GET_STATUS_CODE(data);
|
||||
|
||||
/* action=0: report force leave null data status */
|
||||
switch (action) {
|
||||
case 0:
|
||||
pwrpriv->lps_ack_status = status_code;
|
||||
|
||||
if (DBG_LPS_STATUS_RPT)
|
||||
RTW_INFO("=== [C2H LPS Action(%d)] LPS Status Code:%d ===\n", action, status_code);
|
||||
|
||||
break;
|
||||
default:
|
||||
RTW_INFO("UnKnown Action(%d) for C2H LPS RPT\n", action);
|
||||
break;
|
||||
}
|
||||
|
||||
rtw_sctx_done(&lps_sctx);
|
||||
ret = _SUCCESS;
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
|
||||
void rtw_hal_update_sta_wset(_adapter *adapter, struct sta_info *psta)
|
||||
{
|
||||
u8 w_set = 0;
|
||||
@ -4574,7 +4617,7 @@ void rtw_hal_set_FwAoacRsvdPage_cmd(PADAPTER padapter, PRSVDPAGE_LOC rsvdpageloc
|
||||
}
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
else {
|
||||
|
||||
#ifndef RTW_HALMAC
|
||||
if (!pwrpriv->wowlan_in_resume) {
|
||||
RTW_INFO("NLO_INFO=%d\n", rsvdpageloc->LocPNOInfo);
|
||||
_rtw_memset(&u1H2CAoacRsvdPageParm, 0,
|
||||
@ -4586,6 +4629,7 @@ void rtw_hal_set_FwAoacRsvdPage_cmd(PADAPTER padapter, PRSVDPAGE_LOC rsvdpageloc
|
||||
H2C_AOAC_RSVDPAGE_LOC_LEN,
|
||||
u1H2CAoacRsvdPageParm);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
@ -4966,6 +5010,7 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type)
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
static u8 rtw_hal_check_pno_enabled(_adapter *adapter)
|
||||
{
|
||||
#ifndef RTW_HALMAC
|
||||
struct pwrctrl_priv *ppwrpriv = adapter_to_pwrctl(adapter);
|
||||
u8 res = 0, count = 0;
|
||||
u8 ret = _FALSE;
|
||||
@ -4986,6 +5031,9 @@ static u8 rtw_hal_check_pno_enabled(_adapter *adapter)
|
||||
RTW_INFO("cmd: 0x81 REG_PNO_STATUS: ret(%d)\n", ret);
|
||||
}
|
||||
return ret;
|
||||
#else
|
||||
return _TRUE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -5592,6 +5640,7 @@ static u8 rtw_hal_set_global_info_cmd(_adapter *adapter, u8 group_alg, u8 pairwi
|
||||
static u8 rtw_hal_set_scan_offload_info_cmd(_adapter *adapter,
|
||||
PRSVDPAGE_LOC rsvdpageloc, u8 enable)
|
||||
{
|
||||
#ifndef RTW_HALMAC
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
|
||||
struct hal_ops *pHalFunc = &adapter->hal_func;
|
||||
|
||||
@ -5616,6 +5665,28 @@ static u8 rtw_hal_set_scan_offload_info_cmd(_adapter *adapter,
|
||||
H2C_D0_SCAN_OFFLOAD_INFO,
|
||||
H2C_SCAN_OFFLOAD_CTRL_LEN,
|
||||
u1H2CScanOffloadInfoParm);
|
||||
#else
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
|
||||
u8 ret = 0;
|
||||
|
||||
u8 u1H2CNLOINFOInfoParm[H2C_NLO_INFO_LEN] = {0};
|
||||
|
||||
RTW_INFO("%s: loc_nlo_info: %d enable %d\n", __func__,
|
||||
rsvdpageloc->LocPNOInfo, enable);
|
||||
|
||||
SET_H2CCMD_NLO_FUN_EN(u1H2CNLOINFOInfoParm, enable);
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
SET_H2CCMD_NLO_PS_32K(u1H2CNLOINFOInfoParm, enable); //32K
|
||||
#endif
|
||||
SET_H2CCMD_NLO_LOC_NLO_INFO(u1H2CNLOINFOInfoParm,
|
||||
rsvdpageloc->LocPNOInfo);
|
||||
|
||||
ret = rtw_hal_fill_h2c_cmd(adapter,
|
||||
H2C_NLO_INFO,
|
||||
H2C_NLO_INFO_LEN,
|
||||
u1H2CNLOINFOInfoParm);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
@ -5640,7 +5711,7 @@ void rtw_hal_set_fw_wow_related_cmd(_adapter *padapter, u8 enable)
|
||||
rtw_hal_set_wowlan_ctrl_cmd(padapter, enable, _FALSE);
|
||||
|
||||
if (enable) {
|
||||
if(!no_wake)
|
||||
if(!no_wake && !ppwrpriv->wowlan_pno_enable)
|
||||
rtw_hal_set_global_info_cmd(padapter,
|
||||
psecpriv->dot118021XGrpPrivacy,
|
||||
psecpriv->dot11PrivacyAlgrthm);
|
||||
@ -8061,7 +8132,7 @@ static void rtw_hal_construct_ndp_info(_adapter *padapter,
|
||||
#endif /* CONFIG_IPV6 */
|
||||
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
|
||||
void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
|
||||
u32 *pLength, pno_ssid_t *ssid)
|
||||
{
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
@ -8127,6 +8198,11 @@ static void rtw_hal_construct_PNO_info(_adapter *padapter,
|
||||
pPnoInfoPkt += 3;
|
||||
_rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->fast_scan_period, 1);
|
||||
|
||||
#ifdef RTW_HALMAC
|
||||
_rtw_memset(pPnoInfoPkt, 0xA5A5A5A5, 4);
|
||||
pPnoInfoPkt += 12;
|
||||
#else
|
||||
|
||||
pPnoInfoPkt += 4;
|
||||
_rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->fast_scan_iterations, 4);
|
||||
|
||||
@ -8134,6 +8210,7 @@ static void rtw_hal_construct_PNO_info(_adapter *padapter,
|
||||
_rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->slow_scan_period, 4);
|
||||
|
||||
pPnoInfoPkt += 4;
|
||||
#endif
|
||||
_rtw_memcpy(pPnoInfoPkt, &pwrctl->pnlo_info->ssid_length, MAX_PNO_LIST_COUNT);
|
||||
|
||||
pPnoInfoPkt += MAX_PNO_LIST_COUNT;
|
||||
@ -8147,12 +8224,18 @@ static void rtw_hal_construct_PNO_info(_adapter *padapter,
|
||||
|
||||
pPnoInfoPkt += MAX_HIDDEN_AP;
|
||||
|
||||
#ifdef RTW_HALMAC
|
||||
*pLength += 72;
|
||||
pPnoInfoPkt = pframe + 72;
|
||||
#else
|
||||
|
||||
/*
|
||||
SSID is located at 128th Byte in NLO info Page
|
||||
*/
|
||||
|
||||
*pLength += 128;
|
||||
pPnoInfoPkt = pframe + 128;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < pwrctl->pnlo_info->ssid_num ; i++) {
|
||||
_rtw_memcpy(pPnoInfoPkt, &pwrctl->pno_ssid_list->node[i].SSID,
|
||||
@ -8658,9 +8741,8 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
|
||||
#endif
|
||||
} else {
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
if (pwrctl->wowlan_in_resume == _FALSE &&
|
||||
pwrctl->pno_inited == _TRUE) {
|
||||
|
||||
if (pwrctl->pno_inited == _TRUE) {
|
||||
#ifndef RTW_HALMAC
|
||||
/* Broadcast Probe Request */
|
||||
rsvd_page_loc->LocProbePacket = *page_num;
|
||||
|
||||
@ -8686,7 +8768,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
|
||||
#ifdef DBG_RSVD_PAGE_CFG
|
||||
RSVD_PAGE_CFG("WOW-ProbeReq", CurtPktPageNum, *page_num, 0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* Hidden SSID Probe Request */
|
||||
ssid_num = pwrctl->pnlo_info->hidden_ssid_num;
|
||||
|
||||
@ -8728,7 +8810,7 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
|
||||
#ifdef DBG_RSVD_PAGE_CFG
|
||||
RSVD_PAGE_CFG("WOW-PNOInfo", CurtPktPageNum, *page_num, 0);
|
||||
#endif
|
||||
|
||||
#ifndef RTW_HALMAC
|
||||
/* Scan Info Page */
|
||||
rsvd_page_loc->LocScanInfo = *page_num;
|
||||
RTW_INFO("LocScanInfo: %d\n", rsvd_page_loc->LocScanInfo);
|
||||
@ -8743,6 +8825,8 @@ void rtw_hal_set_wow_fw_rsvd_page(_adapter *adapter, u8 *pframe, u16 index,
|
||||
#ifdef DBG_RSVD_PAGE_CFG
|
||||
RSVD_PAGE_CFG("WOW-ScanInfo", CurtPktPageNum, *page_num, *total_pkt_len);
|
||||
#endif
|
||||
#endif
|
||||
*total_pkt_len = index;
|
||||
}
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
}
|
||||
@ -9588,7 +9672,7 @@ static void rtw_hal_wow_enable(_adapter *adapter)
|
||||
rtw_hal_backup_rate(adapter);
|
||||
|
||||
rtw_hal_fw_dl(adapter, _TRUE);
|
||||
if(no_wake)
|
||||
if(no_wake && !pwrctl->wowlan_pno_enable)
|
||||
media_status_rpt = RT_MEDIA_DISCONNECT;
|
||||
else
|
||||
media_status_rpt = RT_MEDIA_CONNECT;
|
||||
@ -9605,6 +9689,11 @@ static void rtw_hal_wow_enable(_adapter *adapter)
|
||||
if (res == _FAIL)
|
||||
RTW_PRINT("[WARNING] pause RX DMA fail\n");
|
||||
|
||||
if (pwrctl->wowlan_pno_enable) {
|
||||
#ifdef CONFIG_FW_MULTI_PORT_SUPPORT
|
||||
rtw_hal_set_default_port_id_cmd(adapter, 0);
|
||||
#endif
|
||||
} else {
|
||||
#ifndef CONFIG_WOW_PATTERN_HW_CAM
|
||||
/* Reconfig RX_FF Boundary */
|
||||
rtw_hal_set_wow_rxff_boundary(adapter, _TRUE);
|
||||
@ -9614,7 +9703,6 @@ static void rtw_hal_wow_enable(_adapter *adapter)
|
||||
if(!no_wake)
|
||||
rtw_hal_dl_pattern(adapter, 1);
|
||||
|
||||
if (!pwrctl->wowlan_pno_enable) {
|
||||
psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv));
|
||||
|
||||
if (psta != NULL) {
|
||||
@ -9651,6 +9739,12 @@ static void rtw_hal_wow_enable(_adapter *adapter)
|
||||
|
||||
RTW_PRINT("wowlan_wake_reason: 0x%02x\n",
|
||||
pwrctl->wowlan_wake_reason);
|
||||
|
||||
#if defined(RTW_HALMAC) && defined(CONFIG_PNO_SUPPORT)
|
||||
if(pwrctl->wowlan_pno_enable)
|
||||
rtw_halmac_pno_scanoffload(adapter->dvobj, 1);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GTK_OL_DBG
|
||||
dump_sec_cam(RTW_DBGDUMP, adapter);
|
||||
dump_sec_cam_cache(RTW_DBGDUMP, adapter);
|
||||
@ -9736,11 +9830,18 @@ static void rtw_hal_wow_disable(_adapter *adapter)
|
||||
|
||||
RTW_PRINT("%s, WOWLAN_DISABLE\n", __func__);
|
||||
|
||||
if(registry_par->suspend_type == FW_IPS_DISABLE_BBRF && !check_fwstate(pmlmepriv, _FW_LINKED)) {
|
||||
if(registry_par->suspend_type == FW_IPS_DISABLE_BBRF
|
||||
&& !check_fwstate(pmlmepriv, _FW_LINKED)
|
||||
&& !pwrctl->wowlan_pno_enable) {
|
||||
RTW_INFO("FW_IPS_DISABLE_BBRF resume\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(RTW_HALMAC) && defined(CONFIG_PNO_SUPPORT)
|
||||
if(pwrctl->wowlan_pno_enable)
|
||||
rtw_halmac_pno_scanoffload(adapter->dvobj, 0);
|
||||
#endif
|
||||
|
||||
if (!pwrctl->wowlan_pno_enable) {
|
||||
psta = rtw_get_stainfo(&adapter->stapriv, get_bssid(pmlmepriv));
|
||||
if (psta != NULL)
|
||||
@ -9772,7 +9873,9 @@ static void rtw_hal_wow_disable(_adapter *adapter)
|
||||
RTW_INFO("[Error]%s: disable WOW cmd fail\n!!", __func__);
|
||||
rtw_hal_force_enable_rxdma(adapter);
|
||||
}
|
||||
|
||||
if (pwrctl->wowlan_pno_enable) {
|
||||
rtw_hal_release_rx_dma(adapter);
|
||||
} else {
|
||||
rtw_hal_gate_bb(adapter, _TRUE);
|
||||
|
||||
res = rtw_hal_pause_rx_dma(adapter);
|
||||
@ -9799,7 +9902,7 @@ static void rtw_hal_wow_disable(_adapter *adapter)
|
||||
rtw_hal_get_aoac_rpt(adapter);
|
||||
rtw_hal_update_sw_security_info(adapter);
|
||||
}
|
||||
|
||||
}
|
||||
rtw_hal_fw_dl(adapter, _FALSE);
|
||||
|
||||
#ifdef CONFIG_GPIO_WAKEUP
|
||||
@ -11493,13 +11596,33 @@ s32 rtw_hal_set_wifi_btc_port_id_cmd(_adapter *adapter)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LPS_ACTIVE_TIMEOUT 10 /*number of times*/
|
||||
#define LPS_ACTIVE_TIMEOUT 50 /*number of times*/
|
||||
void rtw_lps_state_chk(_adapter *adapter, u8 ps_mode)
|
||||
{
|
||||
if (ps_mode == PS_MODE_ACTIVE) {
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
|
||||
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct sta_info *psta = NULL;
|
||||
u8 ps_ready = _FALSE;
|
||||
s8 leave_wait_count = LPS_ACTIVE_TIMEOUT;
|
||||
|
||||
if (ps_mode == PS_MODE_ACTIVE) {
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
if (rtw_sctx_wait(&pwrpriv->lps_ack_sctx, __func__)) {
|
||||
if (pwrpriv->lps_ack_status > 0) {
|
||||
psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress);
|
||||
if (psta != NULL) {
|
||||
if(issue_nulldata(adapter, psta->cmn.mac_addr, PS_MODE_ACTIVE, 3, 1) == _FAIL)
|
||||
RTW_INFO(FUNC_ADPT_FMT" LPS state sync not yet finished.\n", FUNC_ADPT_ARG(adapter));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
RTW_WARN("LPS sctx query timeout, operation abort!!\n");
|
||||
return;
|
||||
}
|
||||
pwrpriv->lps_ack_status = -1;
|
||||
#else
|
||||
do {
|
||||
if ((rtw_read8(adapter, REG_TCR) & BIT_PWRBIT_OW_EN) == 0) {
|
||||
ps_ready = _TRUE;
|
||||
@ -11509,9 +11632,10 @@ void rtw_lps_state_chk(_adapter *adapter, u8 ps_mode)
|
||||
} while (leave_wait_count--);
|
||||
|
||||
if (ps_ready == _FALSE) {
|
||||
RTW_ERR(FUNC_ADPT_FMT" PS_MODE_ACTIVE check failed\n", FUNC_ADPT_ARG(adapter));
|
||||
rtw_warn_on(1);
|
||||
RTW_WARN(FUNC_ADPT_FMT" Power Bit Control is still in HW!\n", FUNC_ADPT_ARG(adapter));
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,7 @@ typedef enum _C2H_EVT {
|
||||
#ifdef RTW_PER_CMD_SUPPORT_FW
|
||||
C2H_PER_RATE_RPT = 0x2c,
|
||||
#endif
|
||||
C2H_LPS_STATUS_RPT = 0x32,
|
||||
C2H_DEFEATURE_RSVD = 0xFD,
|
||||
C2H_EXTEND = 0xff,
|
||||
} C2H_EVT;
|
||||
@ -120,4 +121,10 @@ int c2h_customer_str_rpt_2_hdl(_adapter *adapter, u8 *data, u8 len);
|
||||
int c2h_per_rate_rpt_hdl(_adapter *adapter, u8 *data, u8 len);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
/* C2H_LPS_STATUS_RPT, 0x32 */
|
||||
#define LPS_STATUS_RPT_LEN 2
|
||||
int c2h_lps_status_rpt(PADAPTER adapter, u8 *data, u8 len);
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
|
||||
#endif /* __COMMON_C2H_H__ */
|
||||
|
@ -1068,6 +1068,11 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
|
||||
case C2H_PER_RATE_RPT:
|
||||
c2h_per_rate_rpt_hdl(adapter, payload, plen);
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
case C2H_LPS_STATUS_RPT:
|
||||
c2h_lps_status_rpt(adapter, payload, plen);
|
||||
break;
|
||||
#endif
|
||||
case C2H_EXTEND:
|
||||
sub_id = payload[0];
|
||||
|
@ -952,6 +952,12 @@ void halrf_support_ability_debug(void *dm_void, char input[][16], u32 *_used,
|
||||
"04. (( %s ))HAL_RF_TXGAPK\n",
|
||||
((rf->rf_supportability & HAL_RF_TXGAPK) ? ("V") :
|
||||
(".")));
|
||||
#if (RTL8192F_SUPPORT == 1)
|
||||
PDM_SNPF(out_len, used, output + used, out_len - used,
|
||||
"07. (( %s ))HAL_2GBAND_SHIFT\n",
|
||||
((rf->rf_supportability & HAL_2GBAND_SHIFT) ? ("V") :
|
||||
(".")));
|
||||
#endif
|
||||
} else {
|
||||
if (dm_value[1] == 1) /* enable */
|
||||
rf->rf_supportability |= BIT(dm_value[0]);
|
||||
@ -968,6 +974,48 @@ void halrf_support_ability_debug(void *dm_void, char input[][16], u32 *_used,
|
||||
*_out_len = out_len;
|
||||
}
|
||||
|
||||
void halrf_support_band_shift_debug(void *dm_void, char input[][16], u32 *_used,
|
||||
char *output, u32 *_out_len)
|
||||
{
|
||||
struct dm_struct *dm = (struct dm_struct *)dm_void;
|
||||
struct _hal_rf_ *rf = &dm->rf_table;
|
||||
//u32 band_value[2] = {00};
|
||||
u32 dm_value[10] = {0};
|
||||
u32 used = *_used;
|
||||
u32 out_len = *_out_len;
|
||||
u8 i;
|
||||
|
||||
#if (RTL8192F_SUPPORT == 1)
|
||||
for (i = 0; i < 7; i++)
|
||||
if (input[i + 1])
|
||||
PHYDM_SSCANF(input[i + 2], DCMD_DECIMAL, &dm_value[i]);
|
||||
|
||||
if (!(rf->rf_supportability & HAL_2GBAND_SHIFT)) {
|
||||
PDM_SNPF(out_len, used, output + used, out_len - used,
|
||||
"\nCurr-RF_supportability[07. (( . ))HAL_2GBAND_SHIFT]\nNo RF Band Shift,default: 2.4G!\n");
|
||||
} else {
|
||||
if (dm_value[0] == 01) {
|
||||
rf->rf_shift_band = HAL_RF_2P3;
|
||||
PDM_SNPF(out_len, used, output + used, out_len - used,
|
||||
"\n[rf_shift_band] = %d\nRF Band Shift to 2.3G!\n",
|
||||
rf->rf_shift_band);
|
||||
} else if (dm_value[0] == 02) {
|
||||
rf->rf_shift_band = HAL_RF_2P5;
|
||||
PDM_SNPF(out_len, used, output + used, out_len - used,
|
||||
"\n[rf_shift_band] = %d\nRF Band Shift to 2.5G!\n",
|
||||
rf->rf_shift_band);
|
||||
} else {
|
||||
rf->rf_shift_band = HAL_RF_2P4;
|
||||
PDM_SNPF(out_len, used, output + used, out_len - used,
|
||||
"\n[rf_shift_band] = %d\nNo RF Band Shift,default: 2.4G!\n",
|
||||
rf->rf_shift_band);
|
||||
}
|
||||
}
|
||||
*_used = used;
|
||||
*_out_len = out_len;
|
||||
#endif
|
||||
}
|
||||
|
||||
void halrf_cmn_info_init(void *dm_void, enum halrf_cmninfo_init cmn_info,
|
||||
u32 value)
|
||||
{
|
||||
@ -1134,6 +1182,18 @@ void halrf_supportability_init_mp(void *dm_void)
|
||||
0;
|
||||
break;
|
||||
#endif
|
||||
#if (RTL8192F_SUPPORT == 1)
|
||||
case ODM_RTL8192F:
|
||||
rf->rf_supportability =
|
||||
HAL_RF_TX_PWR_TRACK |
|
||||
HAL_RF_IQK |
|
||||
HAL_RF_LCK |
|
||||
HAL_2GBAND_SHIFT |
|
||||
/*@HAL_RF_DPK |*/
|
||||
/*@HAL_RF_TXGAPK |*/
|
||||
0;
|
||||
break;
|
||||
#endif
|
||||
#if (RTL8195B_SUPPORT == 1)
|
||||
case ODM_RTL8195B:
|
||||
rf->rf_supportability =
|
||||
@ -1209,6 +1269,18 @@ void halrf_supportability_init(void *dm_void)
|
||||
0;
|
||||
break;
|
||||
#endif
|
||||
#if (RTL8192F_SUPPORT == 1)
|
||||
case ODM_RTL8192F:
|
||||
rf->rf_supportability =
|
||||
HAL_RF_TX_PWR_TRACK |
|
||||
HAL_RF_IQK |
|
||||
HAL_RF_LCK |
|
||||
HAL_2GBAND_SHIFT |
|
||||
/*@HAL_RF_DPK |*/
|
||||
/*@HAL_RF_TXGAPK |*/
|
||||
0;
|
||||
break;
|
||||
#endif
|
||||
#if (RTL8195B_SUPPORT == 1)
|
||||
case ODM_RTL8195B:
|
||||
rf->rf_supportability =
|
||||
|
@ -371,6 +371,7 @@ enum halrf_func_idx { /*F_XXX = PHYDM XXX function*/
|
||||
RF03_DPK = 3,
|
||||
RF04_TXGAPK = 4,
|
||||
RF05_DACK = 5,
|
||||
RF07_2GBAND_SHIFT = 7
|
||||
};
|
||||
|
||||
enum halrf_ability {
|
||||
@ -379,7 +380,14 @@ enum halrf_ability {
|
||||
HAL_RF_LCK = BIT(RF02_LCK),
|
||||
HAL_RF_DPK = BIT(RF03_DPK),
|
||||
HAL_RF_TXGAPK = BIT(RF04_TXGAPK),
|
||||
HAL_RF_DACK = BIT(RF05_DACK)
|
||||
HAL_RF_DACK = BIT(RF05_DACK),
|
||||
HAL_2GBAND_SHIFT = BIT(RF07_2GBAND_SHIFT)
|
||||
};
|
||||
|
||||
enum halrf_shift_band {
|
||||
HAL_RF_2P4 = 0,
|
||||
HAL_RF_2P3 = 1,
|
||||
HAL_RF_2P5 = 2
|
||||
};
|
||||
|
||||
enum halrf_dbg_comp {
|
||||
@ -430,6 +438,7 @@ struct _hal_rf_ {
|
||||
|
||||
/*update*/
|
||||
u32 rf_supportability;
|
||||
u8 rf_shift_band;
|
||||
|
||||
u8 eeprom_thermal;
|
||||
u8 dpk_en; /*Enable Function DPK OFF/ON = 0/1*/
|
||||
@ -468,6 +477,8 @@ u8 halrf_match_iqk_version(void *dm_void);
|
||||
|
||||
void halrf_support_ability_debug(void *dm_void, char input[][16], u32 *_used,
|
||||
char *output, u32 *_out_len);
|
||||
void halrf_support_band_shift_debug(void *dm_void, char input[][16], u32 *_used,
|
||||
char *output, u32 *_out_len);
|
||||
|
||||
void halrf_cmn_info_init(void *dm_void, enum halrf_cmninfo_init cmn_info,
|
||||
u32 value);
|
||||
|
@ -139,6 +139,7 @@ enum halrf_CMD_ID {
|
||||
HALRF_IQK_INFO,
|
||||
HALRF_IQK,
|
||||
HALRF_IQK_DEBUG,
|
||||
HAL_BAND_SHIFT,
|
||||
};
|
||||
|
||||
struct halrf_command halrf_cmd_ary[] = {
|
||||
@ -149,6 +150,7 @@ struct halrf_command halrf_cmd_ary[] = {
|
||||
{"iqk_info", HALRF_IQK_INFO},
|
||||
{"iqk", HALRF_IQK},
|
||||
{"iqk_dbg", HALRF_IQK_DEBUG},
|
||||
{"band_shift", HAL_BAND_SHIFT},
|
||||
};
|
||||
|
||||
void halrf_cmd_parser(void *dm_void, char input[][16], u32 *_used, char *output,
|
||||
@ -192,6 +194,10 @@ void halrf_cmd_parser(void *dm_void, char input[][16], u32 *_used, char *output,
|
||||
halrf_support_ability_debug(dm, &input[0], &used, output,
|
||||
&out_len);
|
||||
break;
|
||||
case HAL_BAND_SHIFT:
|
||||
halrf_support_band_shift_debug(dm, &input[0], &used, output,
|
||||
&out_len);
|
||||
break;
|
||||
case HALRF_DBG_COMP:
|
||||
halrf_debug_trace(dm, &input[0], &used, output, &out_len);
|
||||
break;
|
||||
|
@ -318,13 +318,13 @@ void _iqk_restore_rf_8822b(struct dm_struct *dm, u32 *backup_rf_reg,
|
||||
odm_set_rf_reg(dm, RF_PATH_B, RF_0xef, MASK20BITS, 0x0);
|
||||
/*0xdf[4]=0*/
|
||||
_iqk_rf_set_check_8822b(dm, RF_PATH_A, 0xdf,
|
||||
RF_backup[0][RF_PATH_A] & (!BIT(4)));
|
||||
RF_backup[0][RF_PATH_A] & (~BIT(4)));
|
||||
_iqk_rf_set_check_8822b(dm, RF_PATH_B, 0xdf,
|
||||
RF_backup[0][RF_PATH_B] & (!BIT(4)));
|
||||
RF_backup[0][RF_PATH_B] & (~BIT(4)));
|
||||
|
||||
#if 0
|
||||
/*odm_set_rf_reg(dm, RF_PATH_A, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_A] & (!BIT(4)));*/
|
||||
/*odm_set_rf_reg(dm, RF_PATH_B, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_B] & (!BIT(4)));*/
|
||||
/*odm_set_rf_reg(dm, RF_PATH_A, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_A] & (~BIT(4)));*/
|
||||
/*odm_set_rf_reg(dm, RF_PATH_B, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_B] & (~BIT(4)));*/
|
||||
#endif
|
||||
|
||||
for (i = 1; i < RF_REG_NUM_8822B; i++) {
|
||||
@ -443,11 +443,11 @@ void _iqk_reload_iqk_setting_8822b(struct dm_struct *dm, u8 ch,
|
||||
odm_write_4byte(dm, 0x1bd8, data);
|
||||
}
|
||||
if (idx == 0) {
|
||||
report = !(iqk->iqk_fail_report[ch][path][idx]);
|
||||
report = ~(iqk->iqk_fail_report[ch][path][idx]);
|
||||
odm_set_bb_reg(dm, iqk_apply[path],
|
||||
BIT(0), report);
|
||||
} else {
|
||||
report = !(iqk->iqk_fail_report[ch][path][idx]);
|
||||
report = ~(iqk->iqk_fail_report[ch][path][idx]);
|
||||
odm_set_bb_reg(dm, iqk_apply[path],
|
||||
BIT(10), report);
|
||||
}
|
||||
@ -528,7 +528,7 @@ void _iqk_rf_setting_8822b(struct dm_struct *dm)
|
||||
/*0xdf:B11 = 1,B4 = 0, B1 = 1*/
|
||||
tmp = odm_get_rf_reg(dm, (enum rf_path)path,
|
||||
RF_0xdf, MASK20BITS);
|
||||
tmp = (tmp & (!BIT(4))) | BIT(1) | BIT(11);
|
||||
tmp = (tmp & (~BIT(4))) | BIT(1) | BIT(11);
|
||||
_iqk_rf_set_check_8822b(dm, (enum rf_path)path, 0xdf, tmp);
|
||||
#if 0
|
||||
/*odm_set_rf_reg(dm, (enum rf_path)path, RF_0xdf, MASK20BITS, tmp);*/
|
||||
|
@ -2809,6 +2809,11 @@ void odm_cancel_all_timers(struct dm_struct *dm)
|
||||
#if (defined(CONFIG_PHYDM_ANTENNA_DIVERSITY))
|
||||
odm_ant_div_timers(dm, CANCEL_ANTDIV_TIMMER);
|
||||
#endif
|
||||
#ifdef PHYDM_TDMA_DIG_SUPPORT
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
phydm_tdma_dig_timers(dm, CANCEL_TDMA_DIG_TIMMER);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_ADAPTIVE_SOML
|
||||
phydm_adaptive_soml_timers(dm, CANCEL_SOML_TIMMER);
|
||||
#endif
|
||||
@ -2837,6 +2842,11 @@ void odm_release_all_timers(struct dm_struct *dm)
|
||||
#if (defined(CONFIG_PHYDM_ANTENNA_DIVERSITY))
|
||||
odm_ant_div_timers(dm, RELEASE_ANTDIV_TIMMER);
|
||||
#endif
|
||||
#ifdef PHYDM_TDMA_DIG_SUPPORT
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
phydm_tdma_dig_timers(dm, RELEASE_TDMA_DIG_TIMMER);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_ADAPTIVE_SOML
|
||||
phydm_adaptive_soml_timers(dm, RELEASE_SOML_TIMMER);
|
||||
#endif
|
||||
|
@ -250,7 +250,7 @@ void phydm_fahm_set_th_by_igi(void *dm_void, u8 igi)
|
||||
odm_set_bb_reg(dm, R_0x970, MASKDWORD, val);
|
||||
val = BYTE_2_DWORD(f_th[7], f_th[6], f_th[5], f_th[4]);
|
||||
odm_set_bb_reg(dm, R_0x974, MASKDWORD, val);
|
||||
BYTE_2_DWORD(0, f_th[10], f_th[9], f_th[8]);
|
||||
val = BYTE_2_DWORD(0, f_th[10], f_th[9], f_th[8]);
|
||||
odm_set_bb_reg(dm, R_0x978, 0xffffff, val);
|
||||
}
|
||||
}
|
||||
|
@ -777,8 +777,8 @@ void phydm_dig_init(void *dm_void)
|
||||
#ifdef PHYDM_TDMA_DIG_SUPPORT
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
|
||||
dm->original_dig_restore = true;
|
||||
dm->tdma_dig_timer_ms = DIG_TIMER_MS;
|
||||
dm->tdma_dig_state_number = DIG_NUM_OF_TDMA_STATES;
|
||||
dm->tdma_dig_timer_ms = DIG_TIMER_MS;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CFG_DIG_DAMPING_CHK
|
||||
@ -1666,9 +1666,9 @@ void phydm_tdma_dig_timer_check(void *dm_void)
|
||||
dig_t->tdma_dig_cnt == dig_t->pre_tdma_dig_cnt) {
|
||||
if (dm->support_ability & ODM_BB_DIG) {
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
if (dm->support_ic_type &
|
||||
(ODM_RTL8198F | ODM_RTL8814B | ODM_RTL8822B |
|
||||
ODM_RTL8812F)) {
|
||||
if (dm->support_ic_type & (ODM_RTL8198F | ODM_RTL8814B |
|
||||
ODM_RTL8812F | ODM_RTL8822B | ODM_RTL8192F |
|
||||
ODM_RTL8821C)) {
|
||||
PHYDM_DBG(dm, DBG_DIG,
|
||||
"Check fail, Restart timer\n\n");
|
||||
phydm_false_alarm_counter_reset(dm);
|
||||
@ -1676,7 +1676,7 @@ void phydm_tdma_dig_timer_check(void *dm_void)
|
||||
dm->tdma_dig_timer_ms);
|
||||
} else {
|
||||
PHYDM_DBG(dm, DBG_DIG,
|
||||
"Not 98F/14B/12F no SW timer\n");
|
||||
"Not 98F/14B/12F/22B/92F/21C no SW timer\n");
|
||||
}
|
||||
#else
|
||||
/*@if interrupt mask info is got.*/
|
||||
@ -1724,12 +1724,12 @@ void phydm_tdma_dig(void *dm_void)
|
||||
u32 reg_c50 = 0;
|
||||
|
||||
#if (RTL8198F_SUPPORT || RTL8814B_SUPPORT || RTL8812F_SUPPORT ||\
|
||||
RTL8822B_SUPPORT)
|
||||
RTL8822B_SUPPORT || RTL8192F_SUPPORT || RTL8821C_SUPPORT)
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
if (dm->support_ic_type &
|
||||
(ODM_RTL8198F | ODM_RTL8814B | ODM_RTL8812F |
|
||||
ODM_RTL8822B)) {
|
||||
PHYDM_DBG(dm, DBG_DIG, "98F/14B/12F, new tdma\n");
|
||||
(ODM_RTL8198F | ODM_RTL8814B | ODM_RTL8812F | ODM_RTL8822B |
|
||||
ODM_RTL8192F | ODM_RTL8821C)) {
|
||||
PHYDM_DBG(dm, DBG_DIG, "98F/14B/12F/22B/92F/21C, new tdma\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@ -1940,6 +1940,25 @@ void phydm_false_alarm_counter_reset(void *dm_void)
|
||||
dig_t->fa_end_timestamp = timestamp;
|
||||
}
|
||||
|
||||
void phydm_tdma_dig_para_upd(void *dm_void, enum upd_type type, u8 input)
|
||||
{
|
||||
struct dm_struct *dm = (struct dm_struct *)dm_void;
|
||||
|
||||
switch (type) {
|
||||
case ENABLE_TDMA:
|
||||
dm->original_dig_restore = !((boolean)input);
|
||||
break;
|
||||
case MODE_DECISION:
|
||||
if (input == MODE_PERFORMANCE)
|
||||
dm->tdma_dig_state_number = DIG_NUM_OF_TDMA_STATES + 2;
|
||||
else if (input == MODE_COVERAGE)
|
||||
dm->tdma_dig_state_number = DIG_NUM_OF_TDMA_STATES;
|
||||
else
|
||||
dm->tdma_dig_state_number = DIG_NUM_OF_TDMA_STATES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
void phydm_tdma_dig_timers(void *dm_void, u8 state)
|
||||
{
|
||||
@ -2009,24 +2028,6 @@ u8 get_new_igi_bound(struct dm_struct *dm, u8 igi, u32 fa_cnt, u8 *rx_gain_max,
|
||||
#endif
|
||||
#endif
|
||||
PHYDM_DBG(dm, DBG_DIG, "First connect: foce IGI=0x%x\n", igi);
|
||||
} else if (dm->is_linked) {
|
||||
PHYDM_DBG(dm, DBG_DIG, "Adjust IGI @ linked\n");
|
||||
/* @4 Abnormal # beacon case */
|
||||
/*#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
|
||||
*if (dm->phy_dbg_info.num_qry_beacon_pkt < 5 &&
|
||||
*fa_cnt < DM_DIG_FA_TH1 && dm->bsta_state &&
|
||||
*dm->support_ic_type != ODM_RTL8723D) {
|
||||
*rx_gain_min = 0x1c;
|
||||
*igi = *rx_gain_min;
|
||||
*PHYDM_DBG(dm, DBG_DIG, "Beacon_num=%d,force igi=0x%x\n",
|
||||
*dm->phy_dbg_info.num_qry_beacon_pkt, igi);
|
||||
* } else {
|
||||
*igi = phydm_new_igi_by_fa(dm, igi, fa_cnt, step);
|
||||
*}
|
||||
*#else
|
||||
*igi = phydm_new_igi_by_fa(dm, igi, fa_cnt, step);
|
||||
*#endif
|
||||
*/
|
||||
} else {
|
||||
/* @2 Before link */
|
||||
PHYDM_DBG(dm, DBG_DIG, "Adjust IGI before link\n");
|
||||
|
@ -92,6 +92,17 @@ enum phydm_dig_mode {
|
||||
PHYDM_DIG_COVERAGE_MODE = 1,
|
||||
};
|
||||
|
||||
#ifdef PHYDM_TDMA_DIG_SUPPORT
|
||||
enum upd_type {
|
||||
ENABLE_TDMA,
|
||||
MODE_DECISION
|
||||
};
|
||||
|
||||
enum tdma_opmode {
|
||||
MODE_PERFORMANCE = 1,
|
||||
MODE_COVERAGE = 2
|
||||
};
|
||||
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
enum tdma_dig_timer {
|
||||
INIT_TDMA_DIG_TIMMER,
|
||||
@ -105,6 +116,7 @@ enum tdma_dig_state {
|
||||
NORMAL_DIG = 2
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*@--------------------Define Struct-----------------------------------*/
|
||||
#ifdef CFG_DIG_DAMPING_CHK
|
||||
@ -145,7 +157,8 @@ struct phydm_dig_struct {
|
||||
u16 fa_th[3];
|
||||
#if (RTL8822B_SUPPORT || RTL8197F_SUPPORT || RTL8821C_SUPPORT ||\
|
||||
RTL8198F_SUPPORT || RTL8192F_SUPPORT || RTL8195B_SUPPORT ||\
|
||||
RTL8822C_SUPPORT || RTL8814B_SUPPORT || RTL8721D_SUPPORT)
|
||||
RTL8822C_SUPPORT || RTL8814B_SUPPORT || RTL8721D_SUPPORT ||\
|
||||
RTL8812F_SUPPORT || RTL8197G_SUPPORT)
|
||||
u8 rf_gain_idx;
|
||||
u8 agc_table_idx;
|
||||
u8 big_jump_lmt[16];
|
||||
@ -291,6 +304,8 @@ void phydm_false_alarm_counter_acc(void *dm_void, boolean rssi_dump_en);
|
||||
|
||||
void phydm_false_alarm_counter_acc_reset(void *dm_void);
|
||||
|
||||
void phydm_tdma_dig_para_upd(void *dm_void, enum upd_type type, u8 input);
|
||||
|
||||
#ifdef IS_USE_NEW_TDMA
|
||||
void phydm_tdma_dig_timers(void *dm_void, u8 state);
|
||||
|
||||
|
@ -51,12 +51,13 @@
|
||||
|
||||
/*@#define PHYDM_TDMA_DIG_SUPPORT*/
|
||||
|
||||
#if (RTL8822B_SUPPORT)
|
||||
/*#define IS_USE_NEW_TDMA*/
|
||||
#if (RTL8822B_SUPPORT || RTL8192F_SUPPORT || RTL8821C_SUPPORT)
|
||||
#ifdef CONFIG_TDMADIG
|
||||
#define PHYDM_TDMA_DIG_SUPPORT
|
||||
#ifdef PHYDM_TDMA_DIG_SUPPORT
|
||||
#define IS_USE_NEW_TDMA /*new tdma dig test*/
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (RTL8814B_SUPPORT)
|
||||
|
@ -411,6 +411,9 @@ rtw_phydm_cfg_phy_para(
|
||||
#endif
|
||||
|
||||
#if (RTL8192F_SUPPORT == 1)
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
#include "rtl8192f_hal.h"/*need to before rf.h*/
|
||||
#endif
|
||||
#include "rtl8192f/halhwimg8192f_mac.h"
|
||||
#include "rtl8192f/halhwimg8192f_rf.h"
|
||||
#include "rtl8192f/halhwimg8192f_bb.h"
|
||||
@ -422,9 +425,6 @@ rtw_phydm_cfg_phy_para(
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
|
||||
#include "halrf/rtl8192f/halrf_dpk_8192f.h"
|
||||
#endif
|
||||
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
|
||||
#include "rtl8192f_hal.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (RTL8721D_SUPPORT == 1)
|
||||
|
@ -23,12 +23,10 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*Image2HeaderVersion: R3 1.4.5*/
|
||||
/*Image2HeaderVersion: R3 1.5.3*/
|
||||
#include "mp_precomp.h"
|
||||
#include "../phydm_precomp.h"
|
||||
|
||||
#define D_S_SIZE DELTA_SWINGIDX_SIZE
|
||||
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
static boolean
|
||||
check_positive(struct dm_struct *dm,
|
||||
@ -10190,7 +10188,7 @@ odm_read_and_config_mp_8822b_agc_tab(struct dm_struct *dm)
|
||||
u32
|
||||
odm_get_version_mp_8822b_agc_tab(void)
|
||||
{
|
||||
return 112;
|
||||
return 113;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@ -11756,7 +11754,7 @@ odm_read_and_config_mp_8822b_phy_reg(struct dm_struct *dm)
|
||||
u32
|
||||
odm_get_version_mp_8822b_phy_reg(void)
|
||||
{
|
||||
return 112;
|
||||
return 113;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -23,7 +23,7 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*Image2HeaderVersion: R3 1.4.5*/
|
||||
/*Image2HeaderVersion: R3 1.5.3*/
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
#ifndef __INC_MP_BB_HW_IMG_8822B_H
|
||||
#define __INC_MP_BB_HW_IMG_8822B_H
|
||||
|
@ -23,12 +23,10 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*Image2HeaderVersion: R3 1.4.5*/
|
||||
/*Image2HeaderVersion: R3 1.5.3*/
|
||||
#include "mp_precomp.h"
|
||||
#include "../phydm_precomp.h"
|
||||
|
||||
#define D_S_SIZE DELTA_SWINGIDX_SIZE
|
||||
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
static boolean
|
||||
check_positive(struct dm_struct *dm,
|
||||
@ -311,7 +309,7 @@ odm_read_and_config_mp_8822b_mac_reg(struct dm_struct *dm)
|
||||
u32
|
||||
odm_get_version_mp_8822b_mac_reg(void)
|
||||
{
|
||||
return 112;
|
||||
return 113;
|
||||
}
|
||||
|
||||
#endif /* end of HWIMG_SUPPORT*/
|
||||
|
@ -23,7 +23,7 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*Image2HeaderVersion: R3 1.4.5*/
|
||||
/*Image2HeaderVersion: R3 1.5.3*/
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
#ifndef __INC_MP_MAC_HW_IMG_8822B_H
|
||||
#define __INC_MP_MAC_HW_IMG_8822B_H
|
||||
|
@ -23,11 +23,12 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*Image2HeaderVersion: R3 1.4.5*/
|
||||
/*Image2HeaderVersion: R3 1.5.3*/
|
||||
#include "mp_precomp.h"
|
||||
#include "../phydm_precomp.h"
|
||||
|
||||
#define D_S_SIZE DELTA_SWINGIDX_SIZE
|
||||
#define D_ST_SIZE DELTA_SWINTSSI_SIZE
|
||||
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
static boolean
|
||||
@ -4409,6 +4410,29 @@ const u32 array_mp_8822b_radioa[] = {
|
||||
0x03F, 0x00000039,
|
||||
0x033, 0x0000000A,
|
||||
0x03F, 0x0000003C,
|
||||
0x9300000c, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x033, 0x00000000,
|
||||
0x03F, 0x0005142C,
|
||||
0x033, 0x00000001,
|
||||
0x03F, 0x0005144B,
|
||||
0x033, 0x00000002,
|
||||
0x03F, 0x0005144E,
|
||||
0x033, 0x00000003,
|
||||
0x03F, 0x00051C69,
|
||||
0x033, 0x00000004,
|
||||
0x03F, 0x00051C6C,
|
||||
0x033, 0x00000005,
|
||||
0x03F, 0x00051CE8,
|
||||
0x033, 0x00000006,
|
||||
0x03F, 0x00051CEB,
|
||||
0x033, 0x00000007,
|
||||
0x03F, 0x00051CEE,
|
||||
0x033, 0x00000008,
|
||||
0x03F, 0x00051CF1,
|
||||
0x033, 0x00000009,
|
||||
0x03F, 0x00051CF4,
|
||||
0x033, 0x0000000A,
|
||||
0x03F, 0x00051CF7,
|
||||
0x93000012, 0x00000000, 0x40000000, 0x00000000,
|
||||
0x033, 0x00000000,
|
||||
0x03F, 0x00000002,
|
||||
@ -4672,6 +4696,7 @@ const u32 array_mp_8822b_radioa[] = {
|
||||
0x0B0, 0x000FF0FC,
|
||||
0x0C4, 0x00081402,
|
||||
0x0CC, 0x00082000,
|
||||
0x059, 0x00020000,
|
||||
|
||||
};
|
||||
|
||||
@ -4738,7 +4763,7 @@ odm_read_and_config_mp_8822b_radioa(struct dm_struct *dm)
|
||||
u32
|
||||
odm_get_version_mp_8822b_radioa(void)
|
||||
{
|
||||
return 112;
|
||||
return 113;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@ -8631,7 +8656,7 @@ const u32 array_mp_8822b_radiob[] = {
|
||||
0x033, 0x00000004,
|
||||
0x03F, 0x00051CA8,
|
||||
0x033, 0x00000005,
|
||||
0x03F, 0x00051CAB,
|
||||
0x03F, 0x00051CE8,
|
||||
0x033, 0x00000006,
|
||||
0x03F, 0x00051CEB,
|
||||
0x033, 0x00000007,
|
||||
@ -8829,6 +8854,7 @@ const u32 array_mp_8822b_radiob[] = {
|
||||
0x03E, 0x00005934,
|
||||
0x03F, 0x0005AFCF,
|
||||
0x0EF, 0x00000000,
|
||||
0x059, 0x00020000,
|
||||
|
||||
};
|
||||
|
||||
@ -8895,7 +8921,7 @@ odm_read_and_config_mp_8822b_radiob(struct dm_struct *dm)
|
||||
u32
|
||||
odm_get_version_mp_8822b_radiob(void)
|
||||
{
|
||||
return 112;
|
||||
return 113;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@ -16995,8 +17021,8 @@ odm_read_and_config_mp_8822b_txpwr_lmt_type4(struct dm_struct *dm)
|
||||
|
||||
#ifdef CONFIG_8822B_TYPE5
|
||||
const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "01", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "01", "28",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "01", "30",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "01", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "01", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "01", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "01", "34",
|
||||
@ -17004,7 +17030,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "01", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "01", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "02", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "02", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "02", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "02", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "02", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "02", "34",
|
||||
@ -17012,7 +17038,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "02", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "02", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "03", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "03", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "03", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "03", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "03", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "03", "34",
|
||||
@ -17020,7 +17046,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "03", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "03", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "04", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "04", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "04", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "04", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "04", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "04", "34",
|
||||
@ -17028,7 +17054,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "04", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "04", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "05", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "05", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "05", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "05", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "05", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "05", "34",
|
||||
@ -17036,7 +17062,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "05", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "05", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "06", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "06", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "06", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "06", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "06", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "06", "34",
|
||||
@ -17044,7 +17070,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "06", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "06", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "07", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "07", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "07", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "07", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "07", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "07", "34",
|
||||
@ -17052,7 +17078,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "07", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "07", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "08", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "08", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "08", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "08", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "08", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "08", "34",
|
||||
@ -17060,7 +17086,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "08", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "08", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "09", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "09", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "09", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "09", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "09", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "09", "34",
|
||||
@ -17068,31 +17094,31 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "09", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "09", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "10", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "10", "28",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "10", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "10", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "10", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "10", "34",
|
||||
"ACMA", "2.4G", "20M", "CCK", "1T", "10", "28",
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "10", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "10", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "11", "32",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "11", "28",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "11", "30",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "11", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "11", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "11", "32",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "11", "34",
|
||||
"ACMA", "2.4G", "20M", "CCK", "1T", "11", "28",
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "11", "32",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "11", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "12", "26",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "12", "28",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "12", "24",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "12", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "12", "30",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "12", "26",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "12", "34",
|
||||
"ACMA", "2.4G", "20M", "CCK", "1T", "12", "28",
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "12", "26",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "12", "30",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "13", "20",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "13", "28",
|
||||
"FCC", "2.4G", "20M", "CCK", "1T", "13", "18",
|
||||
"ETSI", "2.4G", "20M", "CCK", "1T", "13", "24",
|
||||
"MKK", "2.4G", "20M", "CCK", "1T", "13", "28",
|
||||
"IC", "2.4G", "20M", "CCK", "1T", "13", "20",
|
||||
"KCC", "2.4G", "20M", "CCK", "1T", "13", "34",
|
||||
@ -17108,95 +17134,95 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "CCK", "1T", "14", "63",
|
||||
"UKRAINE", "2.4G", "20M", "CCK", "1T", "14", "63",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "01", "26",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "01", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "01", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "01", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "01", "26",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "01", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "01", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "01", "26",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "01", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "02", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "02", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "02", "28",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "02", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "02", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "02", "30",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "02", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "02", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "02", "30",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "02", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "03", "32",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "03", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "03", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "03", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "03", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "03", "32",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "03", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "03", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "03", "32",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "03", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "04", "34",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "04", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "04", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "04", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "04", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "04", "34",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "04", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "04", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "04", "34",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "04", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "05", "34",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "05", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "05", "32",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "05", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "05", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "05", "34",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "05", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "05", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "05", "34",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "05", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "06", "34",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "06", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "06", "32",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "06", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "06", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "06", "34",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "06", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "06", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "06", "34",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "06", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "07", "34",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "07", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "07", "32",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "07", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "07", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "07", "34",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "07", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "07", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "07", "34",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "07", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "08", "34",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "08", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "08", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "08", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "08", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "08", "34",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "08", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "08", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "08", "34",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "08", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "09", "32",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "09", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "09", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "09", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "09", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "09", "32",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "09", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "09", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "09", "32",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "09", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "10", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "10", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "10", "28",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "10", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "10", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "10", "30",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "10", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "10", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "10", "30",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "10", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "11", "28",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "11", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "11", "26",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "11", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "11", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "11", "28",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "11", "34",
|
||||
"ACMA", "2.4G", "20M", "OFDM", "1T", "11", "30",
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "11", "28",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "11", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "12", "22",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "12", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "12", "20",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "12", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "12", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "12", "22",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "12", "34",
|
||||
@ -17204,7 +17230,7 @@ const char *array_mp_8822b_txpwr_lmt_type5[] = {
|
||||
"CHILE", "2.4G", "20M", "OFDM", "1T", "12", "22",
|
||||
"UKRAINE", "2.4G", "20M", "OFDM", "1T", "12", "30",
|
||||
"FCC", "2.4G", "20M", "OFDM", "1T", "13", "14",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "13", "30",
|
||||
"ETSI", "2.4G", "20M", "OFDM", "1T", "13", "24",
|
||||
"MKK", "2.4G", "20M", "OFDM", "1T", "13", "34",
|
||||
"IC", "2.4G", "20M", "OFDM", "1T", "13", "14",
|
||||
"KCC", "2.4G", "20M", "OFDM", "1T", "13", "34",
|
||||
|
@ -23,7 +23,7 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*Image2HeaderVersion: R3 1.4.5*/
|
||||
/*Image2HeaderVersion: R3 1.5.3*/
|
||||
#if (RTL8822B_SUPPORT == 1)
|
||||
#ifndef __INC_MP_RF_HW_IMG_8822B_H
|
||||
#define __INC_MP_RF_HW_IMG_8822B_H
|
||||
|
@ -2240,9 +2240,6 @@ config_phydm_switch_bandwidth_8822b(struct dm_struct *dm,
|
||||
/* @Modify RX DFIR parameters */
|
||||
phydm_rxdfirpar_by_bw_8822b(dm, bandwidth);
|
||||
|
||||
/* Toggle IGI to let RF enter RX mode */
|
||||
phydm_igi_toggle_8822b(dm);
|
||||
|
||||
/* @Modify CCA parameters */
|
||||
phydm_ccapar_by_rfe_8822b(dm);
|
||||
|
||||
@ -2263,6 +2260,9 @@ config_phydm_switch_bandwidth_8822b(struct dm_struct *dm,
|
||||
odm_set_bb_reg(dm, R_0x808, MASKBYTE0, (dm->rx_ant_status |
|
||||
(dm->rx_ant_status << 4)));
|
||||
|
||||
/* Toggle IGI to let RF enter RX mode */
|
||||
phydm_igi_toggle_8822b(dm);
|
||||
|
||||
PHYDM_DBG(dm, ODM_PHY_CONFIG, "Success\n");
|
||||
return true;
|
||||
}
|
||||
|
@ -29,6 +29,6 @@
|
||||
* You do not need to fill up the version.h anymore,
|
||||
* only the maintenance supervisor fills it before formal release.
|
||||
*/
|
||||
#define RELEASE_DATE_8822B 20181002
|
||||
#define RELEASE_DATE_8822B 20181129
|
||||
#define COMMIT_BY_8822B "BB_Colin"
|
||||
#define RELEASE_VERSION_8822B 112
|
||||
#define RELEASE_VERSION_8822B 113
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,17 +20,17 @@
|
||||
|
||||
#ifdef LOAD_FW_HEADER_FROM_DRIVER
|
||||
#if (defined(CONFIG_AP_WOWLAN) || (DM_ODM_SUPPORT_TYPE & (ODM_AP)))
|
||||
extern u8 array_mp_8822b_fw_ap[104720];
|
||||
extern u8 array_mp_8822b_fw_ap[104872];
|
||||
extern u32 array_length_mp_8822b_fw_ap;
|
||||
#endif
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN)) || (DM_ODM_SUPPORT_TYPE & (ODM_CE))
|
||||
extern u8 array_mp_8822b_fw_hybrid[173880];
|
||||
extern u8 array_mp_8822b_fw_hybrid[174352];
|
||||
extern u32 array_length_mp_8822b_fw_hybrid;
|
||||
extern u8 array_mp_8822b_fw_nic[153152];
|
||||
extern u8 array_mp_8822b_fw_nic[153424];
|
||||
extern u32 array_length_mp_8822b_fw_nic;
|
||||
#ifdef CONFIG_WOWLAN
|
||||
extern u8 array_mp_8822b_fw_wowlan[84448];
|
||||
extern u8 array_mp_8822b_fw_wowlan[85064];
|
||||
extern u32 array_length_mp_8822b_fw_wowlan;
|
||||
#endif /*CONFIG_WOWLAN*/
|
||||
#endif
|
||||
|
@ -65,6 +65,7 @@ enum rx_rpt_type {
|
||||
HT_MPDU_OK,
|
||||
HT_MPDU_FAIL,
|
||||
HT_PPDU,
|
||||
HT_FALSE_ALARM,
|
||||
RX_FULL_DROP, /* 10 */
|
||||
FWFF_FULL_DROP,
|
||||
VHT_SU_MPDU_OK = 16, /* 16 */
|
||||
|
@ -661,6 +661,7 @@ void rtl8822b_c2h_handler_no_io(PADAPTER adapter, u8 *pbuf, u16 length)
|
||||
case C2H_IQK_FINISH:
|
||||
case C2H_MCC:
|
||||
case C2H_BCN_EARLY_RPT:
|
||||
case C2H_LPS_STATUS_RPT:
|
||||
case C2H_EXTEND:
|
||||
/* no I/O, process directly */
|
||||
#ifdef CONFIG_LPS_PWR_TRACKING
|
||||
|
@ -1567,6 +1567,21 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER adapter, u8 enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void clear_macid_drop(struct _ADAPTER *a)
|
||||
{
|
||||
u16 offset;
|
||||
u32 drop;
|
||||
u8 i;
|
||||
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
offset = REG_MACID_DROP0_8822B + (i * 4);
|
||||
drop = rtw_read32(a, offset);
|
||||
if (drop)
|
||||
rtw_write32(a, offset, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void hw_var_set_mlme_join(PADAPTER adapter, u8 type)
|
||||
{
|
||||
u8 val8;
|
||||
@ -1681,6 +1696,10 @@ static void hw_var_set_mlme_join(PADAPTER adapter, u8 type)
|
||||
val16 = BIT_LRL_8822B(RetryLimit) | BIT_SRL_8822B(RetryLimit);
|
||||
rtw_write16(adapter, REG_RETRY_LIMIT_8822B, val16);
|
||||
#endif /* !CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if (type == 0)
|
||||
/* Clear macid drop to avoid lost data frame */
|
||||
clear_macid_drop(adapter);
|
||||
}
|
||||
|
||||
static void hw_var_set_acm_ctrl(PADAPTER adapter, u8 ctrl)
|
||||
|
@ -529,6 +529,9 @@ void rtl8822b_phy_haldm_watchdog(PADAPTER adapter)
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
|
||||
u8 lps_changed = _FALSE;
|
||||
u8 in_lps = _FALSE;
|
||||
PADAPTER current_lps_iface = NULL, iface = NULL;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
u8 i = 0;
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
/* for MP power tracking */
|
||||
@ -570,9 +573,16 @@ void rtl8822b_phy_haldm_watchdog(PADAPTER adapter)
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
if (pwrpriv->bLeisurePs && bFwCurrentInPSMode && pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
|
||||
|
||||
for (i = 0; i < dvobj->iface_nums; i++) {
|
||||
iface = dvobj->padapters[i];
|
||||
if (pwrpriv->current_lps_hw_port_id == rtw_hal_get_port(iface))
|
||||
current_lps_iface = iface;
|
||||
}
|
||||
|
||||
lps_changed = _TRUE;
|
||||
in_lps = _TRUE;
|
||||
LPS_Leave(adapter, "LPS_CTRL_PHYDM");
|
||||
LPS_Leave(current_lps_iface, "LPS_CTRL_PHYDM");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -580,7 +590,7 @@ void rtl8822b_phy_haldm_watchdog(PADAPTER adapter)
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
if (lps_changed)
|
||||
LPS_Enter(adapter, "LPS_CTRL_PHYDM");
|
||||
LPS_Enter(current_lps_iface, "LPS_CTRL_PHYDM");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -547,6 +547,8 @@ u64 rtw_hal_get_tsftr_by_port(_adapter *adapter, u8 port);
|
||||
s32 rtw_hal_set_wifi_btc_port_id_cmd(_adapter *adapter);
|
||||
#endif
|
||||
|
||||
void rtw_lps_state_chk(_adapter *adapter, u8 ps_mode);
|
||||
|
||||
#ifdef CONFIG_GPIO_API
|
||||
u8 rtw_hal_get_gpio(_adapter *adapter, u8 gpio_num);
|
||||
int rtw_hal_set_gpio_output_value(_adapter *adapter, u8 gpio_num, bool isHigh);
|
||||
@ -633,6 +635,13 @@ void rtw_wow_pattern_read_cam_ent(_adapter *adapter, u8 id, struct rtl_wow_patt
|
||||
void rtw_dump_wow_pattern(void *sel, struct rtl_wow_pattern *pwow_pattern, u8 idx);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PNO_SUPPORT
|
||||
struct pno_ssid;
|
||||
void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
|
||||
u32 *pLength, struct pno_ssid *ssid);
|
||||
#endif
|
||||
|
||||
|
||||
struct rtw_ndp_info {
|
||||
u8 enable:1;
|
||||
u8 check_remote_ip:1; /* Need to Check Sender IP or not */
|
||||
|
@ -110,6 +110,7 @@ enum h2c_cmd {
|
||||
H2C_AOAC_RSVDPAGE3 = 0x88,
|
||||
H2C_P2P_OFFLOAD_RSVD_PAGE = 0x8A,
|
||||
H2C_P2P_OFFLOAD = 0x8B,
|
||||
H2C_NLO_INFO = 0x8C, /* for 3081 Chip*/
|
||||
#ifdef CONFIG_FW_HANDLE_TXBCN
|
||||
H2C_FW_BCN_OFFLOAD = 0xBA,
|
||||
#endif
|
||||
@ -187,6 +188,8 @@ enum h2c_cmd {
|
||||
|
||||
#define H2C_SINGLE_CHANNELSWITCH_V2_LEN 2
|
||||
|
||||
#define H2C_NLO_INFO_LEN 2
|
||||
|
||||
#define eq_mac_addr(a, b) (((a)[0] == (b)[0] && (a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && (a)[4] == (b)[4] && (a)[5] == (b)[5]) ? 1 : 0)
|
||||
#define cp_mac_addr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], (des)[2] = (src)[2], (des)[3] = (src)[3], (des)[4] = (src)[4], (des)[5] = (src)[5])
|
||||
#define cpIpAddr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], (des)[2] = (src)[2], (des)[3] = (src)[3])
|
||||
@ -539,6 +542,11 @@ s32 rtw_hal_customer_str_write(_adapter *adapter, const u8 *cs);
|
||||
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_PROBE_PACKET(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
|
||||
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SCAN_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 8, __Value)
|
||||
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SSID_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
|
||||
|
||||
/* NLO SCAN offload for 8822B/8814A/8821C */
|
||||
#define SET_H2CCMD_NLO_FUN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 0, 1, __Value)
|
||||
#define SET_H2CCMD_NLO_PS_32K(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 1, 1, __Value)
|
||||
#define SET_H2CCMD_NLO_LOC_NLO_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
|
||||
#ifdef CONFIG_P2P_WOWLAN
|
||||
|
@ -256,6 +256,9 @@
|
||||
#define CONFIG_P2P_PS_NOA_USE_MACID_SLEEP
|
||||
#endif
|
||||
#define CONFIG_RTS_FULL_BW
|
||||
#ifdef CONFIG_LPS
|
||||
#define CONFIG_LPS_ACK
|
||||
#endif
|
||||
#endif /* CONFIG_RTL8822B */
|
||||
|
||||
#ifdef CONFIG_RTL8821C
|
||||
|
@ -142,8 +142,6 @@ extern u8 WPA_CIPHER_SUITE_WEP104[];
|
||||
#define RSN_SELECTOR_LEN 4
|
||||
|
||||
extern u16 RSN_VERSION_BSD;
|
||||
extern u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X[];
|
||||
extern u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X[];
|
||||
extern u8 RSN_CIPHER_SUITE_NONE[];
|
||||
extern u8 RSN_CIPHER_SUITE_WEP40[];
|
||||
extern u8 RSN_CIPHER_SUITE_TKIP[];
|
||||
@ -151,6 +149,39 @@ extern u8 RSN_CIPHER_SUITE_WRAP[];
|
||||
extern u8 RSN_CIPHER_SUITE_CCMP[];
|
||||
extern u8 RSN_CIPHER_SUITE_WEP104[];
|
||||
|
||||
/* AKM suite type */
|
||||
extern u8 WLAN_AKM_8021X[];
|
||||
extern u8 WLAN_AKM_PSK[];
|
||||
extern u8 WLAN_AKM_FT_8021X[];
|
||||
extern u8 WLAN_AKM_FT_PSK[];
|
||||
extern u8 WLAN_AKM_8021X_SHA256[];
|
||||
extern u8 WLAN_AKM_PSK_SHA256[];
|
||||
extern u8 WLAN_AKM_TDLS[];
|
||||
extern u8 WLAN_AKM_SAE[];
|
||||
extern u8 WLAN_AKM_FT_OVER_SAE[];
|
||||
extern u8 WLAN_AKM_8021X_SUITE_B[];
|
||||
extern u8 WLAN_AKM_8021X_SUITE_B_192[];
|
||||
extern u8 WLAN_AKM_FILS_SHA256[];
|
||||
extern u8 WLAN_AKM_FILS_SHA384[];
|
||||
extern u8 WLAN_AKM_FT_FILS_SHA256[];
|
||||
extern u8 WLAN_AKM_FT_FILS_SHA384[];
|
||||
|
||||
#define WLAN_AKM_TYPE_8021X BIT(0)
|
||||
#define WLAN_AKM_TYPE_PSK BIT(1)
|
||||
#define WLAN_AKM_TYPE_FT_8021X BIT(2)
|
||||
#define WLAN_AKM_TYPE_FT_PSK BIT(3)
|
||||
#define WLAN_AKM_TYPE_8021X_SHA256 BIT(4)
|
||||
#define WLAN_AKM_TYPE_PSK_SHA256 BIT(5)
|
||||
#define WLAN_AKM_TYPE_TDLS BIT(6)
|
||||
#define WLAN_AKM_TYPE_SAE BIT(7)
|
||||
#define WLAN_AKM_TYPE_FT_OVER_SAE BIT(8)
|
||||
#define WLAN_AKM_TYPE_8021X_SUITE_B BIT(9)
|
||||
#define WLAN_AKM_TYPE_8021X_SUITE_B_192 BIT(10)
|
||||
#define WLAN_AKM_TYPE_FILS_SHA256 BIT(11)
|
||||
#define WLAN_AKM_TYPE_FILS_SHA384 BIT(12)
|
||||
#define WLAN_AKM_TYPE_FT_FILS_SHA256 BIT(13)
|
||||
#define WLAN_AKM_TYPE_FT_FILS_SHA384 BIT(14)
|
||||
|
||||
/* IEEE 802.11i */
|
||||
#define PMKID_LEN 16
|
||||
#define PMK_LEN 32
|
||||
@ -665,6 +696,7 @@ struct ieee80211_snap_hdr {
|
||||
/* Authentication algorithms */
|
||||
#define WLAN_AUTH_OPEN 0
|
||||
#define WLAN_AUTH_SHARED_KEY 1
|
||||
#define WLAN_AUTH_SAE 3
|
||||
|
||||
#define WLAN_AUTH_CHALLENGE_LEN 128
|
||||
|
||||
@ -2070,8 +2102,8 @@ unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit);
|
||||
int rtw_get_wpa_cipher_suite(u8 *s);
|
||||
int rtw_get_wpa2_cipher_suite(u8 *s);
|
||||
int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len);
|
||||
int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
|
||||
int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x, u8 *mfp_opt);
|
||||
int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, u32 *akm);
|
||||
int rtw_parse_wpa2_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, u32 *akm, u8 *mfp_opt);
|
||||
|
||||
int rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, u16 *wpa_len);
|
||||
|
||||
@ -2147,8 +2179,6 @@ uint rtw_is_cckratesonly_included(u8 *rate);
|
||||
uint rtw_get_cckrate_size(u8 *rate,u32 rate_length);
|
||||
int rtw_check_network_type(unsigned char *rate, int ratelen, int channel);
|
||||
|
||||
void rtw_get_bcn_info(struct wlan_network *pnetwork);
|
||||
|
||||
u8 rtw_check_invalid_mac_address(u8 *mac_addr, u8 check_local_bit);
|
||||
void rtw_macaddr_cfg(u8 *out, const u8 *hw_mac_addr);
|
||||
|
||||
|
@ -64,6 +64,8 @@
|
||||
#define BIT(x) (1 << (x))
|
||||
#endif
|
||||
|
||||
#define CHECK_BIT(a, b) (!!((a) & (b)))
|
||||
|
||||
#define BIT0 0x00000001
|
||||
#define BIT1 0x00000002
|
||||
#define BIT2 0x00000004
|
||||
|
@ -71,6 +71,7 @@ enum ANDROID_WIFI_CMD {
|
||||
#endif /* CONFIG_GTK_OL */
|
||||
ANDROID_WIFI_CMD_P2P_DISABLE,
|
||||
ANDROID_WIFI_CMD_SET_AEK,
|
||||
ANDROID_WIFI_CMD_EXT_AUTH_STATUS,
|
||||
ANDROID_WIFI_CMD_DRIVERVERSION,
|
||||
ANDROID_WIFI_CMD_MAX
|
||||
};
|
||||
|
@ -529,13 +529,16 @@ enum {
|
||||
struct beacon_keys {
|
||||
u8 ssid[IW_ESSID_MAX_SIZE];
|
||||
u32 ssid_len;
|
||||
u8 bcn_channel;
|
||||
u16 ht_cap_info;
|
||||
u8 ht_info_infos_0_sco; /* bit0 & bit1 in infos[0] is second channel offset */
|
||||
u8 ch;
|
||||
u8 bw;
|
||||
u8 offset;
|
||||
u8 proto_cap; /* PROTO_CAP_XXX */
|
||||
u8 rate_set[12];
|
||||
u8 rate_num;
|
||||
int encryp_protocol;
|
||||
int pairwise_cipher;
|
||||
int group_cipher;
|
||||
int is_8021x;
|
||||
u32 akm;
|
||||
};
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
#define RTW_FT_ACTION_REQ_LMT 4
|
||||
@ -1203,6 +1206,9 @@ void rtw_scan_abort_no_wait(_adapter *adapter);
|
||||
void rtw_scan_abort(_adapter *adapter);
|
||||
u32 rtw_join_abort_timeout(_adapter *adapter, u32 timeout_ms);
|
||||
|
||||
int rtw_cached_pmkid(_adapter *Adapter, u8 *bssid);
|
||||
int rtw_rsn_sync_pmkid(_adapter *adapter, u8 *ie, uint ie_len, int i_ent);
|
||||
|
||||
extern int rtw_restruct_sec_ie(_adapter *adapter, u8 *out_ie);
|
||||
#ifdef CONFIG_WMMPS_STA
|
||||
void rtw_uapsd_use_default_setting(_adapter *padapter);
|
||||
|
@ -276,6 +276,10 @@ enum TDLS_option {
|
||||
|
||||
#endif /* CONFIG_TDLS */
|
||||
|
||||
#ifndef NL80211_AUTHTYPE_SAE
|
||||
#define NL80211_AUTHTYPE_SAE 4
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Usage:
|
||||
* When one iface acted as AP mode and the other iface is STA mode and scanning,
|
||||
@ -679,6 +683,8 @@ void change_band_update_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 ch);
|
||||
|
||||
void Set_MSR(_adapter *padapter, u8 type);
|
||||
|
||||
void rtw_set_external_auth_status(_adapter *padapter, const void *data, int len);
|
||||
|
||||
u8 rtw_get_oper_ch(_adapter *adapter);
|
||||
void rtw_set_oper_ch(_adapter *adapter, u8 ch);
|
||||
u8 rtw_get_oper_bw(_adapter *adapter);
|
||||
@ -765,7 +771,7 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe
|
||||
int rtw_get_bcn_keys(ADAPTER *Adapter, u8 *pframe, u32 packet_len,
|
||||
struct beacon_keys *recv_beacon);
|
||||
int validate_beacon_len(u8 *pframe, uint len);
|
||||
void rtw_dump_bcn_keys(struct beacon_keys *recv_beacon);
|
||||
void rtw_dump_bcn_keys(void *sel, struct beacon_keys *recv_beacon);
|
||||
int rtw_check_bcn_info(ADAPTER *Adapter, u8 *pframe, u32 packet_len);
|
||||
void update_beacon_info(_adapter *padapter, u8 *pframe, uint len, struct sta_info *psta);
|
||||
#ifdef CONFIG_DFS
|
||||
@ -1110,6 +1116,8 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf);
|
||||
u8 run_in_thread_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 rtw_getmacreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
|
||||
int rtw_sae_preprocess(_adapter *adapter, const u8 *buf, u32 len, u8 tx);
|
||||
|
||||
#define GEN_DRV_CMD_HANDLER(size, cmd) {size, &cmd ## _hdl},
|
||||
#define GEN_MLME_EXT_HANDLER(size, cmd) {size, cmd},
|
||||
|
||||
|
@ -488,6 +488,11 @@ struct pwrctrl_priv {
|
||||
u32 rx_time;
|
||||
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
|
||||
|
||||
#ifdef CONFIG_LPS_ACK
|
||||
struct submit_ctx lps_ack_sctx;
|
||||
s8 lps_ack_status;
|
||||
_mutex lps_ack_mutex;
|
||||
#endif /* CONFIG_LPS_ACK */
|
||||
};
|
||||
|
||||
#define rtw_get_ips_mode_req(pwrctl) \
|
||||
@ -523,6 +528,7 @@ extern s32 rtw_register_evt_alive(PADAPTER padapter);
|
||||
extern void rtw_unregister_evt_alive(PADAPTER padapter);
|
||||
extern void cpwm_int_hdl(PADAPTER padapter, struct reportpwrstate_parm *preportpwrstate);
|
||||
extern void LPS_Leave_check(PADAPTER padapter);
|
||||
void rtw_set_fw_config_32k(PADAPTER, u8);
|
||||
#endif
|
||||
|
||||
extern void LeaveAllPowerSaveMode(PADAPTER Adapter);
|
||||
|
@ -176,6 +176,9 @@ struct security_priv {
|
||||
u8 bcheck_grpkey;
|
||||
u8 bgrpkey_handshake;
|
||||
|
||||
u8 auth_alg;
|
||||
u8 auth_type;
|
||||
u8 extauth_status;
|
||||
/* u8 packet_cnt; */ /* unused, removed */
|
||||
|
||||
s32 sw_encrypt;/* from registry_priv */
|
||||
@ -494,4 +497,10 @@ u8 rtw_handle_tkip_countermeasure(_adapter *adapter, const char *caller);
|
||||
u16 rtw_calc_crc(u8 *pdata, int length);
|
||||
#endif /*CONFIG_WOWLAN*/
|
||||
|
||||
#define rtw_sec_chk_auth_alg(a, s) \
|
||||
((a)->securitypriv.auth_alg == (s))
|
||||
|
||||
#define rtw_sec_chk_auth_type(a, s) \
|
||||
((a)->securitypriv.auth_type == (s))
|
||||
|
||||
#endif /* __RTL871X_SECURITY_H_ */
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define DRIVERVERSION "v5.6.1_30362.20181109_COEX20180928-6a6a"
|
||||
#define DRIVERVERSION "v5.6.1.5_33902.20190604_COEX20180928-6a6a"
|
||||
#define BTCOEXVERSION "COEX20180928-6a6a"
|
||||
|
@ -401,6 +401,8 @@ struct sta_info {
|
||||
int wpa_pairwise_cipher;
|
||||
int wpa2_pairwise_cipher;
|
||||
|
||||
u32 akm_suite_type;
|
||||
|
||||
u8 bpairwise_key_installed;
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
u8 ft_pairwise_key_installed;
|
||||
@ -478,6 +480,8 @@ struct sta_info {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
u8 *pauth_frame;
|
||||
u32 auth_len;
|
||||
u8 *passoc_req;
|
||||
u32 assoc_req_len;
|
||||
#endif
|
||||
|
@ -1034,9 +1034,7 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
* According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2)
|
||||
*/
|
||||
#define IEEE80211_MIN_AMPDU_BUF 0x8
|
||||
#ifndef IEEE80211_MAX_AMPDU_BUF
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
#endif
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
|
||||
|
||||
/* Spatial Multiplexing Power Save Modes */
|
||||
|
@ -627,7 +627,6 @@ struct wlan_network {
|
||||
int aid; /* will only be valid when a BSS is joinned. */
|
||||
int join_res;
|
||||
WLAN_BSSID_EX network; /* must be the last item */
|
||||
WLAN_BCN_INFO BcnInfo;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
unsigned char iebuf[MAX_IE_SZ];
|
||||
#endif
|
||||
|
338
os_dep/linux/ioctl_cfg80211.c
Normal file → Executable file
338
os_dep/linux/ioctl_cfg80211.c
Normal file → Executable file
@ -407,6 +407,23 @@ static void rtw_get_chbw_from_cfg80211_chan_def(struct cfg80211_chan_def *chdef,
|
||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) */
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0))
|
||||
bool rtw_cfg80211_allow_ch_switch_notify(_adapter *adapter)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0))
|
||||
if ((!MLME_IS_AP(adapter))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
&& (!MLME_IS_ADHOC(adapter))
|
||||
&& (!MLME_IS_ADHOC_MASTER(adapter))
|
||||
&& (!MLME_IS_MESH(adapter))
|
||||
#elif defined(CONFIG_RTW_MESH)
|
||||
&& (!MLME_IS_MESH(adapter))
|
||||
#endif
|
||||
)
|
||||
return 0;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 ht)
|
||||
{
|
||||
struct wiphy *wiphy = adapter_to_wiphy(adapter);
|
||||
@ -415,6 +432,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
struct cfg80211_chan_def chdef;
|
||||
|
||||
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
|
||||
goto exit;
|
||||
|
||||
ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);
|
||||
if (ret != _SUCCESS)
|
||||
goto exit;
|
||||
@ -425,6 +445,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
|
||||
int freq = rtw_ch2freq(ch);
|
||||
enum nl80211_channel_type ctype;
|
||||
|
||||
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
|
||||
goto exit;
|
||||
|
||||
if (!freq) {
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
@ -537,6 +560,7 @@ static const struct ieee80211_txrx_stypes
|
||||
[NL80211_IFTYPE_STATION] = {
|
||||
.tx = 0xffff,
|
||||
.rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
|
||||
BIT(IEEE80211_STYPE_AUTH >> 4) |
|
||||
BIT(IEEE80211_STYPE_PROBE_REQ >> 4)
|
||||
},
|
||||
[NL80211_IFTYPE_AP] = {
|
||||
@ -688,11 +712,7 @@ static int rtw_cfg80211_sync_iftype(_adapter *adapter)
|
||||
|
||||
static u64 rtw_get_systime_us(void)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
|
||||
struct timespec ts;
|
||||
getboottime(&ts);
|
||||
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||
struct timespec ts;
|
||||
get_monotonic_boottime(&ts);
|
||||
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
|
||||
@ -3265,6 +3285,7 @@ static int rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv,
|
||||
{
|
||||
RTW_INFO("%s, nl80211_auth_type=%d\n", __func__, sme_auth_type);
|
||||
|
||||
psecuritypriv->auth_type = sme_auth_type;
|
||||
|
||||
switch (sme_auth_type) {
|
||||
case NL80211_AUTHTYPE_AUTOMATIC:
|
||||
@ -3292,6 +3313,9 @@ static int rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv,
|
||||
psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled;
|
||||
|
||||
|
||||
break;
|
||||
case NL80211_AUTHTYPE_SAE:
|
||||
psecuritypriv->auth_alg = WLAN_AUTH_SAE;
|
||||
break;
|
||||
default:
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
|
||||
@ -3760,6 +3784,38 @@ static int _rtw_disconnect(struct wiphy *wiphy, struct net_device *ndev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (KERNEL_VERSION(4, 17, 0) > LINUX_VERSION_CODE)
|
||||
static bool rtw_check_connect_sae_compat(struct cfg80211_connect_params *sme)
|
||||
{
|
||||
struct rtw_ieee802_11_elems elems;
|
||||
struct rsne_info info;
|
||||
u8 AKM_SUITE_SAE[] = { 0x00, 0x0f, 0xac, 8 };
|
||||
int i;
|
||||
|
||||
if (sme->auth_type != 1)
|
||||
return false;
|
||||
|
||||
if (rtw_ieee802_11_parse_elems((u8 *)sme->ie, sme->ie_len, &elems, 0)
|
||||
== ParseFailed)
|
||||
return false;
|
||||
|
||||
if (!elems.rsn_ie)
|
||||
return false;
|
||||
|
||||
if (rtw_rsne_info_parse(elems.rsn_ie - 2, elems.rsn_ie_len + 2, &info) == _FAIL)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < info.akm_cnt; i++)
|
||||
if (memcmp(info.akm_list + i * RSN_SELECTOR_LEN,
|
||||
AKM_SUITE_SAE, RSN_SELECTOR_LEN) == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
#define rtw_check_connect_sae_compat(sme) false
|
||||
#endif
|
||||
|
||||
static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_connect_params *sme)
|
||||
{
|
||||
@ -3782,6 +3838,11 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||
RTW_INFO("privacy=%d, key=%p, key_len=%d, key_idx=%d, auth_type=%d\n",
|
||||
sme->privacy, sme->key, sme->key_len, sme->key_idx, sme->auth_type);
|
||||
|
||||
if (rtw_check_connect_sae_compat(sme)) {
|
||||
sme->auth_type = NL80211_AUTHTYPE_SAE;
|
||||
RTW_INFO("%s set sme->auth_type=4 for SAE compat\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (pwdev_priv->block == _TRUE) {
|
||||
ret = -EBUSY;
|
||||
RTW_INFO("%s wdev_priv.block is set\n", __FUNCTION__);
|
||||
@ -3852,6 +3913,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||
psecuritypriv->dot118021XGrpPrivacy = _NO_PRIVACY_;
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; /* open system */
|
||||
psecuritypriv->ndisauthtype = Ndis802_11AuthModeOpen;
|
||||
psecuritypriv->auth_alg = WLAN_AUTH_OPEN;
|
||||
psecuritypriv->extauth_status = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
padapter->wapiInfo.bWapiEnable = false;
|
||||
@ -4118,36 +4181,20 @@ static int cfg80211_rtw_set_power_mgmt(struct wiphy *wiphy,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
struct cfg80211_pmksa *pmksa)
|
||||
static void _rtw_set_pmksa(struct net_device *ndev,
|
||||
u8 *bssid, u8 *pmkid)
|
||||
{
|
||||
u8 index, blInserted = _FALSE;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||
struct mlme_priv *mlme = &padapter->mlmepriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT" "MAC_FMT" "KEY_FMT"\n", FUNC_NDEV_ARG(ndev)
|
||||
, MAC_ARG(pmksa->bssid), KEY_ARG(pmksa->pmkid));
|
||||
|
||||
if (_rtw_memcmp((u8 *)pmksa->bssid, strZeroMacAddress, ETH_ALEN) == _TRUE)
|
||||
return -EINVAL;
|
||||
|
||||
if (check_fwstate(mlme, _FW_LINKED) == _FALSE) {
|
||||
RTW_INFO(FUNC_NDEV_FMT" not set pmksa cause not in linked state\n", FUNC_NDEV_ARG(ndev));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
blInserted = _FALSE;
|
||||
u8 index, blInserted = _FALSE;
|
||||
|
||||
/* overwrite PMKID */
|
||||
for (index = 0 ; index < NUM_PMKID_CACHE; index++) {
|
||||
if (_rtw_memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN) == _TRUE) {
|
||||
if (_rtw_memcmp(psecuritypriv->PMKIDList[index].Bssid, bssid, ETH_ALEN) == _TRUE) {
|
||||
/* BSSID is matched, the same AP => rewrite with new PMKID. */
|
||||
RTW_INFO(FUNC_NDEV_FMT" BSSID exists in the PMKList.\n", FUNC_NDEV_ARG(ndev));
|
||||
RTW_INFO("BSSID("MAC_FMT") exists in the PMKList.\n", MAC_ARG(bssid));
|
||||
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[index].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN);
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[index].PMKID, pmkid, WLAN_PMKID_LEN);
|
||||
psecuritypriv->PMKIDList[index].bUsed = _TRUE;
|
||||
psecuritypriv->PMKIDIndex = index + 1;
|
||||
blInserted = _TRUE;
|
||||
@ -4157,17 +4204,48 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
||||
|
||||
if (!blInserted) {
|
||||
/* Find a new entry */
|
||||
RTW_INFO(FUNC_NDEV_FMT" Use the new entry index = %d for this PMKID.\n",
|
||||
FUNC_NDEV_ARG(ndev), psecuritypriv->PMKIDIndex);
|
||||
RTW_INFO("Use the new entry index = %d for this PMKID.\n",
|
||||
psecuritypriv->PMKIDIndex);
|
||||
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, (u8 *)pmksa->bssid, ETH_ALEN);
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, (u8 *)pmksa->pmkid, WLAN_PMKID_LEN);
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, bssid, ETH_ALEN);
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmkid, WLAN_PMKID_LEN);
|
||||
|
||||
psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE;
|
||||
psecuritypriv->PMKIDIndex++ ;
|
||||
if (psecuritypriv->PMKIDIndex == 16)
|
||||
psecuritypriv->PMKIDIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
struct cfg80211_pmksa *pmksa)
|
||||
{
|
||||
u8 index, blInserted = _FALSE;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||
struct mlme_priv *mlme = &padapter->mlmepriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
|
||||
bool sae_auth = rtw_sec_chk_auth_type(padapter, NL80211_AUTHTYPE_SAE);
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT" "MAC_FMT" "KEY_FMT"\n", FUNC_NDEV_ARG(ndev)
|
||||
, MAC_ARG(pmksa->bssid), KEY_ARG(pmksa->pmkid));
|
||||
|
||||
if (_rtw_memcmp((u8 *)pmksa->bssid, strZeroMacAddress, ETH_ALEN) == _TRUE)
|
||||
return -EINVAL;
|
||||
|
||||
if (check_fwstate(mlme, _FW_LINKED) == _FALSE && !sae_auth) {
|
||||
RTW_INFO(FUNC_NDEV_FMT" not set pmksa cause not in linked state\n", FUNC_NDEV_ARG(ndev));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
_rtw_set_pmksa(ndev, (u8 *)pmksa->bssid, (u8 *)pmksa->pmkid);
|
||||
|
||||
if (sae_auth &&
|
||||
(psecuritypriv->extauth_status == WLAN_STATUS_SUCCESS)) {
|
||||
RTW_PRINT("SAE: auth success, start assoc\n");
|
||||
start_clnt_assoc(padapter);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -4923,6 +5001,14 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
|
||||
ret = -ENOTSUPP;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/*
|
||||
Kernel < v5.1, the auth_type set as NL80211_AUTHTYPE_AUTOMATIC.
|
||||
if the AKM SAE in the RSN IE, we have to update the auth_type for SAE
|
||||
in rtw_check_beacon_data().
|
||||
*/
|
||||
rtw_cfg80211_set_auth_type(&adapter->securitypriv, settings->auth_type);
|
||||
|
||||
rtw_mi_scan_abort(adapter, _TRUE);
|
||||
rtw_mi_buddy_set_scan_deny(adapter, 300);
|
||||
ret = rtw_add_beacon(adapter, settings->beacon.head, settings->beacon.head_len,
|
||||
@ -6172,10 +6258,7 @@ void rtw_cfg80211_rx_mframe(_adapter *adapter, union recv_frame *rframe, const c
|
||||
#endif
|
||||
|
||||
RTW_INFO("RTW_Rx:ch=%d(%d), ta="MAC_FMT"\n", ch, sch, MAC_ARG(get_addr2_ptr(frame)));
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
if (!rtw_sae_check_frames(adapter, frame, frame_len, _FALSE))
|
||||
#endif
|
||||
{
|
||||
if (!rtw_sae_preprocess(adapter, frame, frame_len, _FALSE)) {
|
||||
if (msg)
|
||||
RTW_INFO("RTW_Rx:%s\n", msg);
|
||||
else
|
||||
@ -6447,6 +6530,54 @@ static s32 cfg80211_rtw_update_ft_ies(struct wiphy *wiphy,
|
||||
}
|
||||
#endif
|
||||
|
||||
void rtw_cfg80211_external_auth_request(_adapter *padapter, union recv_frame *rframe)
|
||||
{
|
||||
struct rtw_external_auth_params params;
|
||||
struct wireless_dev *wdev = padapter->rtw_wdev;
|
||||
struct net_device *netdev = wdev_to_ndev(wdev);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
u8 frame[256] = { 0 };
|
||||
uint frame_len = 24;
|
||||
s32 freq = 0;
|
||||
|
||||
/* rframe, in this case is null point */
|
||||
|
||||
freq = rtw_ch2freq(pmlmeext->cur_channel);
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
RTW_INFO(FUNC_ADPT_FMT": freq(%d, %d)\n", FUNC_ADPT_ARG(padapter), freq);
|
||||
#endif
|
||||
|
||||
#if (KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE)
|
||||
params.action = EXTERNAL_AUTH_START;
|
||||
_rtw_memcpy(params.bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
||||
params.ssid.ssid_len = pmlmeinfo->network.Ssid.SsidLength;
|
||||
_rtw_memcpy(params.ssid.ssid, pmlmeinfo->network.Ssid.Ssid,
|
||||
pmlmeinfo->network.Ssid.SsidLength);
|
||||
params.key_mgmt_suite = 0x8ac0f00;
|
||||
|
||||
cfg80211_external_auth_request(netdev,
|
||||
(struct cfg80211_external_auth_params *)¶ms, GFP_ATOMIC);
|
||||
#elif (KERNEL_VERSION(2, 6, 37) <= LINUX_VERSION_CODE)
|
||||
set_frame_sub_type(frame, WIFI_AUTH);
|
||||
|
||||
_rtw_memcpy(frame + 4, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
||||
_rtw_memcpy(frame + 10, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
_rtw_memcpy(frame + 16, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
||||
RTW_PUT_LE32((frame + 18), 0x8ac0f00);
|
||||
|
||||
if (pmlmeinfo->network.Ssid.SsidLength) {
|
||||
*(frame + 23) = pmlmeinfo->network.Ssid.SsidLength;
|
||||
_rtw_memcpy(frame + 24, pmlmeinfo->network.Ssid.Ssid,
|
||||
pmlmeinfo->network.Ssid.SsidLength);
|
||||
frame_len = 24 + pmlmeinfo->network.Ssid.SsidLength;
|
||||
}
|
||||
rtw_cfg80211_rx_mgmt(wdev, freq, 0, frame, frame_len, GFP_ATOMIC);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_cfg80211_set_is_roch(_adapter *adapter, bool val)
|
||||
{
|
||||
adapter->cfg80211_wdinfo.is_ro_ch = val;
|
||||
@ -7193,15 +7324,19 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
|
||||
wait_ack = 0;
|
||||
goto dump;
|
||||
}
|
||||
#ifdef CONFIG_RTW_MESH
|
||||
else if (frame_styp == RTW_IEEE80211_STYPE_AUTH) {
|
||||
int retval = 0;
|
||||
|
||||
RTW_INFO("RTW_Tx:tx_ch=%d, no_cck=%u, da="MAC_FMT"\n", tx_ch, no_cck, MAC_ARG(GetAddr1Ptr(buf)));
|
||||
if (!rtw_sae_check_frames(padapter, buf, len, _TRUE))
|
||||
|
||||
retval = rtw_sae_preprocess(padapter, buf, len, _TRUE);
|
||||
if (retval == 2)
|
||||
goto exit;
|
||||
if (retval == 0)
|
||||
RTW_INFO("RTW_Tx:AUTH\n");
|
||||
dump_limit = 1;
|
||||
goto dump;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" frame_control:0x%02x\n", FUNC_ADPT_ARG(padapter),
|
||||
@ -7347,16 +7482,27 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||
frame_type, reg);
|
||||
#endif
|
||||
|
||||
/* Wait QC Verify */
|
||||
return;
|
||||
|
||||
switch (frame_type) {
|
||||
case IEEE80211_STYPE_AUTH: /* 0x00B0 */
|
||||
if (reg > 0)
|
||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH, reg);
|
||||
else
|
||||
CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_AUTH, reg);
|
||||
break;
|
||||
#ifdef not_yet
|
||||
case IEEE80211_STYPE_PROBE_REQ: /* 0x0040 */
|
||||
if (reg > 0)
|
||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
|
||||
else
|
||||
CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, reg);
|
||||
break;
|
||||
case IEEE80211_STYPE_ACTION: /* 0x00D0 */
|
||||
if (reg > 0)
|
||||
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION, reg);
|
||||
else
|
||||
CLR_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_ACTION, reg);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -8594,8 +8740,13 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
static int cfg80211_rtw_sched_scan_stop(struct wiphy *wiphy,
|
||||
struct net_device *dev, u64 reqid)
|
||||
#else
|
||||
static int cfg80211_rtw_sched_scan_stop(struct wiphy *wiphy,
|
||||
struct net_device *dev)
|
||||
#endif
|
||||
{
|
||||
return rtw_android_pno_enable(dev, _FALSE);
|
||||
}
|
||||
@ -8611,11 +8762,12 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
|
||||
_adapter *padapter;
|
||||
struct pwrctrl_priv *pwrpriv;
|
||||
struct mlme_priv *pmlmepriv;
|
||||
struct sitesurvey_parm parm;
|
||||
int i, len;
|
||||
|
||||
padapter = wiphy_to_adapter(wiphy);
|
||||
pwrpriv = adapter_to_pwrctl(padapter);
|
||||
pmlmepriv = &padapter->mlmepriv;
|
||||
struct sitesurvey_parm parm;
|
||||
int i, len;
|
||||
|
||||
|
||||
RTW_DBG("==> %s\n",__func__);
|
||||
@ -8648,7 +8800,12 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) {
|
||||
}
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy, 0);
|
||||
#else
|
||||
cfg80211_sched_scan_results(padapter->rtw_wdev->wiphy);
|
||||
#endif
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
}
|
||||
@ -9378,6 +9535,10 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
;
|
||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) */
|
||||
#endif /* CONFIG_RTW_MESH */
|
||||
|
||||
#if (KERNEL_VERSION(3, 8, 0) <= LINUX_VERSION_CODE)
|
||||
wiphy->features |= NL80211_FEATURE_SAE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RFKILL_POLL
|
||||
@ -9551,6 +9712,94 @@ int rtw_hostapd_acs_dump_survey(struct wiphy *wiphy, struct net_device *netdev,
|
||||
}
|
||||
#endif /* defined(CONFIG_RTW_HOSTAPD_ACS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) */
|
||||
|
||||
#if (KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE)
|
||||
int cfg80211_rtw_external_auth(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_external_auth_params *params)
|
||||
{
|
||||
PADAPTER padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(dev));
|
||||
|
||||
rtw_cfg80211_external_auth_status(wiphy, dev,
|
||||
(struct rtw_external_auth_params *)params);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void rtw_cfg80211_external_auth_status(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct rtw_external_auth_params *params)
|
||||
{
|
||||
PADAPTER padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta = NULL;
|
||||
u8 *buf = NULL;
|
||||
u32 len = 0;
|
||||
_irqL irqL;
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(dev));
|
||||
|
||||
RTW_INFO("SAE: action: %u, status: %u\n", params->action, params->status);
|
||||
if (params->status == WLAN_STATUS_SUCCESS) {
|
||||
RTW_INFO("bssid: "MAC_FMT"\n", MAC_ARG(params->bssid));
|
||||
RTW_INFO("SSID: [%s]\n",
|
||||
((params->ssid.ssid_len == 0) ? "" : (char *)params->ssid.ssid));
|
||||
RTW_INFO("suite: 0x%08x\n", params->key_mgmt_suite);
|
||||
}
|
||||
|
||||
psta = rtw_get_stainfo(pstapriv, params->bssid);
|
||||
if (psta && (params->status == WLAN_STATUS_SUCCESS)) {
|
||||
/* AP mode */
|
||||
RTW_INFO("station match\n");
|
||||
|
||||
psta->state &= ~WIFI_FW_AUTH_NULL;
|
||||
psta->state |= WIFI_FW_AUTH_SUCCESS;
|
||||
psta->expire_to = padapter->stapriv.assoc_to;
|
||||
|
||||
if (params->pmkid != NULL) {
|
||||
/* RTW_INFO_DUMP("PMKID:", params->pmkid, PMKID_LEN); */
|
||||
_rtw_set_pmksa(dev, params->bssid, params->pmkid);
|
||||
}
|
||||
|
||||
_enter_critical_bh(&psta->lock, &irqL);
|
||||
if ((psta->auth_len != 0) && (psta->pauth_frame != NULL)) {
|
||||
buf = rtw_zmalloc(psta->auth_len);
|
||||
if (buf) {
|
||||
_rtw_memcpy(buf, psta->pauth_frame, psta->auth_len);
|
||||
len = psta->auth_len;
|
||||
}
|
||||
|
||||
rtw_mfree(psta->pauth_frame, psta->auth_len);
|
||||
psta->pauth_frame = NULL;
|
||||
psta->auth_len = 0;
|
||||
}
|
||||
_exit_critical_bh(&psta->lock, &irqL);
|
||||
|
||||
if (buf) {
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
/* send the SAE auth Confirm */
|
||||
|
||||
rtw_ps_deny(padapter, PS_DENY_MGNT_TX);
|
||||
if (_SUCCESS == rtw_pwr_wakeup(padapter)) {
|
||||
rtw_mi_set_scan_deny(padapter, 1000);
|
||||
rtw_mi_scan_abort(padapter, _TRUE);
|
||||
|
||||
RTW_INFO("SAE: Tx auth Confirm\n");
|
||||
rtw_mgnt_tx_cmd(padapter, pmlmeext->cur_channel, 1, buf, len, 0, RTW_CMDF_DIRECTLY);
|
||||
|
||||
rtw_mfree(buf, len);
|
||||
buf = NULL;
|
||||
len = 0;
|
||||
}
|
||||
rtw_ps_deny_cancel(padapter, PS_DENY_MGNT_TX);
|
||||
}
|
||||
} else {
|
||||
/* STA mode */
|
||||
psecuritypriv->extauth_status = params->status;
|
||||
}
|
||||
}
|
||||
|
||||
static struct cfg80211_ops rtw_cfg80211_ops = {
|
||||
.change_virtual_intf = cfg80211_rtw_change_iface,
|
||||
.add_key = cfg80211_rtw_add_key,
|
||||
@ -9667,6 +9916,9 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
||||
#if defined(CONFIG_RTW_HOSTAPD_ACS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
|
||||
.dump_survey = rtw_hostapd_acs_dump_survey,
|
||||
#endif
|
||||
#if (KERNEL_VERSION(4, 17, 0) <= LINUX_VERSION_CODE)
|
||||
.external_auth = cfg80211_rtw_external_auth,
|
||||
#endif
|
||||
};
|
||||
|
||||
struct wiphy *rtw_wiphy_alloc(_adapter *padapter, struct device *dev)
|
||||
|
@ -193,6 +193,20 @@ struct rtw_wdev_priv {
|
||||
|
||||
};
|
||||
|
||||
enum external_auth_action {
|
||||
EXTERNAL_AUTH_START,
|
||||
EXTERNAL_AUTH_ABORT,
|
||||
};
|
||||
|
||||
struct rtw_external_auth_params {
|
||||
enum external_auth_action action;
|
||||
u8 bssid[ETH_ALEN]__aligned(2);
|
||||
struct cfg80211_ssid ssid;
|
||||
unsigned int key_mgmt_suite;
|
||||
u16 status;
|
||||
u8 pmkid[PMKID_LEN];
|
||||
};
|
||||
|
||||
bool rtw_cfg80211_is_connect_requested(_adapter *adapter);
|
||||
|
||||
#if RTW_CFG80211_BLOCK_STA_DISCON_EVENT
|
||||
@ -246,7 +260,8 @@ struct rtw_wiphy_data {
|
||||
#define FUNC_WIPHY_FMT "%s("WIPHY_FMT")"
|
||||
#define FUNC_WIPHY_ARG(wiphy) __func__, WIPHY_ARG(wiphy)
|
||||
|
||||
#define SET_CFG80211_REPORT_MGMT(w, t, v) (w->report_mgmt |= (v ? BIT(t >> 4) : 0))
|
||||
#define SET_CFG80211_REPORT_MGMT(w, t, v) (w->report_mgmt |= BIT(t >> 4))
|
||||
#define CLR_CFG80211_REPORT_MGMT(w, t, v) (w->report_mgmt &= (~BIT(t >> 4)))
|
||||
#define GET_CFG80211_REPORT_MGMT(w, t) ((w->report_mgmt & BIT(t >> 4)) > 0)
|
||||
|
||||
struct wiphy *rtw_wiphy_alloc(_adapter *padapter, struct device *dev);
|
||||
@ -320,6 +335,10 @@ void rtw_cfg80211_rx_action(_adapter *adapter, union recv_frame *rframe, const c
|
||||
void rtw_cfg80211_rx_mframe(_adapter *adapter, union recv_frame *rframe, const char *msg);
|
||||
void rtw_cfg80211_rx_probe_request(_adapter *padapter, union recv_frame *rframe);
|
||||
|
||||
void rtw_cfg80211_external_auth_request(_adapter *padapter, union recv_frame *rframe);
|
||||
void rtw_cfg80211_external_auth_status(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct rtw_external_auth_params *params);
|
||||
|
||||
int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len, int type);
|
||||
|
||||
bool rtw_cfg80211_pwr_mgmt(_adapter *adapter);
|
||||
|
@ -124,6 +124,8 @@ void rtw_reset_securitypriv(_adapter *adapter)
|
||||
adapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen;
|
||||
adapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
|
||||
|
||||
adapter->securitypriv.extauth_status = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
|
||||
} else { /* reset values in securitypriv */
|
||||
/* if(adapter->mlmepriv.fw_state & WIFI_STATION_STATE) */
|
||||
/* { */
|
||||
@ -139,6 +141,8 @@ void rtw_reset_securitypriv(_adapter *adapter)
|
||||
psec_priv->ndisauthtype = Ndis802_11AuthModeOpen;
|
||||
psec_priv->ndisencryptstatus = Ndis802_11WEPDisabled;
|
||||
/* } */
|
||||
|
||||
psec_priv->extauth_status = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
}
|
||||
/* add for CONFIG_IEEE80211W, none 11w also can use */
|
||||
_exit_critical_bh(&adapter->security_key_mutex, &irqL);
|
||||
|
@ -1338,16 +1338,10 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
|
||||
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
|
||||
, struct net_device *sb_dev
|
||||
#else
|
||||
, void *accel_priv
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
|
||||
, select_queue_fallback_t fallback
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@ -4757,6 +4751,11 @@ int rtw_resume_process_wow(_adapter *padapter)
|
||||
if (pwrpriv->wowlan_pno_enable)
|
||||
rtw_set_fw_in_ips_mode(padapter, _FALSE);
|
||||
#endif /* CONFIG_FWLPS_IN_IPS */
|
||||
#if defined(CONFIG_LPS_LCLK) && defined(RTW_HALMAC)
|
||||
if (pwrpriv->wowlan_pno_enable)
|
||||
rtw_set_fw_config_32k(padapter, _FALSE);
|
||||
|
||||
#endif
|
||||
#endif/* CONFIG_PNO_SUPPORT */
|
||||
|
||||
if (pwrpriv->wowlan_mode == _TRUE) {
|
||||
|
@ -95,6 +95,7 @@ const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = {
|
||||
/* Private command for P2P disable*/
|
||||
"P2P_DISABLE",
|
||||
"SET_AEK",
|
||||
"EXT_AUTH_STATUS",
|
||||
"DRIVER_VERSION"
|
||||
};
|
||||
|
||||
@ -663,11 +664,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
|
||||
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
|
||||
#else
|
||||
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
|
||||
#endif
|
||||
RTW_INFO("%s: failed to access memory\n", __FUNCTION__);
|
||||
ret = -EFAULT;
|
||||
goto exit;
|
||||
@ -936,6 +933,12 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ANDROID_WIFI_CMD_EXT_AUTH_STATUS: {
|
||||
rtw_set_external_auth_status(padapter,
|
||||
command + strlen("EXT_AUTH_STATUS "),
|
||||
priv_cmd.total_len - strlen("EXT_AUTH_STATUS "));
|
||||
break;
|
||||
}
|
||||
case ANDROID_WIFI_CMD_DRIVERVERSION: {
|
||||
bytes_written = strlen(DRIVERVERSION);
|
||||
snprintf(command, bytes_written + 1, DRIVERVERSION);
|
||||
|
@ -1748,9 +1748,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_GET_CAPABILITIES
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_gscan_get_capabilities
|
||||
},
|
||||
{
|
||||
@ -1759,9 +1756,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_SET_CONFIG
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_scan_cfg
|
||||
},
|
||||
{
|
||||
@ -1770,9 +1764,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_SET_SCAN_CONFIG
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_batch_scan_cfg
|
||||
},
|
||||
{
|
||||
@ -1781,9 +1772,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_ENABLE_GSCAN
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_initiate_gscan
|
||||
},
|
||||
{
|
||||
@ -1792,9 +1780,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_enable_full_scan_result
|
||||
},
|
||||
{
|
||||
@ -1803,9 +1788,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_SET_HOTLIST
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_hotlist_cfg
|
||||
},
|
||||
{
|
||||
@ -1814,9 +1796,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_significant_change_cfg
|
||||
},
|
||||
{
|
||||
@ -1825,9 +1804,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_GET_SCAN_RESULTS
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_gscan_get_batch_results
|
||||
},
|
||||
{
|
||||
@ -1836,9 +1812,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = GSCAN_SUBCMD_GET_CHANNEL_LIST
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_gscan_get_channel_list
|
||||
},
|
||||
#endif /* GSCAN_SUPPORT */
|
||||
@ -1849,9 +1822,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = RTT_SUBCMD_SET_CONFIG
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_rtt_set_config
|
||||
},
|
||||
{
|
||||
@ -1860,9 +1830,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = RTT_SUBCMD_CANCEL_CONFIG
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_rtt_cancel_config
|
||||
},
|
||||
{
|
||||
@ -1871,9 +1838,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = RTT_SUBCMD_GETCAPABILITY
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_rtt_get_capability
|
||||
},
|
||||
#endif /* RTT_SUPPORT */
|
||||
@ -1884,9 +1848,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LSTATS_SUBCMD_GET_INFO
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_lstats_get_info
|
||||
},
|
||||
{
|
||||
@ -1895,9 +1856,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LSTATS_SUBCMD_SET_INFO
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_lstats_set_info
|
||||
},
|
||||
{
|
||||
@ -1906,9 +1864,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LSTATS_SUBCMD_CLEAR_INFO
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_lstats_clear_info
|
||||
},
|
||||
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
|
||||
@ -1919,9 +1874,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_SET_RSSI_MONITOR
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_rssi_monitor
|
||||
},
|
||||
#endif /* CONFIG_RTW_CFGVEDNOR_RSSIMONITOR */
|
||||
@ -1932,9 +1884,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_START_LOGGING
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_start_logging
|
||||
},
|
||||
{
|
||||
@ -1943,9 +1892,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_GET_FEATURE
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_feature
|
||||
},
|
||||
{
|
||||
@ -1954,9 +1900,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_GET_VER
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_version
|
||||
},
|
||||
{
|
||||
@ -1965,9 +1908,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_GET_RING_STATUS
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_ring_status
|
||||
},
|
||||
{
|
||||
@ -1976,9 +1916,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_GET_RING_DATA
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_ring_data
|
||||
},
|
||||
{
|
||||
@ -1987,9 +1924,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_TRIGGER_MEM_DUMP
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_firmware_memory_dump
|
||||
},
|
||||
{
|
||||
@ -1998,9 +1932,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_START_PKT_FATE_MONITORING
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_start_pkt_fate_monitoring
|
||||
},
|
||||
{
|
||||
@ -2009,9 +1940,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_GET_TX_PKT_FATES
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_tx_pkt_fates
|
||||
},
|
||||
{
|
||||
@ -2020,9 +1948,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = LOGGER_GET_RX_PKT_FATES
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_logger_get_rx_pkt_fates
|
||||
},
|
||||
#endif /* CONFIG_RTW_CFGVENDOR_WIFI_LOGGER */
|
||||
@ -2034,9 +1959,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_SET_PNO_RANDOM_MAC_OUI
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_rand_mac_oui
|
||||
},
|
||||
#endif
|
||||
@ -2046,9 +1968,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_NODFS_SET
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_nodfs_flag
|
||||
|
||||
},
|
||||
@ -2058,9 +1977,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_SET_COUNTRY_CODE
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_country
|
||||
},
|
||||
{
|
||||
@ -2069,9 +1985,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_CONFIG_ND_OFFLOAD
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_set_nd_offload
|
||||
},
|
||||
#endif /* CONFIG_RTW_WIFI_HAL */
|
||||
@ -2081,9 +1994,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_GET_FEATURE_SET
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_get_feature_set
|
||||
},
|
||||
{
|
||||
@ -2092,9 +2002,6 @@ static const struct wiphy_vendor_command rtw_vendor_cmds[] = {
|
||||
.subcmd = WIFI_SUBCMD_GET_FEATURE_SET_MATRIX
|
||||
},
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
|
||||
.policy = VENDOR_CMD_RAW_DATA,
|
||||
#endif
|
||||
.doit = rtw_cfgvendor_get_feature_set_matrix
|
||||
}
|
||||
};
|
||||
|
@ -3724,6 +3724,17 @@ exit:
|
||||
}
|
||||
#endif /* CONFIG_RTW_TPT_MODE */
|
||||
|
||||
int proc_get_cur_beacon_keys(struct seq_file *m, void *v)
|
||||
{
|
||||
struct net_device *dev = m->private;
|
||||
_adapter *adapter = rtw_netdev_priv(dev);
|
||||
struct mlme_priv *mlme = &adapter->mlmepriv;
|
||||
|
||||
rtw_dump_bcn_keys(m, &mlme->cur_beacon_keys);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* rtw_adapter_proc:
|
||||
* init/deinit when register/unregister net_device
|
||||
@ -4089,6 +4100,7 @@ const struct rtw_proc_hdl adapter_proc_hdls[] = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RTW_PROC_HDL_SSEQ("cur_beacon_keys", proc_get_cur_beacon_keys, NULL),
|
||||
};
|
||||
|
||||
const int adapter_proc_hdls_num = sizeof(adapter_proc_hdls) / sizeof(struct rtw_proc_hdl);
|
||||
|
@ -242,11 +242,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB812, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID for USB Single-function, WiFi only */
|
||||
/*=== Customer ID ===*/
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Alpha - Alpha*/
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0115, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* TP-Link Archer T4U V3 */
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xB822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax EW-7822ULC */
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xC822, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Edimax EW-7822UTC */
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1841, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* ASUS AC1300 USB-AC55 B1 */
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x184C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* ASUS U2*/
|
||||
{USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x331c, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Dlink - DWA-182*/
|
||||
#endif /* CONFIG_RTL8822B */
|
||||
|
||||
#ifdef CONFIG_RTL8723D
|
||||
|
@ -2201,11 +2201,7 @@ static int isFileReadable(const char *path, u32 *sz)
|
||||
ret = PTR_ERR(fp);
|
||||
else {
|
||||
oldfs = get_fs();
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||
set_fs(KERNEL_DS);
|
||||
#else
|
||||
set_fs(get_ds());
|
||||
#endif
|
||||
|
||||
if (1 != readFile(fp, &buf, 1))
|
||||
ret = PTR_ERR(fp);
|
||||
@ -2243,11 +2239,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
||||
RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp);
|
||||
|
||||
oldfs = get_fs();
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||
set_fs(KERNEL_DS);
|
||||
#else
|
||||
set_fs(get_ds());
|
||||
#endif
|
||||
ret = readFile(fp, buf, sz);
|
||||
set_fs(oldfs);
|
||||
closeFile(fp);
|
||||
@ -2282,11 +2274,7 @@ static int storeToFile(const char *path, u8 *buf, u32 sz)
|
||||
RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp);
|
||||
|
||||
oldfs = get_fs();
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
||||
set_fs(KERNEL_DS);
|
||||
#else
|
||||
set_fs(get_ds());
|
||||
#endif
|
||||
ret = writeFile(fp, buf, sz);
|
||||
set_fs(oldfs);
|
||||
closeFile(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user