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:
parent
2d29bdded9
commit
19890f07a4
@ -4411,6 +4411,7 @@ s32 rtw_monitor_xmit_entry(struct sk_buff *skb, struct net_device *ndev)
|
||||
struct xmit_frame *pmgntframe;
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct registry_priv *pregpriv = &(padapter->registrypriv);
|
||||
unsigned char *pframe;
|
||||
u8 dummybuf[32];
|
||||
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 */
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
|
||||
pattrib = &pmgntframe->attrib;
|
||||
|
||||
if (pregpriv->monitor_disable_1m) {
|
||||
|
||||
frame_ctl = le16_to_cpu(pwlanhdr->frame_ctl);
|
||||
if ((frame_ctl & RTW_IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) {
|
||||
|
||||
pattrib = &pmgntframe->attrib;
|
||||
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 {
|
||||
|
||||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
|
||||
pattrib->rate = MGN_1M;
|
||||
|
||||
pattrib->ldpc = _FALSE;
|
||||
pattrib->stbc = 0;
|
||||
|
||||
}
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->pktlen = len;
|
||||
|
@ -457,6 +457,8 @@ struct registry_priv {
|
||||
u8 tdmadig_mode;
|
||||
u8 tdmadig_dynamic;
|
||||
#endif/*CONFIG_TDMADIG*/
|
||||
|
||||
u8 monitor_disable_1m;
|
||||
};
|
||||
|
||||
/* For registry parameters */
|
||||
|
@ -72,6 +72,9 @@ int rtw_scan_mode = 1;/* active, passive */
|
||||
int rtw_lps_chk_by_tp = 0;
|
||||
#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_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;
|
||||
#endif
|
||||
|
||||
registry_par->monitor_disable_1m = (u8)rtw_monitor_disable_1m;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user