staging: r8723au: Additional source patches

These changes are fixes that were discovered late in the testing
cycle.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Larry Finger
2014-03-28 21:37:42 -05:00
committed by Greg Kroah-Hartman
parent 364e30ebd2
commit c17416ef70
31 changed files with 343 additions and 700 deletions
+2 -2
View File
@@ -842,10 +842,10 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf, int len)
/* beacon interval */
/* ie + 8; 8: TimeStamp, 2: Beacon Interval 2:Capability */
p = rtw_get_beacon_interval23a_from_ie(ie);
pbss_network->Configuration.BeaconPeriod = RTW_GET_LE16(p);
pbss_network->Configuration.BeaconPeriod = get_unaligned_le16(p);
/* capability */
cap = RTW_GET_LE16(ie);
cap = get_unaligned_le16(ie);
/* SSID */
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len,
+5 -3
View File
@@ -447,7 +447,7 @@ _next:
pcmdpriv->cmd_issued_cnt++;
pcmd->cmdsz = _RND4(pcmd->cmdsz);/* _RND4 */
pcmd->cmdsz = ALIGN(pcmd->cmdsz, 4);
memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
@@ -1141,7 +1141,9 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter)
u8 bHigherBusyTraffic = false, bHigherBusyRxTraffic = false;
u8 bHigherBusyTxTraffic = false;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
#ifndef CONFIG_8723AU_BT_COEXIST
int BusyThreshold = 100;
#endif
/* */
/* Determine if our traffic is busy now */
/* */
@@ -1638,12 +1640,12 @@ u8 rtw_drvextra_cmd_hdl23a(struct rtw_adapter *padapter, unsigned char *pbuf)
case P2P_PS_WK_CID:
p2p_ps_wk_hdl23a(padapter, pdrvextra_cmd->type_size);
break;
#endif /* CONFIG_8723AU_P2P */
case P2P_PROTO_WK_CID:
/* Commented by Albert 2011/07/01 */
/* I used the type_size as the type command */
p2p_protocol_wk_hdl23a(padapter, pdrvextra_cmd->type_size);
break;
#endif /* CONFIG_8723AU_P2P */
#ifdef CONFIG_8723AU_AP_MODE
case CHECK_HIQ_WK_CID:
rtw_chk_hi_queue_hdl(padapter);
@@ -108,7 +108,6 @@ ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
u32 value32;
u8 readbyte;
u16 retry;
/* u32 start = rtw_get_current_time(); */
/* Write Address */
rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
@@ -137,7 +136,6 @@ ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
value32 = rtw_read32(Adapter, EFUSE_CTRL);
*pbuf = (u8)(value32 & 0xff);
/* DBG_8723A("ReadEFuseByte23a _offset:%08u, in %d ms\n", _offset , rtw_get_passing_time_ms23a(start)); */
}
/* */
+12 -12
View File
@@ -196,8 +196,8 @@ inline u8 *rtw_set_ie23a_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
ie_data[0] = ttl;
ie_data[1] = flags;
RTW_PUT_LE16((u8*)&ie_data[2], reason);
RTW_PUT_LE16((u8*)&ie_data[4], precedence);
put_unaligned_le16(reason, (u8*)&ie_data[2]);
put_unaligned_le16(precedence, (u8*)&ie_data[4]);
return rtw_set_ie23a(buf, 0x118, 6, ie_data, buf_len);
}
@@ -585,7 +585,7 @@ int rtw_parse_wpa_ie23a(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pair
/* pairwise_cipher */
if (left >= 2) {
/* count = le16_to_cpu(*(u16*)pos); */
count = RTW_GET_LE16(pos);
count = get_unaligned_le16(pos);
pos += 2;
left -= 2;
@@ -661,7 +661,7 @@ int rtw_parse_wpa2_ie23a(u8* rsn_ie, int rsn_ie_len, int *group_cipher,
/* pairwise_cipher */
if (left >= 2) {
/* count = le16_to_cpu(*(u16*)pos); */
count = RTW_GET_LE16(pos);
count = get_unaligned_le16(pos);
pos += 2;
left -= 2;
@@ -876,8 +876,8 @@ u8 *rtw_get_wps_attr23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
while (attr_ptr - wps_ie < wps_ielen) {
/* 4 = 2(Attribute ID) + 2(Length) */
u16 attr_id = RTW_GET_BE16(attr_ptr);
u16 attr_data_len = RTW_GET_BE16(attr_ptr + 2);
u16 attr_id = get_unaligned_be16(attr_ptr);
u16 attr_data_len = get_unaligned_be16(attr_ptr + 2);
u16 attr_len = attr_data_len + 4;
/* DBG_8723A("%s attr_ptr:%p, id:%u, length:%u\n", __func__, attr_ptr, attr_id, attr_data_len); */
@@ -1246,8 +1246,8 @@ void dump_wps_ie23a(u8 *ie, u32 ie_len) {
pos+= 6;
while (pos-ie < ie_len) {
id = RTW_GET_BE16(pos);
len = RTW_GET_BE16(pos + 2);
id = get_unaligned_be16(pos);
len = get_unaligned_be16(pos + 2);
DBG_8723A("%s ID:0x%04x, LEN:%u\n", __func__, id, len);
@@ -1271,7 +1271,7 @@ void dump_p2p_ie23a(u8 *ie, u32 ie_len) {
pos += 6;
while (pos-ie < ie_len) {
id = *pos;
len = RTW_GET_LE16(pos+1);
len = get_unaligned_le16(pos+1);
DBG_8723A("%s ID:%u, LEN:%u\n", __func__, id, len);
@@ -1362,7 +1362,7 @@ u8 *rtw_get_p2p_attr23a(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
while (attr_ptr - p2p_ie < p2p_ielen) {
/* 3 = 1(Attribute ID) + 2(Length) */
u8 attr_id = *attr_ptr;
u16 attr_data_len = RTW_GET_LE16(attr_ptr + 1);
u16 attr_data_len = get_unaligned_le16(attr_ptr + 1);
u16 attr_len = attr_data_len + 3;
/* DBG_8723A("%s attr_ptr:%p, id:%u, length:%u\n", __func__, attr_ptr, attr_id, attr_data_len); */
@@ -1429,7 +1429,7 @@ u32 rtw_set_p2p_attr_content23a(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_at
*pbuf = attr_id;
/* u16*)(pbuf + 1) = cpu_to_le16(attr_len); */
RTW_PUT_LE16(pbuf + 1, attr_len);
put_unaligned_le16(attr_len, pbuf + 1);
if (pdata_attr)
memcpy(pbuf + 3, pdata_attr, attr_len);
@@ -1561,7 +1561,7 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id,
/* 1 (WFD IE) + 1 (Length) + 3 (OUI) + 1 (OUI Type) */
cnt = 6;
while (cnt < wfd_ielen) {
u16 attrlen = RTW_GET_BE16(wfd_ie + cnt + 1);
u16 attrlen = get_unaligned_be16(wfd_ie + cnt + 1);
attr_id = wfd_ie[cnt];
if (attr_id == target_attr_id) {
+7 -6
View File
@@ -69,6 +69,7 @@ int _rtw_init_mlme_priv23a(struct rtw_adapter *padapter)
return res;
}
#ifdef CONFIG_8723AU_AP_MODE
static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen)
{
if(*ppie)
@@ -78,6 +79,7 @@ static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen)
*ppie=NULL;
}
}
#endif
void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
{
@@ -94,9 +96,7 @@ void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
rtw_free_mlme_ie_data(&pmlmepriv->p2p_probe_resp_ie, &pmlmepriv->p2p_probe_resp_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->p2p_go_probe_resp_ie, &pmlmepriv->p2p_go_probe_resp_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie, &pmlmepriv->p2p_assoc_req_ie_len);
#endif
#if defined(CONFIG_8723AU_P2P)
rtw_free_mlme_ie_data(&pmlmepriv->wfd_beacon_ie, &pmlmepriv->wfd_beacon_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_req_ie, &pmlmepriv->wfd_probe_req_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_resp_ie, &pmlmepriv->wfd_probe_resp_ie_len);
@@ -941,7 +941,7 @@ void rtw_indicate_disconnect23a(struct rtw_adapter *padapter)
/* set ips_deny_time to avoid enter IPS before LPS leave */
padapter->pwrctrlpriv.ips_deny_time =
rtw_get_current_time() + rtw_ms_to_systime23a(3000);
jiffies + msecs_to_jiffies(3000);
_clr_fwstate_(pmlmepriv, _FW_LINKED);
@@ -1675,7 +1675,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
}
/* check ssid, if needed */
if (pmlmepriv->assoc_ssid.ssid && pmlmepriv->assoc_ssid.ssid_len) {
if (pmlmepriv->assoc_ssid.ssid_len) {
if (competitor->network.Ssid.ssid_len !=
pmlmepriv->assoc_ssid.ssid_len ||
memcmp(competitor->network.Ssid.ssid,
@@ -1839,8 +1839,7 @@ int rtw_set_key23a(struct rtw_adapter *adapter,
res = _FAIL; /* try again */
goto exit;
}
psetkeyparm = (struct setkey_parm *)
kzalloc(sizeof(struct setkey_parm), GFP_KERNEL);
psetkeyparm = kzalloc(sizeof(struct setkey_parm), GFP_KERNEL);
if (!psetkeyparm) {
kfree(pcmd);
res = _FAIL;
@@ -1902,6 +1901,8 @@ int rtw_set_key23a(struct rtw_adapter *adapter,
"%x (must be 1 or 2 or 4 or 5)\n",
psecuritypriv->dot11PrivacyAlgrthm));
res = _FAIL;
kfree(pcmd);
kfree(psetkeyparm);
goto exit;
}
+20 -18
View File
@@ -762,9 +762,9 @@ unsigned int OnProbeRsp23a(struct rtw_adapter *padapter,
struct recv_frame *precv_frame)
{
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
#ifdef CONFIG_8723AU_P2P
struct sk_buff *skb = precv_frame->pkt;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
#ifdef CONFIG_8723AU_P2P
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
#endif
@@ -1309,10 +1309,10 @@ unsigned int OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *prec
goto asoc_class2_error;
}
capab_info = RTW_GET_LE16(pframe + sizeof(struct ieee80211_hdr_3addr));
capab_info = get_unaligned_le16(pframe + sizeof(struct ieee80211_hdr_3addr));
/* capab_info = le16_to_cpu(*(unsigned short *)(pframe + sizeof(struct ieee80211_hdr_3addr))); */
/* listen_interval = le16_to_cpu(*(unsigned short *)(pframe + sizeof(struct ieee80211_hdr_3addr)+2)); */
listen_interval = RTW_GET_LE16(pframe + sizeof(struct ieee80211_hdr_3addr)+2);
listen_interval = get_unaligned_le16(pframe + sizeof(struct ieee80211_hdr_3addr)+2);
left = pkt_len - (sizeof(struct ieee80211_hdr_3addr) + ie_offset);
pos = pframe + (sizeof(struct ieee80211_hdr_3addr) + ie_offset);
@@ -1665,7 +1665,7 @@ unsigned int OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *prec
rtw_get_wfd_attr_content(wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, attr_content, &attr_contentlen);
if (attr_contentlen)
{
pwdinfo->wfd_info->peer_rtsp_ctrlport = RTW_GET_BE16(attr_content + 2);
pwdinfo->wfd_info->peer_rtsp_ctrlport = get_unaligned_be16(attr_content + 2);
DBG_8723A("[%s] Peer PORT NUM = %d\n", __func__, pwdinfo->wfd_info->peer_rtsp_ctrlport);
}
}
@@ -2091,7 +2091,7 @@ unsigned int OnAction23a_back23a(struct rtw_adapter *padapter, struct recv_frame
}
break;
case WLAN_ACTION_ADDBA_RESP: /* ADDBA response */
status = RTW_GET_LE16(&frame_body[3]);
status = get_unaligned_le16(&frame_body[3]);
tid = ((frame_body[5] >> 2) & 0x7);
if (status == 0) { /* successful */
DBG_8723A("agg_enable for TID =%d\n", tid);
@@ -2110,7 +2110,7 @@ unsigned int OnAction23a_back23a(struct rtw_adapter *padapter, struct recv_frame
~(1 << ((frame_body[3] >> 4) & 0xf));
/* reason_code = frame_body[4] | (frame_body[5] << 8); */
reason_code = RTW_GET_LE16(&frame_body[4]);
reason_code = get_unaligned_le16(&frame_body[4]);
} else if ((frame_body[3] & BIT(3)) == BIT(3)) {
tid = (frame_body[3] >> 4) & 0x0F;
@@ -4531,14 +4531,14 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
static unsigned int on_action_public23a_p2p(struct recv_frame *precv_frame)
{
struct rtw_adapter *padapter = precv_frame->adapter;
struct sk_buff *skb = precv_frame->pkt;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
u8 *pframe = skb->data;
uint len = skb->len;
u8 *frame_body;
u8 dialogToken = 0;
#ifdef CONFIG_8723AU_P2P
struct rtw_adapter *padapter = precv_frame->adapter;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
uint len = skb->len;
u8 *p2p_ie;
u32 p2p_ielen;
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
@@ -5262,9 +5262,7 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
unsigned short *fctrl;
unsigned int rate_len;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
#ifdef CONFIG_8723AU_AP_MODE
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
#endif
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
@@ -5579,6 +5577,13 @@ void issue_probersp23a(struct rtw_adapter *padapter, unsigned char *da,
#ifdef CONFIG_8723AU_AP_MODE
u8 *pwps_ie;
uint wps_ielen;
u8 *ssid_ie;
int ssid_ielen;
int ssid_ielen_diff;
u8 buf[MAX_IE_SZ];
u8 *ies;
#endif
#if defined(CONFIG_8723AU_AP_MODE) || defined(CONFIG_8723AU_P2P)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
#endif
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -5588,11 +5593,6 @@ void issue_probersp23a(struct rtw_adapter *padapter, unsigned char *da,
#ifdef CONFIG_8723AU_P2P
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
#endif /* CONFIG_8723AU_P2P */
u8 *ssid_ie;
int ssid_ielen;
int ssid_ielen_diff;
u8 buf[MAX_IE_SZ];
u8 *ies;
/* DBG_8723A("%s\n", __func__); */
@@ -7559,6 +7559,7 @@ unsigned int send_beacon23a(struct rtw_adapter *padapter)
int issue = 0;
int poll = 0;
unsigned long start = jiffies;
unsigned int passing_time;
rtw_hal_set_hwreg23a(padapter, HW_VAR_BCN_VALID, NULL);
do {
@@ -7578,11 +7579,12 @@ unsigned int send_beacon23a(struct rtw_adapter *padapter)
if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
return _FAIL;
passing_time = jiffies_to_msecs(jiffies - start);
if (!bxmitok) {
DBG_8723A("%s fail! %u ms\n", __func__, rtw_get_passing_time_ms23a(start));
DBG_8723A("%s fail! %u ms\n", __func__, passing_time);
return _FAIL;
} else {
unsigned int passing_time = jiffies_to_msecs(jiffies - start);
if (passing_time > 100 || issue > 3)
DBG_8723A("%s success, issue:%d, poll:%d, %u ms\n",
File diff suppressed because it is too large Load Diff
+21 -18
View File
@@ -108,13 +108,11 @@ static bool rtw_pwr_unassociated_idle(struct rtw_adapter *adapter)
struct rtw_adapter *buddy = adapter->pbuddy_adapter;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
struct xmit_priv *pxmit_priv = &adapter->xmitpriv;
#ifdef CONFIG_8723AU_P2P
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
#endif
bool ret = false;
if (adapter->pwrctrlpriv.ips_deny_time >= rtw_get_current_time())
if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies))
goto exit;
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR)
@@ -129,9 +127,7 @@ static bool rtw_pwr_unassociated_idle(struct rtw_adapter *adapter)
/* consider buddy, if exist */
if (buddy) {
struct mlme_priv *b_pmlmepriv = &buddy->mlmepriv;
#ifdef CONFIG_8723AU_P2P
struct wifidirect_info *b_pwdinfo = &buddy->wdinfo;
#endif
if (check_fwstate(b_pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR)
|| check_fwstate(b_pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS)
@@ -386,11 +382,13 @@ void rtw_set_ps_mode23a(struct rtw_adapter *padapter, u8 ps_mode, u8 smart_ps, u
*/
s32 LPS_RF_ON_check23a(struct rtw_adapter *padapter, u32 delay_ms)
{
u32 start_time;
unsigned long start_time, end_time;
u8 bAwake = false;
s32 err = 0;
start_time = rtw_get_current_time();
start_time = jiffies;
end_time = start_time + msecs_to_jiffies(delay_ms);
while (1)
{
rtw23a_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake);
@@ -404,8 +402,7 @@ s32 LPS_RF_ON_check23a(struct rtw_adapter *padapter, u32 delay_ms)
break;
}
if (rtw_get_passing_time_ms23a(start_time) > delay_ms)
{
if (time_after(jiffies, end_time)) {
err = -1;
DBG_8723A("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, delay_ms);
break;
@@ -539,7 +536,7 @@ u8 rtw_interface_ps_func23a(struct rtw_adapter *padapter, enum hal_intf_ps_func
inline void rtw_set_ips_deny23a(struct rtw_adapter *padapter, u32 ms)
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime23a(ms);
pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ms);
}
/*
@@ -554,14 +551,18 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int ret = _SUCCESS;
u32 start = rtw_get_current_time();
unsigned long start = jiffies;
unsigned long new_deny_time;
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime23a(ips_deffer_ms))
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime23a(ips_deffer_ms);
new_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
if (time_before(pwrpriv->ips_deny_time, new_deny_time))
pwrpriv->ips_deny_time = new_deny_time;
if (pwrpriv->ps_processing) {
DBG_8723A("%s wait ps_processing...\n", __func__);
while (pwrpriv->ps_processing && rtw_get_passing_time_ms23a(start) <= 3000)
while (pwrpriv->ps_processing &&
jiffies_to_msecs(jiffies - start) <= 3000)
msleep(10);
if (pwrpriv->ps_processing)
DBG_8723A("%s wait ps_processing timeout\n", __func__);
@@ -571,7 +572,8 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch
if (rtw_hal_sreset_inprogress(padapter)) {
DBG_8723A("%s wait sreset_inprogress...\n", __func__);
while (rtw_hal_sreset_inprogress(padapter) && rtw_get_passing_time_ms23a(start) <= 4000)
while (rtw_hal_sreset_inprogress(padapter) &&
jiffies_to_msecs(jiffies - start) <= 4000)
msleep(10);
if (rtw_hal_sreset_inprogress(padapter))
DBG_8723A("%s wait sreset_inprogress timeout\n", __func__);
@@ -582,7 +584,7 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch
if (pwrpriv->bInternalAutoSuspend == false && pwrpriv->bInSuspend) {
DBG_8723A("%s wait bInSuspend...\n", __func__);
while (pwrpriv->bInSuspend &&
(rtw_get_passing_time_ms23a(start) <= 3000)) {
(jiffies_to_msecs(jiffies - start) <= 3000)) {
msleep(10);
}
if (pwrpriv->bInSuspend)
@@ -630,8 +632,9 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms, const ch
}
exit:
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime23a(ips_deffer_ms))
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime23a(ips_deffer_ms);
new_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
if (time_before(pwrpriv->ips_deny_time, new_deny_time))
pwrpriv->ips_deny_time = new_deny_time;
return ret;
}
@@ -202,7 +202,7 @@ void rtw_wep_encrypt23a(struct rtw_adapter *padapter,
arcfour_encrypt(&mycontext, payload + length, crc, 4);
pframe += pxmitpriv->frag_len;
pframe = (u8 *)RND4((unsigned long)(pframe));
pframe = PTR_ALIGN(pframe, 4);
}
}
@@ -225,7 +225,7 @@ void rtw_wep_decrypt23a(struct rtw_adapter *padapter,
pframe = skb->data;
/* start to decrypt recvframe */
if ((prxattrib->encrypt =! _WEP40_) && (prxattrib->encrypt != _WEP104_))
if ((prxattrib->encrypt != _WEP40_) && (prxattrib->encrypt != _WEP104_))
return;
iv = pframe + prxattrib->hdrlen;
@@ -699,8 +699,7 @@ u32 rtw_tkip_encrypt23a(struct rtw_adapter *padapter,
arcfour_encrypt(&mycontext, payload+length, crc, 4);
pframe+= pxmitpriv->frag_len;
pframe = (u8 *)RND4((unsigned long)(pframe));
pframe = PTR_ALIGN(pframe, 4);
}
}
@@ -1371,7 +1370,7 @@ u32 rtw_aes_encrypt23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitfra
aes_cipher(prwskey, pattrib->hdrlen, pframe, length);
pframe += pxmitpriv->frag_len;
pframe = (u8*)RND4((unsigned long)pframe);
pframe = PTR_ALIGN(pframe, 4);
}
}
out:
@@ -1599,7 +1598,7 @@ u32 rtw_aes_decrypt23a(struct rtw_adapter *padapter, struct recv_frame *precvfra
pframe = skb->data;
/* 4 start to encrypt each fragment */
if (!prxattrib->encrypt != _AES_)
if (prxattrib->encrypt != _AES_)
return _FAIL;
stainfo = rtw_get_stainfo23a(&padapter->stapriv, &prxattrib->ta[0]);
@@ -165,9 +165,11 @@ static void sreset_restore_network_status(struct rtw_adapter *padapter)
if (check_fwstate(mlmepriv, WIFI_STATION_STATE)) {
DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - WIFI_STATION_STATE\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
sreset_restore_network_station(padapter);
#ifdef CONFIG_8723AU_AP_MODE
} else if (check_fwstate(mlmepriv, WIFI_AP_STATE)) {
DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - WIFI_AP_STATE\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
rtw_ap_restore_network(padapter);
#endif
} else if (check_fwstate(mlmepriv, WIFI_ADHOC_STATE)) {
DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - WIFI_ADHOC_STATE\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
} else {
@@ -581,7 +581,7 @@ int WFD_info_handler(struct rtw_adapter *padapter, struct ndis_802_11_var_ies *
DBG_8723A("[%s] Found WFD IE\n", __func__);
rtw_get_wfd_attr_content(wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, attr_content, &attr_contentlen);
if (attr_contentlen) {
pwdinfo->wfd_info->peer_rtsp_ctrlport = RTW_GET_BE16(attr_content + 2);
pwdinfo->wfd_info->peer_rtsp_ctrlport = get_unaligned_be16(attr_content + 2);
DBG_8723A("[%s] Peer PORT NUM = %d\n", __func__, pwdinfo->wfd_info->peer_rtsp_ctrlport);
return true;
}
+2 -5
View File
@@ -785,7 +785,7 @@ static s32 xmitframe_addmic(struct rtw_adapter *padapter,
for (curfragnum = 0; curfragnum < pattrib->nr_frags;
curfragnum++) {
payload = (u8 *)RND4((unsigned long)payload);
payload = PTR_ALIGN(payload, 4);
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
("=== curfragnum =%d, pframe = 0x%.2x, "
"0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x"
@@ -1124,7 +1124,6 @@ s32 rtw_xmitframe_coalesce23a(struct rtw_adapter *padapter, struct sk_buff *pkt,
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct pkt_attrib *pattrib = &pxmitframe->attrib;
s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz;
unsigned long addr;
u8 *pframe, *mem_start;
u8 hw_hdr_offset;
u8 *pbuf_start;
@@ -1261,9 +1260,7 @@ s32 rtw_xmitframe_coalesce23a(struct rtw_adapter *padapter, struct sk_buff *pkt,
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("%s: There're still something in packet!\n", __func__));
}
addr = (unsigned long)pframe;
mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset;
mem_start = PTR_ALIGN(pframe, 4) + hw_hdr_offset;
memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen);
}
+2
View File
@@ -259,7 +259,9 @@ void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level)
pmlmepriv = &padapter->mlmepriv;
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
#ifdef CONFIG_8723AU_AP_MODE
add_RATid23a(padapter, psta, rssi_level);
#endif
} else {
if (padapter->HalFunc.UpdateRAMaskHandler)
padapter->HalFunc.UpdateRAMaskHandler(padapter, psta->mac_id, rssi_level);
@@ -4620,11 +4620,11 @@ bthci_StateConnected(struct rtw_adapter *padapter,
/*PMGNT_INFO pMgntInfo = &padapter->MgntInfo; */
struct bt_30info *pBTInfo = GET_BT_INFO(padapter);
struct bt_mgnt *pBtMgnt = &pBTInfo->BtMgnt;
u8 i;
u16 logicHandle = 0;
RTPRINT(FIOCTL, IOCTL_STATE, ("[BT state], [Connected], "));
switch (StateCmd) {
u8 i;
u16 logicHandle = 0;
case STATE_CMD_DISCONNECT_PHY_LINK:
RTPRINT(FIOCTL, IOCTL_STATE, ("STATE_CMD_DISCONNECT_PHY_LINK\n"));
@@ -7076,17 +7076,17 @@ static void btdm_2AntBtInquiryPage(struct rtw_adapter *padapter)
static u8 btdm_HoldForBtInqPage(struct rtw_adapter *padapter)
{
struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
u32 curTime = rtw_get_current_time();
u32 curTime = jiffies;
if (pHalData->bt_coexist.halCoex8723.bC2hBtInquiryPage) {
/* bt inquiry or page is started. */
if (pHalData->bt_coexist.halCoex8723.btInqPageStartTime == 0) {
pHalData->bt_coexist.halCoex8723.btInqPageStartTime = curTime;
RTPRINT(FBT, BT_TRACE, ("[BTCoex], BT Inquiry/page is started at time : 0x%"i64fmt"x \n",
RTPRINT(FBT, BT_TRACE, ("[BTCoex], BT Inquiry/page is started at time : 0x%lx \n",
pHalData->bt_coexist.halCoex8723.btInqPageStartTime));
}
}
RTPRINT(FBT, BT_TRACE, ("[BTCoex], BT Inquiry/page started time : 0x%"i64fmt"x, curTime : 0x%x \n",
RTPRINT(FBT, BT_TRACE, ("[BTCoex], BT Inquiry/page started time : 0x%lx, curTime : 0x%x \n",
pHalData->bt_coexist.halCoex8723.btInqPageStartTime, curTime));
if (pHalData->bt_coexist.halCoex8723.btInqPageStartTime) {
@@ -388,7 +388,7 @@ s32 rtl8723a_FirmwareDownload(struct rtw_adapter *padapter)
rtStatus = _WriteFW(padapter, buf, fw_size);
if (rtStatus == _SUCCESS ||
(rtw_get_passing_time_ms23a(fwdl_start_time) > 500 &&
(jiffies_to_msecs(jiffies - fwdl_start_time) > 500 &&
writeFW_retry++ >= 3))
break;
@@ -366,7 +366,7 @@ static s32 rtw_dump_xframe(struct rtw_adapter *padapter, struct xmit_frame *pxmi
mem_addr += w_sz;
mem_addr = (u8 *)RND4(((unsigned long)(mem_addr)));
mem_addr = PTR_ALIGN(mem_addr, 4);
}
rtw_free_xmitframe23a(pxmitpriv, pxmitframe);
@@ -65,8 +65,6 @@ enum RF_RADIO_PATH {
RF_PATH_MAX /* Max RF number 90 support */
};
#define RF_PATH_MAX 3
#define CHANNEL_MAX_NUMBER 14 /* 14 is the max channel number */
#define CHANNEL_GROUP_MAX 3 /* ch1~3, ch4~9, ch10~14 total three groups */
@@ -258,13 +258,9 @@ struct rtw_adapter {
struct hostapd_priv *phostapdpriv;
#endif
#ifdef CONFIG_8723AU_P2P
struct cfg80211_wifidirect_info cfg80211_wdinfo;
#endif /* CONFIG_8723AU_P2P */
u32 setband;
#ifdef CONFIG_8723AU_P2P
struct wifidirect_info wdinfo;
#endif /* CONFIG_8723AU_P2P */
#ifdef CONFIG_8723AU_P2P
struct wifi_display_info wfd_info;
+6 -11
View File
@@ -265,35 +265,30 @@ struct odm_rate_adapt {
#define DM_Type_ByFW 0
#define DM_Type_ByDriver 1
/* */
/* Declare for common info */
/* */
/* Declare for common info */
/* */
#define MAX_PATH_NUM_92CS 2
struct odm_phy_info {
u8 RxPWDBAll;
u8 SignalQuality; /* in 0-100 index. */
u8 RxMIMOSignalQuality[MAX_PATH_NUM_92CS]; /* EVM */
u8 RxMIMOSignalStrength[MAX_PATH_NUM_92CS];/* in 0~100 index */
u8 RxMIMOSignalQuality[RF_PATH_MAX]; /* EVM */
u8 RxMIMOSignalStrength[RF_PATH_MAX];/* in 0~100 index */
s8 RxPower; /* in dBm Translate from PWdB */
s8 RecvSignalPower;/* Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures. */
u8 BTRxRSSIPercentage;
u8 SignalStrength; /* in 0-100 index. */
u8 RxPwr[MAX_PATH_NUM_92CS];/* per-path's pwdb */
u8 RxSNR[MAX_PATH_NUM_92CS];/* per-path's SNR */
u8 RxPwr[RF_PATH_MAX];/* per-path's pwdb */
u8 RxSNR[RF_PATH_MAX];/* per-path's SNR */
};
struct odm_phy_dbg_info {
/* ODM Write,debug info */
s8 RxSNRdB[MAX_PATH_NUM_92CS];
s8 RxSNRdB[RF_PATH_MAX];
u64 NumQryPhyStatus;
u64 NumQryPhyStatusCCK;
u64 NumQryPhyStatusOFDM;
/* Others */
s32 RxEVM[MAX_PATH_NUM_92CS];
s32 RxEVM[RF_PATH_MAX];
};
@@ -74,21 +74,21 @@ struct phy_rx_agc_info {
};
struct phy_status_rpt {
struct phy_rx_agc_info path_agc[2];
u8 ch_corr[2];
struct phy_rx_agc_info path_agc[RF_PATH_MAX];
u8 ch_corr[RF_PATH_MAX];
u8 cck_sig_qual_ofdm_pwdb_all;
u8 cck_agc_rpt_ofdm_cfosho_a;
u8 cck_rpt_b_ofdm_cfosho_b;
u8 rsvd_1;/* ch_corr_msb; */
u8 noise_power_db_msb;
u8 path_cfotail[2];
u8 pcts_mask[2];
s8 stream_rxevm[2];
u8 path_rxsnr[2];
u8 path_cfotail[RF_PATH_MAX];
u8 pcts_mask[RF_PATH_MAX];
s8 stream_rxevm[RF_PATH_MAX];
u8 path_rxsnr[RF_PATH_MAX];
u8 noise_power_db_lsb;
u8 rsvd_2[3];
u8 stream_csi[2];
u8 stream_target_csi[2];
u8 stream_csi[RF_PATH_MAX];
u8 stream_target_csi[RF_PATH_MAX];
s8 sig_evm;
u8 rsvd_3;

Some files were not shown because too many files have changed in this diff Show More