staging: rtl8723au: Call xmit/recv handlers directly instead of via HAL wrappers
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 16 May 2014 08:04:18 +0000 (10:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 18:34:26 +0000 (11:34 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_recv.c
drivers/staging/rtl8723au/core/rtw_xmit.c
drivers/staging/rtl8723au/hal/hal_intf.c
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
drivers/staging/rtl8723au/hal/rtl8723au_xmit.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/include/hal_intf.h
drivers/staging/rtl8723au/include/rtl8723a_xmit.h

index 1172fe9362a8ceb291dbcccc881870ab184d15b3..3a9e1354b214f2ff246fe1b6975ccc4cb046ba83 100644 (file)
@@ -2329,7 +2329,7 @@ void dump_mgntframe23a(struct rtw_adapter *padapter,
            padapter->bDriverStopped == true)
                return;
 
-       rtw_hal_mgnt_xmit23a(padapter, pmgntframe);
+       rtl8723au_mgnt_xmit(padapter, pmgntframe);
 }
 
 s32 dump_mgntframe23a_and_wait(struct rtw_adapter *padapter,
@@ -2348,7 +2348,7 @@ s32 dump_mgntframe23a_and_wait(struct rtw_adapter *padapter,
        rtw_sctx_init23a(&sctx, timeout_ms);
        pxmitbuf->sctx = &sctx;
 
-       ret = rtw_hal_mgnt_xmit23a(padapter, pmgntframe);
+       ret = rtl8723au_mgnt_xmit(padapter, pmgntframe);
 
        if (ret == _SUCCESS)
                ret = rtw_sctx_wait23a(&sctx);
@@ -2375,9 +2375,8 @@ s32 dump_mgntframe23a_and_wait_ack23a(struct rtw_adapter *padapter,
        pxmitpriv->ack_tx = true;
 
        pmgntframe->ack_report = 1;
-       if (rtw_hal_mgnt_xmit23a(padapter, pmgntframe) == _SUCCESS) {
+       if (rtl8723au_mgnt_xmit(padapter, pmgntframe) == _SUCCESS)
                ret = rtw_ack_tx_wait23a(pxmitpriv, timeout_ms);
-       }
 
        pxmitpriv->ack_tx = false;
        mutex_unlock(&pxmitpriv->ack_tx_mutex);
@@ -6492,7 +6491,8 @@ u8 tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 
                                pxmitframe->attrib.qsel = 0x11;/* HIQ */
 
-                               rtw_hal_xmit23aframe_enqueue(padapter, pxmitframe);
+                               rtl8723au_hal_xmitframe_enqueue(padapter,
+                                                               pxmitframe);
                        }
 
                        /* spin_unlock_bh(&psta_bmc->sleep_q.lock); */
index 6d98531a9c3160600d53d452cd4093e53034c620..79a76d692df3affbb0c41deb072d9b0f8e84de9c 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/ieee80211.h>
 #include <wifi.h>
 #include <rtl8723a_recv.h>
+#include <rtl8723a_xmit.h>
 
 void rtw_signal_stat_timer_hdl23a(unsigned long data);
 
@@ -1178,7 +1179,8 @@ static int validate_recv_ctrl_frame(struct rtw_adapter *padapter,
 
                                /* DBG_8723A("handling ps-poll, q_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
 
-                               rtw_hal_xmit23aframe_enqueue(padapter, pxmitframe);
+                               rtl8723au_hal_xmitframe_enqueue(padapter,
+                                                               pxmitframe);
 
                                if (psta->sleepq_len == 0) {
                                        pstapriv->tim_bitmap &= ~CHKBIT(psta->aid);
index c6a6567ba6f257d6e9000ef4a5eddfd4e3da946c..05803c6c71fb56e7ca4eec3d65e62f343cb654a3 100644 (file)
@@ -20,6 +20,7 @@
 #include <osdep_intf.h>
 #include <linux/ip.h>
 #include <usb_ops.h>
+#include <rtl8723a_xmit.h>
 
 static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
 static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
@@ -1940,7 +1941,7 @@ int rtw_xmit23a(struct rtw_adapter *padapter, struct sk_buff *skb)
        spin_unlock_bh(&pxmitpriv->lock);
 #endif
 
-       if (rtw_hal_xmit23a(padapter, pxmitframe) == false)
+       if (rtl8723au_hal_xmit(padapter, pxmitframe) == false)
                return 1;
 
        return 0;
@@ -2212,7 +2213,7 @@ void wakeup_sta_to_xmit23a(struct rtw_adapter *padapter, struct sta_info *psta)
                }
 
                pxmitframe->attrib.triggered = 1;
-               rtw_hal_xmit23aframe_enqueue(padapter, pxmitframe);
+               rtl8723au_hal_xmitframe_enqueue(padapter, pxmitframe);
        }
 
        if (psta->sleepq_len == 0) {
@@ -2259,7 +2260,7 @@ void wakeup_sta_to_xmit23a(struct rtw_adapter *padapter, struct sta_info *psta)
                                pxmitframe->attrib.mdata = 0;
 
                        pxmitframe->attrib.triggered = 1;
-                       rtw_hal_xmit23aframe_enqueue(padapter, pxmitframe);
+                       rtl8723au_hal_xmitframe_enqueue(padapter, pxmitframe);
                }
                if (psta_bmc->sleepq_len == 0) {
                        pstapriv->tim_bitmap &= ~BIT(0);
@@ -2333,7 +2334,7 @@ void xmit_delivery_enabled_frames23a(struct rtw_adapter *padapter,
 
                pxmitframe->attrib.triggered = 1;
 
-               rtw_hal_xmit23aframe_enqueue(padapter, pxmitframe);
+               rtl8723au_hal_xmitframe_enqueue(padapter, pxmitframe);
 
                if ((psta->sleepq_ac_len == 0) && (!psta->has_legacy_ac) &&
                    (wmmps_ac)) {
index 7346f300574ce035ad8004ead3c49abf49554fd9..86d934afeb5a336b14384fa1cba60006f7908cc3 100644 (file)
@@ -71,30 +71,6 @@ void rtw_hal_disable_interrupt23a(struct rtw_adapter *padapter)
 
 }
 
-s32    rtw_hal_xmit23aframe_enqueue(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe)
-{
-       if (padapter->HalFunc.hal_xmitframe_enqueue)
-               return padapter->HalFunc.hal_xmitframe_enqueue(padapter, pxmitframe);
-
-       return false;
-}
-
-s32    rtw_hal_xmit23a(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe)
-{
-       if (padapter->HalFunc.hal_xmit)
-               return padapter->HalFunc.hal_xmit(padapter, pxmitframe);
-
-       return false;
-}
-
-s32    rtw_hal_mgnt_xmit23a(struct rtw_adapter *padapter, struct xmit_frame *pmgntframe)
-{
-       s32 ret = _FAIL;
-       if (padapter->HalFunc.mgnt_xmit)
-               ret = padapter->HalFunc.mgnt_xmit(padapter, pmgntframe);
-       return ret;
-}
-
 void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level)
 {
        struct rtw_adapter *padapter;
index ffd6b73eb6a89aa25272fc7f063cdf40ad0b36ee..e94557fc12cb1600013362e00080dc90084fb165 100644 (file)
@@ -578,7 +578,7 @@ static void SetFwRsvdPagePkt(struct rtw_adapter *padapter, bool bDLFinished)
        pattrib->pktlen = pattrib->last_txcmdsz = TotalPacketLen - TXDESC_OFFSET;
        memcpy(pmgntframe->buf_addr, ReservedPagePacket, TotalPacketLen);
 
-       rtw_hal_mgnt_xmit23a(padapter, pmgntframe);
+       rtl8723au_mgnt_xmit(padapter, pmgntframe);
 
        DBG_8723A("%s: Set RSVD page location to Fw\n", __FUNCTION__);
        FillH2CCmd(padapter, RSVD_PAGE_EID, sizeof(RsvdPageLoc), (u8 *)&RsvdPageLoc);
@@ -737,7 +737,7 @@ static void SetFwRsvdPagePkt_BTCoex(struct rtw_adapter *padapter)
        pattrib->pktlen = pattrib->last_txcmdsz = TotalPacketLen - TXDESC_OFFSET;
        memcpy(pmgntframe->buf_addr, ReservedPagePacket, TotalPacketLen);
 
-       rtw_hal_mgnt_xmit23a(padapter, pmgntframe);
+       rtl8723au_mgnt_xmit(padapter, pmgntframe);
 
        DBG_8723A("%s: Set RSVD page location to Fw\n", __FUNCTION__);
        FillH2CCmd(padapter, RSVD_PAGE_EID, sizeof(RsvdPageLoc), (u8 *)&RsvdPageLoc);
index da6bda04956760675845bf30556ea557fbc17daf..3926ad1c353dc6d0ffd39fbe6f12d988ac712af4 100644 (file)
@@ -428,9 +428,10 @@ static s32 xmitframe_direct(struct rtw_adapter *padapter, struct xmit_frame *pxm
  *     true    dump packet directly
  *     false   enqueue packet
  */
-static s32 pre_xmitframe(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe)
+bool rtl8723au_hal_xmit(struct rtw_adapter *padapter,
+                       struct xmit_frame *pxmitframe)
 {
-       s32 res;
+       int res;
        struct xmit_buf *pxmitbuf = NULL;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct pkt_attrib *pattrib = &pxmitframe->attrib;
@@ -504,16 +505,6 @@ s32 rtl8723au_mgnt_xmit(struct rtw_adapter *padapter, struct xmit_frame *pmgntfr
        return rtw_dump_xframe(padapter, pmgntframe);
 }
 
-/*
- * Return
- *     true    dump packet directly ok
- *     false   temporary can't transmit packets to hardware
- */
-s32 rtl8723au_hal_xmit(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe)
-{
-       return pre_xmitframe(padapter, pxmitframe);
-}
-
 s32    rtl8723au_hal_xmitframe_enqueue(struct rtw_adapter *padapter,
                                        struct xmit_frame *pxmitframe)
 {
index 3ed766bea5cdd7f5d742eb2d7daf7f8e1df1c649..60eed82445d766833a56699325b9a82e9be94ab7 100644 (file)
@@ -1779,8 +1779,5 @@ int rtl8723au_set_hal_ops(struct rtw_adapter *padapter)
        pHalFunc->GetHalDefVarHandler = &GetHalDefVar8192CUsb;
        pHalFunc->SetHalDefVarHandler = &SetHalDefVar8192CUsb;
        pHalFunc->UpdateRAMaskHandler = &UpdateHalRAMask8192CUsb;
-       pHalFunc->hal_xmit = &rtl8723au_hal_xmit;
-       pHalFunc->mgnt_xmit = &rtl8723au_mgnt_xmit;
-       pHalFunc->hal_xmitframe_enqueue = &rtl8723au_hal_xmitframe_enqueue;
        return 0;
 }
index 114063adc17eed94e4226bdf84eadf25df6553e4..8e44b88a3fc4b273c73cff795577f89a95bdf54f 100644 (file)
@@ -79,13 +79,6 @@ struct hal_ops {
 
        void (*UpdateRAMaskHandler)(struct rtw_adapter *padapter,
                                    u32 mac_id, u8 rssi_level);
-
-       s32 (*hal_xmit)(struct rtw_adapter *padapter,
-                       struct xmit_frame *pxmitframe);
-       s32 (*mgnt_xmit)(struct rtw_adapter *padapter,
-                        struct xmit_frame *pmgntframe);
-       s32 (*hal_xmitframe_enqueue)(struct rtw_adapter *padapter,
-                                    struct xmit_frame *pxmitframe);
 };
 
 enum rt_eeprom_type {
@@ -149,13 +142,6 @@ u8 rtw_hal_get_def_var23a(struct rtw_adapter *padapter,
 void rtw_hal_enable_interrupt23a(struct rtw_adapter *padapter);
 void rtw_hal_disable_interrupt23a(struct rtw_adapter *padapter);
 
-s32 rtw_hal_xmit23aframe_enqueue(struct rtw_adapter *padapter,
-                                struct xmit_frame *pxmitframe);
-s32 rtw_hal_xmit23a(struct rtw_adapter *padapter,
-                   struct xmit_frame *pxmitframe);
-s32 rtw_hal_mgnt_xmit23a(struct rtw_adapter *padapter,
-                        struct xmit_frame *pmgntframe);
-
 void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level);
 void   rtw_hal_clone_data(struct rtw_adapter *dst_padapter, struct rtw_adapter *src_padapter);
 
index 9b8438736b48cfb88158bc64556b835ae6c96fbe..ab9ca349b6f4388311de7a4f23e94ba076e49f24 100644 (file)
@@ -216,10 +216,10 @@ void handle_txrpt_ccx_8723a(struct rtw_adapter *adapter, void *buf);
 void rtl8723a_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem);
 void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
 
-s32    rtl8723au_hal_xmitframe_enqueue(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);
+int rtl8723au_hal_xmitframe_enqueue(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);
 s32 rtl8723au_xmit_buf_handler(struct rtw_adapter *padapter);
 #define hal_xmit_handler rtl8723au_xmit_buf_handler
-s32 rtl8723au_hal_xmit(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);
+bool rtl8723au_hal_xmit(struct rtw_adapter *padapter, struct xmit_frame *pxmitframe);
 s32 rtl8723au_mgnt_xmit(struct rtw_adapter *padapter, struct xmit_frame *pmgntframe);
 s32 rtl8723au_xmitframe_complete(struct rtw_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);