precvframe->u.hdr.adapter = padapter;
precvframe++;
-
}
res = rtw_hal_init_recv_priv(padapter);
union recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
{
-
union recv_frame *precvframe;
struct list_head *plist, *phead;
struct adapter *padapter;
signed int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
{
-
struct adapter *padapter = precvframe->u.hdr.adapter;
struct recv_priv *precvpriv = &padapter->recvpriv;
list_add_tail(&precvbuf->list, get_list_head(queue));
spin_unlock_bh(&queue->lock);
return _SUCCESS;
-
}
struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
precvbuf = container_of(plist, struct recv_buf, list);
list_del_init(&precvbuf->list);
-
}
spin_unlock_bh(&queue->lock);
return precvbuf;
-
}
static void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
static signed int recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe)
{
-
signed int i, res = _SUCCESS;
u32 datalen;
u8 miccode[8];
}
recvframe_pull_tail(precvframe, 8);
-
}
exit:
return res;
-
}
/* decrypt and set the ivlen, icvlen of the recv_frame */
static union recv_frame *decryptor(struct adapter *padapter, union recv_frame *precv_frame)
{
-
struct rx_pkt_attrib *prxattrib = &precv_frame->u.hdr.attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
union recv_frame *return_packet = precv_frame;
prxcache->tid_rxseq[tid] = seq_ctrl;
return _SUCCESS;
-
}
static void process_pwrbit_data(struct adapter *padapter, union recv_frame *precv_frame)
/* pstapriv->sta_dz_bitmap |= BIT(psta->aid); */
stop_sta_xmit(padapter, psta);
-
}
} else {
if (psta->state & WIFI_SLEEP_STATE) {
wakeup_sta_to_xmit(padapter, psta);
}
}
-
}
}
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ||
check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
-
/* filter packets that SA is myself or multicast or broadcast */
if (!memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
ret = _FAIL;
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
(check_fwstate(pmlmepriv, _FW_LINKED) ||
check_fwstate(pmlmepriv, _FW_UNDER_LINKING))) {
-
/* filter packets that SA is myself or multicast or broadcast */
if (!memcmp(myhwaddr, pattrib->src, ETH_ALEN)) {
ret = _FAIL;
if (is_zero_ether_addr(pattrib->bssid) ||
is_zero_ether_addr(mybssid) ||
(memcmp(pattrib->bssid, mybssid, ETH_ALEN))) {
-
if (!bmcast)
issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
if (!memcmp(myhwaddr, pattrib->dst, ETH_ALEN) && (!bmcast)) {
*psta = rtw_get_stainfo(pstapriv, pattrib->bssid); /* get sta_info */
if (!*psta) {
-
/* for AP multicast issue , modify by yiwei */
static unsigned long send_issue_deauth_time;
}
return _FAIL;
-
}
/* perform defrag */
pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len;
plist = get_next(plist);
-
}
/* free the defrag_q queue and return the prframe */
rtw_free_recvframe(precv_frame, pfree_recv_queue);
prtnframe = NULL;
}
-
}
if ((ismfrag == 0) && (fragnum != 0)) {
rtw_free_recvframe(precv_frame, pfree_recv_queue);
prtnframe = NULL;
}
-
}
if ((prtnframe) && (prtnframe->u.hdr.attrib.privacy)) {
mgt_dispatcher(padapter, precv_frame);
return _SUCCESS;
-
}
static signed int validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_frame)
default:
ret = _FAIL;
break;
-
}
if (ret == _FAIL || ret == RTW_RX_HANDLED)
validate_80211w_fail:
return _FAIL;
-
}
static signed int validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
pdata = prframe->u.hdr.rx_data;
while (a_len > ETH_HLEN) {
-
/* Offset 12 denote 2 mac address */
nSubframe_Length = get_unaligned_be16(pdata + 12);
return false;
else
break;
-
}
/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */
/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */
return true;
-
}
static int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame)
pattrib = &prframe->u.hdr.attrib;
preorder_ctrl->indicate_seq = pattrib->seq_num;
-
}
/* Prepare indication list and indication. */
/* Check if there is any packet need indicate. */
while (!list_empty(phead)) {
-
prframe = (union recv_frame *)plist;
pattrib = &prframe->u.hdr.attrib;
bPktInBuf = true;
break;
}
-
}
/* spin_unlock(&ppending_recvframe_queue->lock); */
!padapter->bSurpriseRemoved) {
rtw_recv_indicatepkt(padapter, prframe);
return _SUCCESS;
-
}
return _FAIL;
-
}
if (!preorder_ctrl->enable) {
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
spin_unlock_bh(&ppending_recvframe_queue->lock);
-
}
static int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prframe)
retval = _FAIL;
return retval;
}
-
}
return retval;
-
}
static int recv_func_prehandle(struct adapter *padapter, union recv_frame *rframe)
ret = recv_func_prehandle(padapter, rframe);
if (ret == _SUCCESS) {
-
/* check if need to enqueue into uc_swdec_pending_queue*/
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
!is_multicast_ether_addr(prxattrib->ra) &&
adapter->recvpriv.signal_strength = adapter->recvpriv.signal_strength_dbg;
adapter->recvpriv.rssi = (s8)translate_percentage_to_dbm((u8)adapter->recvpriv.signal_strength_dbg);
} else {
-
if (recvpriv->signal_strength_data.update_req == 0) {/* update_req is clear, means we got rx */
avg_signal_strength = recvpriv->signal_strength_data.avg_val;
num_signal_strength = recvpriv->signal_strength_data.total_num;
set_timer:
rtw_set_signal_stat_timer(recvpriv);
-
}