1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-25 14:44:09 +00:00

Fix injection in the monitor mode

This commit is contained in:
Sergei Makarenkov 2017-02-09 22:12:44 +03:00
parent eba775e3bb
commit 320980de01
2 changed files with 9 additions and 2 deletions

View File

@ -839,6 +839,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv);
void rtw_alloc_hwxmits(_adapter *padapter);
void rtw_free_hwxmits(_adapter *padapter);
s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev);
s32 rtw_xmit(_adapter *padapter, _pkt **pkt);
bool xmitframe_hiq_filter(struct xmit_frame *xmitframe);

View File

@ -527,11 +527,17 @@ _func_exit_;
int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
{
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
int ret = 0;
if (pkt) {
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, pkt->truesize);
ret = _rtw_xmit_entry(pkt, pnetdev);
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) == _TRUE) {
rtw_monitor_xmit_entry((struct sk_buff*)pkt, pnetdev);
} else {
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, pkt->truesize);
ret = _rtw_xmit_entry(pkt, pnetdev);
}
}
return ret;