mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 20:43:40 +00:00
rtl8188eu: Fix build for kernel 3.20
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e8487f5809
commit
b3e44458db
1 changed files with 14 additions and 9 deletions
|
@ -1736,18 +1736,21 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
sinfo->filled |= STATION_INFO_SIGNAL;
|
//#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0))
|
||||||
|
// sinfo->filled |= STATION_INFO_SIGNAL;
|
||||||
|
// sinfo->filled |= STATION_INFO_TX_BITRATE;
|
||||||
|
// sinfo->filled |= STATION_INFO_RX_PACKETS;
|
||||||
|
// sinfo->filled |= STATION_INFO_TX_PACKETS;
|
||||||
|
//#else sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
|
||||||
|
sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
|
||||||
|
sinfo->filled |= BIT(NL80211_STA_INFO_RX_BYTES);
|
||||||
|
sinfo->filled |= BIT(NL80211_STA_INFO_TX_BYTES);
|
||||||
|
//#endif
|
||||||
|
|
||||||
sinfo->signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);
|
sinfo->signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);
|
||||||
|
|
||||||
sinfo->filled |= STATION_INFO_TX_BITRATE;
|
|
||||||
sinfo->txrate.legacy = rtw_get_cur_max_rate(padapter);
|
sinfo->txrate.legacy = rtw_get_cur_max_rate(padapter);
|
||||||
|
|
||||||
sinfo->filled |= STATION_INFO_RX_PACKETS;
|
|
||||||
sinfo->rx_packets = sta_rx_data_pkts(psta);
|
sinfo->rx_packets = sta_rx_data_pkts(psta);
|
||||||
|
|
||||||
sinfo->filled |= STATION_INFO_TX_PACKETS;
|
|
||||||
sinfo->tx_packets = psta->sta_stats.tx_pkts;
|
sinfo->tx_packets = psta->sta_stats.tx_pkts;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//for Ad-Hoc/AP mode
|
//for Ad-Hoc/AP mode
|
||||||
|
@ -3177,7 +3180,9 @@ void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, u8 *pmgmt_frame,
|
||||||
ie_offset = _REASOCREQ_IE_OFFSET_;
|
ie_offset = _REASOCREQ_IE_OFFSET_;
|
||||||
|
|
||||||
sinfo.filled = 0;
|
sinfo.filled = 0;
|
||||||
sinfo.filled = STATION_INFO_ASSOC_REQ_IES;
|
//#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0))
|
||||||
|
// sinfo.filled = STATION_INFO_ASSOC_REQ_IES;
|
||||||
|
//#endif
|
||||||
sinfo.assoc_req_ies = pmgmt_frame + WLAN_HDR_A3_LEN + ie_offset;
|
sinfo.assoc_req_ies = pmgmt_frame + WLAN_HDR_A3_LEN + ie_offset;
|
||||||
sinfo.assoc_req_ies_len = frame_len - WLAN_HDR_A3_LEN - ie_offset;
|
sinfo.assoc_req_ies_len = frame_len - WLAN_HDR_A3_LEN - ie_offset;
|
||||||
cfg80211_new_sta(ndev, GetAddr2Ptr(pmgmt_frame), &sinfo, GFP_ATOMIC);
|
cfg80211_new_sta(ndev, GetAddr2Ptr(pmgmt_frame), &sinfo, GFP_ATOMIC);
|
||||||
|
|
Loading…
Reference in a new issue