qcacld-3.0: Clean up enum station_info_flags for Kernel upgrade

Commit: 319090bf ("cfg80211: remove enum station_info_flags")

The station_info_flags is removed from cfg80211.h since Kernel 4.0.
Since they're duplicate information that's already in nl80211 attributes.

One more small change needed:
  * remove STATION_INFO_ASSOC_REQ_IES, nl80211 interface use the length
    (assoc_req_ies_len) to check the existence

Change-Id: I9ed324c097ac300c7233f439d71540176744e425
CRs-fixed: 961351
This commit is contained in:
Ryan Hsu 2016-01-18 12:08:22 -08:00 • committed by Vishwajith Upendra
commit e7bc3a73f6
2 changed files with 30 additions and 10 deletions

View file

@ -1405,7 +1405,15 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
(const u8 *)&pSapEvent->sapevt.
sapStationAssocReassocCompleteEvent.ies[0];
staInfo.assoc_req_ies_len = iesLen;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
/*
* After Kernel 4.0, it's no longer need to set
* STATION_INFO_ASSOC_REQ_IES flag, as it
* changed to use assoc_req_ies_len length to
* check the existance of request IE.
*/
staInfo.filled |= STATION_INFO_ASSOC_REQ_IES;
#endif
cfg80211_new_sta(dev,
(const u8 *)&pSapEvent->sapevt.
sapStationAssocReassocCompleteEvent.

View file

@ -1748,7 +1748,11 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
return status;
wlan_hdd_get_rssi(pAdapter, &sinfo->signal);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
sinfo->filled |= STATION_INFO_SIGNAL;
#else
sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
#endif
#ifdef WLAN_FEATURE_LPSS
if (!pAdapter->rssi_send) {
@ -2118,10 +2122,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
}
}
sinfo->filled |= STATION_INFO_TX_BITRATE;
sinfo->tx_bytes = pAdapter->stats.tx_bytes;
sinfo->filled |= STATION_INFO_TX_BYTES;
sinfo->tx_packets =
pAdapter->hdd_stats.summary_stat.tx_frm_cnt[0] +
@ -2141,15 +2142,26 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
pAdapter->hdd_stats.summary_stat.fail_cnt[2] +
pAdapter->hdd_stats.summary_stat.fail_cnt[3];
sinfo->filled |=
STATION_INFO_TX_PACKETS |
STATION_INFO_TX_RETRIES | STATION_INFO_TX_FAILED;
sinfo->rx_bytes = pAdapter->stats.rx_bytes;
sinfo->filled |= STATION_INFO_RX_BYTES;
sinfo->rx_packets = pAdapter->stats.rx_packets;
sinfo->filled |= STATION_INFO_RX_PACKETS;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
sinfo->filled |= STATION_INFO_TX_BITRATE |
STATION_INFO_TX_BYTES |
STATION_INFO_TX_PACKETS |
STATION_INFO_TX_RETRIES |
STATION_INFO_TX_FAILED |
STATION_INFO_RX_BYTES |
STATION_INFO_RX_PACKETS;
#else
sinfo->filled |= BIT(NL80211_STA_INFO_TX_BYTES) |
BIT(NL80211_STA_INFO_TX_BITRATE) |
BIT(NL80211_STA_INFO_TX_PACKETS) |
BIT(NL80211_STA_INFO_TX_RETRIES) |
BIT(NL80211_STA_INFO_TX_FAILED) |
BIT(NL80211_STA_INFO_RX_BYTES) |
BIT(NL80211_STA_INFO_RX_PACKETS);
#endif
if (rate_flags & eHAL_TX_RATE_LEGACY)
hddLog(LOG1, FL("Reporting legacy rate %d pkt cnt tx %d rx %d"),