Commit 638443dc authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Call xmit/recv handlers directly instead of via HAL wrappers

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3d139a6
......@@ -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); */
......
......@@ -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);
......
......@@ -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)) {
......
......@@ -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;
......
......@@ -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);
......
......@@ -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)
{
......
......@@ -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;
}
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment