ath10k-firmware: remove dependency on kmod-ath10k so that it can be selected instead
[15.05/openwrt.git] / package / kernel / mac80211 / patches / 372-0006-brcmfmac-Fix-station-info-rate-information.patch
1 From: Hante Meuleman <meuleman@broadcom.com>
2 Date: Thu, 8 Oct 2015 20:33:16 +0200
3 Subject: [PATCH] brcmfmac: Fix station info rate information.
4
5 Txrate and rxrate in get_station got assigned first with value
6 in kbps and then divided by 100 to get it in 100kbps unit. The
7 problem with that is that type of rate is u16 which resulted
8 in incorrect values for high data rate values.
9
10 Reviewed-by: Arend Van Spriel <arend@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
12 Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
13 Signed-off-by: Arend van Spriel <arend@broadcom.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16
17 --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
18 +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
19 @@ -2477,13 +2477,13 @@ brcmf_cfg80211_get_station(struct wiphy
20                 sinfo->rx_packets += le32_to_cpu(sta_info_le.rx_mcast_pkts);
21                 if (sinfo->tx_packets) {
22                         sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
23 -                       sinfo->txrate.legacy = le32_to_cpu(sta_info_le.tx_rate);
24 -                       sinfo->txrate.legacy /= 100;
25 +                       sinfo->txrate.legacy =
26 +                               le32_to_cpu(sta_info_le.tx_rate) / 100;
27                 }
28                 if (sinfo->rx_packets) {
29                         sinfo->filled |= BIT(NL80211_STA_INFO_RX_BITRATE);
30 -                       sinfo->rxrate.legacy = le32_to_cpu(sta_info_le.rx_rate);
31 -                       sinfo->rxrate.legacy /= 100;
32 +                       sinfo->rxrate.legacy =
33 +                               le32_to_cpu(sta_info_le.rx_rate) / 100;
34                 }
35                 if (le16_to_cpu(sta_info_le.ver) >= 4) {
36                         sinfo->filled |= BIT(NL80211_STA_INFO_TX_BYTES);