1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 13:24:36 +00:00

Restore 1mbps by default

This commit is contained in:
kimocoder 2020-02-01 07:13:55 +01:00
parent 2d29bdded9
commit 19890f07a4
3 changed files with 25 additions and 7 deletions

View File

@ -4411,6 +4411,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct registry_priv *pregpriv = &(padapter->registrypriv);
unsigned char *pframe; unsigned char *pframe;
u8 dummybuf[32]; u8 dummybuf[32];
int len = skb->len, rtap_len, consume; int len = skb->len, rtap_len, consume;
@ -4462,20 +4463,30 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
/* Check DATA/MGNT frames */ /* Check DATA/MGNT frames */
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
frame_ctl = le16_to_cpu(pwlanhdr->frame_ctl); pattrib = &pmgntframe->attrib;
if ((frame_ctl & RTW_IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) {
pattrib = &pmgntframe->attrib; if (pregpriv->monitor_disable_1m) {
update_monitor_frame_attrib(padapter, pattrib);
if (is_broadcast_mac_addr(pwlanhdr->addr3) || is_broadcast_mac_addr(pwlanhdr->addr1)) frame_ctl = le16_to_cpu(pwlanhdr->frame_ctl);
pattrib->rate = MGN_24M; if ((frame_ctl & RTW_IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) {
update_monitor_frame_attrib(padapter, pattrib);
if (is_broadcast_mac_addr(pwlanhdr->addr3) || is_broadcast_mac_addr(pwlanhdr->addr1))
pattrib->rate = MGN_24M;
} else {
update_mgntframe_attrib(padapter, pattrib);
}
} else { } else {
pattrib = &pmgntframe->attrib;
update_mgntframe_attrib(padapter, pattrib); update_mgntframe_attrib(padapter, pattrib);
pattrib->rate = MGN_1M;
pattrib->ldpc = _FALSE;
pattrib->stbc = 0;
} }
pattrib->retry_ctrl = _FALSE; pattrib->retry_ctrl = _FALSE;
pattrib->pktlen = len; pattrib->pktlen = len;

View File

@ -457,6 +457,8 @@ struct registry_priv {
u8 tdmadig_mode; u8 tdmadig_mode;
u8 tdmadig_dynamic; u8 tdmadig_dynamic;
#endif/*CONFIG_TDMADIG*/ #endif/*CONFIG_TDMADIG*/
u8 monitor_disable_1m;
}; };
/* For registry parameters */ /* For registry parameters */

View File

@ -72,6 +72,9 @@ int rtw_scan_mode = 1;/* active, passive */
int rtw_lps_chk_by_tp = 0; int rtw_lps_chk_by_tp = 0;
#endif /* CONFIG_POWER_SAVING */ #endif /* CONFIG_POWER_SAVING */
int rtw_monitor_disable_1m = 0;
module_param(rtw_monitor_disable_1m, int, 0644);
MODULE_PARM_DESC(rtw_monitor_disable_1m, "Disable default 1Mbps rate for monitor injected frames");
module_param(rtw_ips_mode, int, 0644); module_param(rtw_ips_mode, int, 0644);
MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode"); MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
@ -1220,6 +1223,8 @@ uint loadparam(_adapter *padapter)
registry_par->fw_tbtt_rpt = rtw_tbtt_rpt; registry_par->fw_tbtt_rpt = rtw_tbtt_rpt;
#endif #endif
registry_par->monitor_disable_1m = (u8)rtw_monitor_disable_1m;
return status; return status;
} }