[PATCH 18/37] staging:r8188eu: remove rx_data member of recv_frame structure

From: Ivan Safonov
Date: Wed Oct 19 2016 - 11:21:21 EST


rx_data replaced with pkt->data.

Signed-off-by: Ivan Safonov <insafonov@xxxxxxxxx>
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 38 ++++++++---------
drivers/staging/rtl8188eu/core/rtw_recv.c | 54 ++++++++++++------------
drivers/staging/rtl8188eu/core/rtw_security.c | 6 +--
drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +-
drivers/staging/rtl8188eu/include/rtw_recv.h | 14 +++---
drivers/staging/rtl8188eu/os_dep/mon.c | 2 +-
drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 +--
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 7 ++-
8 files changed, 62 insertions(+), 67 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 0bb24fa..26639f0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -2050,7 +2050,7 @@ static u8 collect_bss_info(struct adapter *padapter,
u32 len;
u8 *p;
u16 val16, subtype;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
u32 packet_len = precv_frame->len;
u8 ie_offset;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
@@ -2557,7 +2557,7 @@ static unsigned int OnProbeReq(struct adapter *padapter,
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *cur = &(pmlmeinfo->network);
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
uint len = precv_frame->len;

if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
@@ -2605,7 +2605,7 @@ static unsigned int OnBeacon(struct adapter *padapter,
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_priv *pstapriv = &padapter->stapriv;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
uint len = precv_frame->len;
struct wlan_bssid_ex *pbss;
int ret = _SUCCESS;
@@ -2702,7 +2702,7 @@ static unsigned int OnAuth(struct adapter *padapter,
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
uint len = precv_frame->len;

if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
@@ -2865,7 +2865,7 @@ static unsigned int OnAuthClient(struct adapter *padapter,
unsigned int go2asoc = 0;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
uint pkt_len = precv_frame->len;

DBG_88E("%s\n", __func__);
@@ -2953,7 +2953,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *cur = &(pmlmeinfo->network);
struct sta_priv *pstapriv = &padapter->stapriv;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
uint pkt_len = precv_frame->len;

if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
@@ -3385,7 +3385,7 @@ static unsigned int OnAssocRsp(struct adapter *padapter,
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
/* struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); */
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
uint pkt_len = precv_frame->len;

DBG_88E("%s\n", __func__);
@@ -3471,7 +3471,7 @@ static unsigned int OnDeAuth(struct adapter *padapter,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);

/* check A3 */
@@ -3526,7 +3526,7 @@ static unsigned int OnDisassoc(struct adapter *padapter,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);

/* check A3 */
@@ -3585,7 +3585,7 @@ static unsigned int on_action_spct(struct adapter *padapter,
{
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
u8 category;
u8 action;
@@ -3641,7 +3641,7 @@ static unsigned int OnAction_back(struct adapter *padapter,
unsigned short tid, status, reason_code = 0;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
struct sta_priv *pstapriv = &padapter->stapriv;
/* check RA matches or not */
if (memcmp(myid(&(padapter->eeprompriv)), GetAddr1Ptr(pframe),
@@ -3714,7 +3714,7 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
{
struct adapter *adapter = recv_frame->adapter;
struct mlme_ext_priv *mlmeext = &(adapter->mlmeextpriv);
- u8 *frame = recv_frame->rx_data;
+ u8 *frame = recv_frame->pkt->data;
u16 seq_ctrl = ((recv_frame->attrib.seq_num&0xffff) << 4) |
(recv_frame->attrib.frag_num & 0xf);

@@ -3744,7 +3744,7 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)

static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
{
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
u8 *frame_body;
u8 dialogToken = 0;
frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));
@@ -3760,7 +3760,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
static unsigned int on_action_public_vendor(struct recv_frame *precv_frame)
{
unsigned int ret = _FAIL;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);

if (!memcmp(frame_body + 2, P2P_OUI, 4))
@@ -3772,7 +3772,7 @@ static unsigned int on_action_public_vendor(struct recv_frame *precv_frame)
static unsigned int on_action_public_default(struct recv_frame *precv_frame, u8 action)
{
unsigned int ret = _FAIL;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
u8 token;

@@ -3791,7 +3791,7 @@ static unsigned int on_action_public(struct adapter *padapter,
struct recv_frame *precv_frame)
{
unsigned int ret = _FAIL;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
u8 category, action;

@@ -3862,7 +3862,7 @@ static unsigned int OnAction(struct adapter *padapter,
unsigned char category;
struct action_handler *ptable;
unsigned char *frame_body;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;

frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr));

@@ -4119,7 +4119,7 @@ void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
static void _mgt_dispatcher(struct adapter *padapter, struct mlme_handler *ptable, struct recv_frame *precv_frame)
{
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;

if (ptable->func) {
/* receive the frames that ra(a1) is my address or ra(a1) is bc address. */
@@ -4138,7 +4138,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
#endif /* CONFIG_88EU_AP_MODE */
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;
struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));

RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 9333535..a210a43 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -263,7 +263,7 @@ static int recvframe_chkmic(struct adapter *adapter,
/* icv_len included the mic code */
datalen = precvframe->len-prxattrib->hdrlen -
prxattrib->iv_len-prxattrib->icv_len-8;
- pframe = precvframe->rx_data;
+ pframe = precvframe->pkt->data;
payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;

RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n prxattrib->iv_len=%d prxattrib->icv_len=%d\n", prxattrib->iv_len, prxattrib->icv_len));
@@ -303,14 +303,14 @@ static int recvframe_chkmic(struct adapter *adapter,
RT_TRACE(_module_rtl871x_recv_c_,
_drv_err_,
("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x",
- *(precvframe->rx_data+i),
- *(precvframe->rx_data+i+1),
- *(precvframe->rx_data+i+2),
- *(precvframe->rx_data+i+3),
- *(precvframe->rx_data+i+4),
- *(precvframe->rx_data+i+5),
- *(precvframe->rx_data+i+6),
- *(precvframe->rx_data+i+7)));
+ *(precvframe->pkt->data+i),
+ *(precvframe->pkt->data+i+1),
+ *(precvframe->pkt->data+i+2),
+ *(precvframe->pkt->data+i+3),
+ *(precvframe->pkt->data+i+4),
+ *(precvframe->pkt->data+i+5),
+ *(precvframe->pkt->data+i+6),
+ *(precvframe->pkt->data+i+7)));
}
RT_TRACE(_module_rtl871x_recv_c_,
_drv_err_,
@@ -372,7 +372,7 @@ static struct recv_frame *decryptor(struct adapter *padapter,
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("prxstat->decrypted=%x prxattrib->encrypt=0x%03x\n", prxattrib->bdecrypted, prxattrib->encrypt));

if (prxattrib->encrypt > 0) {
- u8 *iv = precv_frame->rx_data+prxattrib->hdrlen;
+ u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
prxattrib->key_index = (((iv[3])>>6)&0x3);

if (prxattrib->key_index > WEP_KEYS) {
@@ -440,7 +440,7 @@ static struct recv_frame *portctrl(struct adapter *adapter,

auth_alg = adapter->securitypriv.dot11AuthAlgrthm;

- ptr = precv_frame->rx_data;
+ ptr = precv_frame->pkt->data;
pfhdr = precv_frame;
pattrib = &pfhdr->attrib;
psta_addr = pattrib->ta;
@@ -529,7 +529,7 @@ static void process_pwrbit_data(struct adapter *padapter,
{
#ifdef CONFIG_88EU_AP_MODE
unsigned char pwrbit;
- u8 *ptr = precv_frame->rx_data;
+ u8 *ptr = precv_frame->pkt->data;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *psta = NULL;
@@ -726,7 +726,7 @@ static int ap2sta_data_frame(
struct recv_frame *precv_frame,
struct sta_info **psta)
{
- u8 *ptr = precv_frame->rx_data;
+ u8 *ptr = precv_frame->pkt->data;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
int ret = _SUCCESS;
struct sta_priv *pstapriv = &adapter->stapriv;
@@ -819,7 +819,7 @@ static int sta2ap_data_frame(struct adapter *adapter,
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
struct sta_priv *pstapriv = &adapter->stapriv;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
- u8 *ptr = precv_frame->rx_data;
+ u8 *ptr = precv_frame->pkt->data;
unsigned char *mybssid = get_bssid(pmlmepriv);
int ret = _SUCCESS;

@@ -875,7 +875,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
#ifdef CONFIG_88EU_AP_MODE
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
struct sta_priv *pstapriv = &padapter->stapriv;
- u8 *pframe = precv_frame->rx_data;
+ u8 *pframe = precv_frame->pkt->data;

if (GetFrameType(pframe) != WIFI_CTRL_TYPE)
return _FAIL;
@@ -1012,18 +1012,18 @@ static int validate_recv_mgnt_frame(struct adapter *padapter,

/* for rx pkt statistics */
psta = rtw_get_stainfo(&padapter->stapriv,
- GetAddr2Ptr(precv_frame->rx_data));
+ GetAddr2Ptr(precv_frame->pkt->data));
if (psta) {
psta->sta_stats.rx_mgnt_pkts++;
- if (GetFrameSubType(precv_frame->rx_data) == WIFI_BEACON) {
+ if (GetFrameSubType(precv_frame->pkt->data) == WIFI_BEACON) {
psta->sta_stats.rx_beacon_pkts++;
- } else if (GetFrameSubType(precv_frame->rx_data) == WIFI_PROBEREQ) {
+ } else if (GetFrameSubType(precv_frame->pkt->data) == WIFI_PROBEREQ) {
psta->sta_stats.rx_probereq_pkts++;
- } else if (GetFrameSubType(precv_frame->rx_data) == WIFI_PROBERSP) {
+ } else if (GetFrameSubType(precv_frame->pkt->data) == WIFI_PROBERSP) {
if (!memcmp(padapter->eeprompriv.mac_addr,
- GetAddr1Ptr(precv_frame->rx_data), ETH_ALEN))
+ GetAddr1Ptr(precv_frame->pkt->data), ETH_ALEN))
psta->sta_stats.rx_probersp_pkts++;
- else if (is_multicast_ether_addr(GetAddr1Ptr(precv_frame->rx_data)))
+ else if (is_multicast_ether_addr(GetAddr1Ptr(precv_frame->pkt->data)))
psta->sta_stats.rx_probersp_bm_pkts++;
else
psta->sta_stats.rx_probersp_uo_pkts++;
@@ -1041,7 +1041,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
u8 bretry;
u8 *psa, *pda, *pbssid;
struct sta_info *psta = NULL;
- u8 *ptr = precv_frame->rx_data;
+ u8 *ptr = precv_frame->pkt->data;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
struct security_priv *psecuritypriv = &adapter->securitypriv;
int ret = _SUCCESS;
@@ -1164,7 +1164,7 @@ static int validate_recv_frame(struct adapter *adapter,
int retval = _SUCCESS;
u8 bDumpRxPkt;
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
- u8 *ptr = precv_frame->rx_data;
+ u8 *ptr = precv_frame->pkt->data;
u8 ver = (unsigned char)(*ptr)&0x3;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;

@@ -1276,7 +1276,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
u8 *psnap_type;
struct ieee80211_snap_hdr *psnap;

- u8 *ptr = precvframe->rx_data;
+ u8 *ptr = precvframe->pkt->data;
struct rx_pkt_attrib *pattrib = &precvframe->attrib;

if (pattrib->encrypt)
@@ -1381,7 +1381,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
recvframe_pull_tail(prframe, pfhdr->attrib.icv_len);

/* memcpy */
- memcpy(pfhdr->rx_tail, pnfhdr->rx_data, pnfhdr->len);
+ memcpy(pfhdr->rx_tail, pnfhdr->pkt->data, pnfhdr->len);

recvframe_put(prframe, pnfhdr->len);

@@ -1424,7 +1424,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter,
psta_addr = pfhdr->attrib.ta;
psta = rtw_get_stainfo(pstapriv, psta_addr);
if (psta == NULL) {
- u8 type = GetFrameType(pfhdr->rx_data);
+ u8 type = GetFrameType(pfhdr->pkt->data);
if (type != WIFI_DATA_TYPE) {
psta = rtw_get_bcmc_stainfo(padapter);
pdefrag_q = &psta->sta_recvpriv.defrag_q;
@@ -1518,7 +1518,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)

a_len = prframe->len;

- pdata = prframe->rx_data;
+ pdata = prframe->pkt->data;

while (a_len > ETH_HLEN) {
/* Offset 12 denote 2 mac address */
diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c
index 85bb441..d0d2f9a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -204,7 +204,7 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
struct security_priv *psecuritypriv = &padapter->securitypriv;


- pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data;
+ pframe = (unsigned char *)((struct recv_frame *)precvframe)->pkt->data;

/* start to decrypt recvframe */
if ((prxattrib->encrypt == _WEP40_) || (prxattrib->encrypt == _WEP104_)) {
@@ -652,7 +652,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
u32 res = _SUCCESS;


- pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data;
+ pframe = (unsigned char *)((struct recv_frame *)precvframe)->pkt->data;

/* 4 start to decrypt recvframe */
if (prxattrib->encrypt == _TKIP_) {
@@ -1452,7 +1452,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
struct rx_pkt_attrib *prxattrib = &((struct recv_frame *)precvframe)->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
u32 res = _SUCCESS;
- pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data;
+ pframe = (unsigned char *)((struct recv_frame *)precvframe)->pkt->data;
/* 4 start to encrypt each fragment */
if (prxattrib->encrypt == _AES_) {
stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
index fa2cfd5..d9fa290 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
@@ -150,7 +150,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe,
pkt_info.bPacketToSelf = false;
pkt_info.bPacketBeacon = false;

- wlanhdr = precvframe->rx_data;
+ wlanhdr = precvframe->pkt->data;

pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
!pattrib->icv_err && !pattrib->crc_err &&
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 143e637..e6cc3af 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -233,7 +233,6 @@ struct recv_frame {
struct adapter *adapter;
struct rx_pkt_attrib attrib;
uint len;
- u8 *rx_data;
u8 *rx_tail;
u8 *rx_end;
struct sta_info *psta;
@@ -264,16 +263,15 @@ static inline u8 *recvframe_pull(struct recv_frame *precvframe, uint sz)
/* used for extract sz bytes from rx_data, update rx_data and return
* the updated rx_data to the caller */

+ u8 *data;
+
if (precvframe == NULL)
return NULL;
- skb_pull(precvframe->pkt, sz);
- precvframe->rx_data += sz;
- if (precvframe->rx_data > precvframe->rx_tail) {
- precvframe->rx_data -= sz;
+ data = skb_pull(precvframe->pkt, sz);
+ if (!data)
return NULL;
- }
precvframe->len -= sz;
- return precvframe->rx_data;
+ return data;
}

static inline u8 *recvframe_put(struct recv_frame *precvframe, int sz)
@@ -306,7 +304,7 @@ static inline u8 *recvframe_pull_tail(struct recv_frame *precvframe, int sz)
if (precvframe == NULL)
return NULL;
precvframe->rx_tail -= sz;
- if (precvframe->rx_tail < precvframe->rx_data) {
+ if (precvframe->rx_tail < precvframe->pkt->data) {
precvframe->rx_tail += sz;
return NULL;
}
diff --git a/drivers/staging/rtl8188eu/os_dep/mon.c b/drivers/staging/rtl8188eu/os_dep/mon.c
index d976e5e..263c6d5 100644
--- a/drivers/staging/rtl8188eu/os_dep/mon.c
+++ b/drivers/staging/rtl8188eu/os_dep/mon.c
@@ -92,7 +92,7 @@ void rtl88eu_mon_recv_hook(struct net_device *dev, struct recv_frame *frame)
return;

attr = &frame->attrib;
- data = frame->rx_data;
+ data = frame->pkt->data;
data_len = frame->len;

/* Broadcast and multicast frames don't have attr->{iv,icv}_len set */
diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
index f6af89e..3c41c5e 100644
--- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c
@@ -91,15 +91,13 @@ int rtw_recv_indicatepkt(struct adapter *padapter,
RT_TRACE(_module_recv_osdep_c_, _drv_info_,
("rtw_recv_indicatepkt():skb != NULL !!!\n"));
RT_TRACE(_module_recv_osdep_c_, _drv_info_,
- ("rtw_recv_indicatepkt(): precv_frame->hdr.rx_data =%p\n",
- precv_frame->rx_data));
+ ("rtw_recv_indicatepkt(): precv_frame->pkt->rx_data =%p\n",
+ precv_frame->pkt->data));
RT_TRACE(_module_recv_osdep_c_, _drv_info_,
("precv_frame->hdr.rx_tail =%p precv_frame->rx_end =%p precv_frame->hdr.len =%d\n",
precv_frame->rx_tail, precv_frame->rx_end,
precv_frame->len));

- skb->data = precv_frame->rx_data;
-
skb_set_tail_pointer(skb, precv_frame->len);

skb->len = precv_frame->len;
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 62dec1e..8ed42e3 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -129,7 +129,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */
memcpy(pkt_copy->data, (pbuf + pattrib->drvinfo_sz + RXDESC_SIZE), skb_len);
precvframe->rx_tail = pkt_copy->data;
- precvframe->rx_data = pkt_copy->data;
} else {
DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n");
rtw_free_recvframe(precvframe, pfree_recv_queue);
@@ -159,19 +158,19 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
}
} else if (pattrib->pkt_rpt_type == TX_REPORT1) {
/* CCX-TXRPT ack for xmit mgmt frames. */
- handle_txrpt_ccx_88e(adapt, precvframe->rx_data);
+ handle_txrpt_ccx_88e(adapt, precvframe->pkt->data);
rtw_free_recvframe(precvframe, pfree_recv_queue);
} else if (pattrib->pkt_rpt_type == TX_REPORT2) {
ODM_RA_TxRPT2Handle_8188E(
&haldata->odmpriv,
- precvframe->rx_data,
+ precvframe->pkt->data,
pattrib->pkt_len,
pattrib->MacIDValidEntry[0],
pattrib->MacIDValidEntry[1]
);
rtw_free_recvframe(precvframe, pfree_recv_queue);
} else if (pattrib->pkt_rpt_type == HIS_REPORT) {
- interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data);
+ interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->pkt->data);
rtw_free_recvframe(precvframe, pfree_recv_queue);
}
pkt_cnt--;
--
2.7.3