diff options
author | Ivan Safonov <insafonov@gmail.com> | 2017-02-06 20:23:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-09 13:22:09 +0100 |
commit | df47a14c2c8b5a1eb06a6de5cefdafd6bcef4272 (patch) | |
tree | 8c327fccb630d537f85cae5e4c56dc19cc070dfc /drivers/staging/rtl8188eu/os_dep | |
parent | e038e67f0891b5fddffd779c20f32a7c59288170 (diff) | |
download | op-kernel-dev-df47a14c2c8b5a1eb06a6de5cefdafd6bcef4272.zip op-kernel-dev-df47a14c2c8b5a1eb06a6de5cefdafd6bcef4272.tar.gz |
staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)()
recv_frame->rx_(data|len|tail) duplicate pkt (skb) data|len|tail members
and require special functions recvframe_(put|pull|pull_tail)()
instead of skb_(put|pull|trim).
Replace rx_(data|len|tail) with pkt->(data|len|tail),
remove rx_(data|len|tail) and remove recvframe_(put|pull|pull_tail)().
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/os_dep')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/mon.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/recv_linux.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 12 |
3 files changed, 6 insertions, 16 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/mon.c b/drivers/staging/rtl8188eu/os_dep/mon.c index c9c9821..cfe37eb 100644 --- a/drivers/staging/rtl8188eu/os_dep/mon.c +++ b/drivers/staging/rtl8188eu/os_dep/mon.c @@ -92,8 +92,8 @@ void rtl88eu_mon_recv_hook(struct net_device *dev, struct recv_frame *frame) return; attr = &frame->attrib; - data = frame->rx_data; - data_len = frame->len; + data = frame->pkt->data; + data_len = frame->pkt->len; /* Broadcast and multicast frames don't have attr->{iv,icv}_len set */ SET_ICE_IV_LEN(iv_len, icv_len, attr->encrypt); diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index df4bcef..d14bc2b 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -88,12 +88,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter, goto _recv_indicatepkt_drop; } - skb->data = precv_frame->rx_data; - - skb_set_tail_pointer(skb, precv_frame->len); - - skb->len = precv_frame->len; - if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { struct sk_buff *pskb2 = NULL; struct sta_info *psta = NULL; diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index cdb2fd3..64397b6 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -73,7 +73,6 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) } INIT_LIST_HEAD(&precvframe->list); - precvframe->len = 0; update_recvframe_attrib_88e(precvframe, prxstat); @@ -128,16 +127,13 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) skb_reserve(pkt_copy, 8 - ((size_t)(pkt_copy->data) & 7));/* force pkt_copy->data at 8-byte alignment address */ 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; + skb_put(precvframe->pkt, skb_len); } else { DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n"); rtw_free_recvframe(precvframe, pfree_recv_queue); goto _exit_recvbuf2recvframe; } - recvframe_put(precvframe, skb_len); - switch (haldata->UsbRxAggMode) { case USB_RX_AGG_DMA: case USB_RX_AGG_MIX: @@ -159,19 +155,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--; |