mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-29 08:27:41 +00:00
Do not place signal strength into radiotap header if this information is not available
This commit is contained in:
parent
621f9a4ff9
commit
bc5369d4b3
@ -4007,7 +4007,7 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
||||
rtap_hdr = (struct ieee80211_radiotap_header *)&hdr_buf[0];
|
||||
rtap_hdr->it_version = PKTHDR_RADIOTAP_VERSION;
|
||||
|
||||
if(pHalData->NumTotalRFPath>0) {
|
||||
if(pHalData->NumTotalRFPath>0 && pattrib->physt) {
|
||||
rtap_hdr->it_present |= (1<<IEEE80211_RADIOTAP_EXT) |
|
||||
(1<<IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE);
|
||||
|
||||
@ -4109,6 +4109,7 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
||||
memcpy(&hdr_buf[rt_len], &tmp_16bit, 2);
|
||||
rt_len += 2;
|
||||
|
||||
if(pattrib->physt) {
|
||||
/* dBm Antenna Signal */
|
||||
rtap_hdr->it_present |= (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL);
|
||||
hdr_buf[rt_len] = pattrib->phy_info.RecvSignalPower;
|
||||
@ -4122,6 +4123,8 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
||||
#endif
|
||||
|
||||
rt_len++; // alignment
|
||||
}
|
||||
|
||||
/* Signal Quality */
|
||||
rtap_hdr->it_present |= (1 << IEEE80211_RADIOTAP_LOCK_QUALITY);
|
||||
tmp_16bit = cpu_to_le16(pattrib->phy_info.SignalQuality);
|
||||
@ -4240,13 +4243,14 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
|
||||
rt_len += 2;
|
||||
}
|
||||
|
||||
if (pattrib->physt) {
|
||||
for(i=0; i<pHalData->NumTotalRFPath; i++) {
|
||||
hdr_buf[rt_len] = pattrib->phy_info.RxPwr[i];
|
||||
rt_len ++;
|
||||
hdr_buf[rt_len] = i;
|
||||
rt_len ++;
|
||||
}
|
||||
|
||||
}
|
||||
/* push to skb */
|
||||
pskb = (_pkt *)buf;
|
||||
if (skb_headroom(pskb) < rt_len) {
|
||||
|
Loading…
Reference in New Issue
Block a user