|
|
@ -1,6 +1,6 @@ |
|
|
|
--- a/include/net/mac80211.h
|
|
|
|
--- a/include/net/mac80211.h
|
|
|
|
+++ b/include/net/mac80211.h
|
|
|
|
+++ b/include/net/mac80211.h
|
|
|
|
@@ -816,6 +816,9 @@ enum mac80211_rx_flags {
|
|
|
|
@@ -839,6 +839,9 @@ enum mac80211_rx_flags {
|
|
|
|
* @signal: signal strength when receiving this frame, either in dBm, in dB or
|
|
|
|
* @signal: signal strength when receiving this frame, either in dBm, in dB or
|
|
|
|
* unspecified depending on the hardware capabilities flags
|
|
|
|
* unspecified depending on the hardware capabilities flags
|
|
|
|
* @IEEE80211_HW_SIGNAL_*
|
|
|
|
* @IEEE80211_HW_SIGNAL_*
|
|
|
@ -10,7 +10,7 @@ |
|
|
|
* @antenna: antenna used
|
|
|
|
* @antenna: antenna used
|
|
|
|
* @rate_idx: index of data rate into band's supported rates or MCS index if
|
|
|
|
* @rate_idx: index of data rate into band's supported rates or MCS index if
|
|
|
|
* HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
|
|
|
|
* HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
|
|
|
|
@@ -847,6 +850,8 @@ struct ieee80211_rx_status {
|
|
|
|
@@ -870,6 +873,8 @@ struct ieee80211_rx_status {
|
|
|
|
u8 band;
|
|
|
|
u8 band;
|
|
|
|
u8 antenna;
|
|
|
|
u8 antenna;
|
|
|
|
s8 signal;
|
|
|
|
s8 signal;
|
|
|
@ -21,7 +21,7 @@ |
|
|
|
u8 vendor_radiotap_oui[3];
|
|
|
|
u8 vendor_radiotap_oui[3];
|
|
|
|
--- a/net/mac80211/sta_info.h
|
|
|
|
--- a/net/mac80211/sta_info.h
|
|
|
|
+++ b/net/mac80211/sta_info.h
|
|
|
|
+++ b/net/mac80211/sta_info.h
|
|
|
|
@@ -335,6 +335,11 @@ struct sta_info {
|
|
|
|
@@ -342,6 +342,11 @@ struct sta_info {
|
|
|
|
int last_signal;
|
|
|
|
int last_signal;
|
|
|
|
struct ewma avg_signal;
|
|
|
|
struct ewma avg_signal;
|
|
|
|
int last_ack_signal;
|
|
|
|
int last_ack_signal;
|
|
|
@ -35,7 +35,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
--- a/net/mac80211/rx.c
|
|
|
|
--- a/net/mac80211/rx.c
|
|
|
|
+++ b/net/mac80211/rx.c
|
|
|
|
+++ b/net/mac80211/rx.c
|
|
|
|
@@ -1375,6 +1375,7 @@ ieee80211_rx_h_sta_process(struct ieee80
|
|
|
|
@@ -1383,6 +1383,7 @@ ieee80211_rx_h_sta_process(struct ieee80
|
|
|
|
struct sk_buff *skb = rx->skb;
|
|
|
|
struct sk_buff *skb = rx->skb;
|
|
|
|
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
|
|
|
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
|
|
|
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
|
|
|
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
|
|
@ -43,7 +43,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
if (!sta)
|
|
|
|
if (!sta)
|
|
|
|
return RX_CONTINUE;
|
|
|
|
return RX_CONTINUE;
|
|
|
|
@@ -1425,6 +1426,19 @@ ieee80211_rx_h_sta_process(struct ieee80
|
|
|
|
@@ -1433,6 +1434,19 @@ ieee80211_rx_h_sta_process(struct ieee80
|
|
|
|
ewma_add(&sta->avg_signal, -status->signal);
|
|
|
|
ewma_add(&sta->avg_signal, -status->signal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -65,7 +65,7 @@ |
|
|
|
* exchange sequence.
|
|
|
|
* exchange sequence.
|
|
|
|
--- a/net/mac80211/sta_info.c
|
|
|
|
--- a/net/mac80211/sta_info.c
|
|
|
|
+++ b/net/mac80211/sta_info.c
|
|
|
|
+++ b/net/mac80211/sta_info.c
|
|
|
|
@@ -356,6 +356,8 @@ struct sta_info *sta_info_alloc(struct i
|
|
|
|
@@ -353,6 +353,8 @@ struct sta_info *sta_info_alloc(struct i
|
|
|
|
do_posix_clock_monotonic_gettime(&uptime);
|
|
|
|
do_posix_clock_monotonic_gettime(&uptime);
|
|
|
|
sta->last_connected = uptime.tv_sec;
|
|
|
|
sta->last_connected = uptime.tv_sec;
|
|
|
|
ewma_init(&sta->avg_signal, 1024, 8);
|
|
|
|
ewma_init(&sta->avg_signal, 1024, 8);
|
|
|
@ -76,25 +76,25 @@ |
|
|
|
kfree(sta);
|
|
|
|
kfree(sta);
|
|
|
|
--- a/include/net/cfg80211.h
|
|
|
|
--- a/include/net/cfg80211.h
|
|
|
|
+++ b/include/net/cfg80211.h
|
|
|
|
+++ b/include/net/cfg80211.h
|
|
|
|
@@ -653,6 +653,8 @@ struct station_parameters {
|
|
|
|
@@ -721,6 +721,8 @@ struct station_parameters {
|
|
|
|
* @STATION_INFO_STA_FLAGS: @sta_flags filled
|
|
|
|
* @STATION_INFO_LOCAL_PM: @local_pm filled
|
|
|
|
* @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled
|
|
|
|
* @STATION_INFO_PEER_PM: @peer_pm filled
|
|
|
|
* @STATION_INFO_T_OFFSET: @t_offset filled
|
|
|
|
* @STATION_INFO_NONPEER_PM: @nonpeer_pm filled
|
|
|
|
+ * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled
|
|
|
|
+ * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled
|
|
|
|
+ * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled
|
|
|
|
+ * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
enum station_info_flags {
|
|
|
|
enum station_info_flags {
|
|
|
|
STATION_INFO_INACTIVE_TIME = 1<<0,
|
|
|
|
STATION_INFO_INACTIVE_TIME = 1<<0,
|
|
|
|
@@ -676,6 +678,8 @@ enum station_info_flags {
|
|
|
|
@@ -749,6 +751,8 @@ enum station_info_flags {
|
|
|
|
STATION_INFO_STA_FLAGS = 1<<18,
|
|
|
|
STATION_INFO_NONPEER_PM = 1<<23,
|
|
|
|
STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
|
|
|
|
STATION_INFO_RX_BYTES64 = 1<<24,
|
|
|
|
STATION_INFO_T_OFFSET = 1<<20,
|
|
|
|
STATION_INFO_TX_BYTES64 = 1<<25,
|
|
|
|
+ STATION_INFO_CHAIN_SIGNAL = 1<<21,
|
|
|
|
+ STATION_INFO_CHAIN_SIGNAL = 1<<26,
|
|
|
|
+ STATION_INFO_CHAIN_SIGNAL_AVG = 1<<22,
|
|
|
|
+ STATION_INFO_CHAIN_SIGNAL_AVG = 1<<27,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@@ -769,6 +773,9 @@ struct sta_bss_parameters {
|
|
|
|
@@ -842,6 +846,9 @@ struct sta_bss_parameters {
|
|
|
|
* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
|
|
|
|
* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
|
|
|
|
* @signal_avg: Average signal strength, type depends on the wiphy's signal_type.
|
|
|
|
* @signal_avg: Average signal strength, type depends on the wiphy's signal_type.
|
|
|
|
* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
|
|
|
|
* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
|
|
|
@ -104,7 +104,7 @@ |
|
|
|
* @txrate: current unicast bitrate from this station
|
|
|
|
* @txrate: current unicast bitrate from this station
|
|
|
|
* @rxrate: current unicast bitrate to this station
|
|
|
|
* @rxrate: current unicast bitrate to this station
|
|
|
|
* @rx_packets: packets received from this station
|
|
|
|
* @rx_packets: packets received from this station
|
|
|
|
@@ -801,6 +808,11 @@ struct station_info {
|
|
|
|
@@ -877,6 +884,11 @@ struct station_info {
|
|
|
|
u8 plink_state;
|
|
|
|
u8 plink_state;
|
|
|
|
s8 signal;
|
|
|
|
s8 signal;
|
|
|
|
s8 signal_avg;
|
|
|
|
s8 signal_avg;
|
|
|
@ -135,7 +135,7 @@ |
|
|
|
u8 rs_num_delims;
|
|
|
|
u8 rs_num_delims;
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
|
|
|
@@ -936,6 +936,7 @@ static int ath9k_rx_skb_preprocess(struc
|
|
|
|
@@ -937,6 +937,7 @@ static int ath9k_rx_skb_preprocess(struc
|
|
|
|
bool *decrypt_error)
|
|
|
|
bool *decrypt_error)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct ath_hw *ah = common->ah;
|
|
|
|
struct ath_hw *ah = common->ah;
|
|
|
@ -143,7 +143,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* everything but the rate is checked here, the rate check is done
|
|
|
|
* everything but the rate is checked here, the rate check is done
|
|
|
|
@@ -961,6 +962,20 @@ static int ath9k_rx_skb_preprocess(struc
|
|
|
|
@@ -962,6 +963,20 @@ static int ath9k_rx_skb_preprocess(struc
|
|
|
|
if (rx_stats->rs_moreaggr)
|
|
|
|
if (rx_stats->rs_moreaggr)
|
|
|
|
rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
|
|
|
|
rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
|
|
|
|
|
|
|
|
|
|
|
@ -164,6 +164,15 @@ |
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1070,7 +1085,7 @@ static int ath_process_fft(struct ath_so
|
|
|
|
|
|
|
|
fft_sample.tlv.length = __cpu_to_be16(length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fft_sample.freq = __cpu_to_be16(ah->curchan->chan->center_freq);
|
|
|
|
|
|
|
|
- fft_sample.rssi = fix_rssi_inv_only(rs->rs_rssi_ctl0);
|
|
|
|
|
|
|
|
+ fft_sample.rssi = fix_rssi_inv_only(rs->rs_rssi_ctl[0]);
|
|
|
|
|
|
|
|
fft_sample.noise = ah->noise;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (len - SPECTRAL_HT20_TOTAL_DATA_LEN) {
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
|
|
|
@@ -475,12 +475,12 @@ int ath9k_hw_process_rxdesc_edma(struct
|
|
|
|
@@ -475,12 +475,12 @@ int ath9k_hw_process_rxdesc_edma(struct
|
|
|
@ -227,7 +236,7 @@ |
|
|
|
if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
|
|
|
|
if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
@@ -938,12 +938,12 @@ void ath_debug_stat_rx(struct ath_softc
|
|
|
|
@@ -940,12 +940,12 @@ void ath_debug_stat_rx(struct ath_softc
|
|
|
|
#ifdef CONFIG_ATH9K_MAC_DEBUG
|
|
|
|
#ifdef CONFIG_ATH9K_MAC_DEBUG
|
|
|
|
spin_lock(&sc->debug.samp_lock);
|
|
|
|
spin_lock(&sc->debug.samp_lock);
|
|
|
|
RX_SAMP_DBG(jiffies) = jiffies;
|
|
|
|
RX_SAMP_DBG(jiffies) = jiffies;
|
|
|
@ -248,19 +257,19 @@ |
|
|
|
RX_SAMP_DBG(rate) = rs->rs_rate;
|
|
|
|
RX_SAMP_DBG(rate) = rs->rs_rate;
|
|
|
|
--- a/include/uapi/linux/nl80211.h
|
|
|
|
--- a/include/uapi/linux/nl80211.h
|
|
|
|
+++ b/include/uapi/linux/nl80211.h
|
|
|
|
+++ b/include/uapi/linux/nl80211.h
|
|
|
|
@@ -1838,6 +1838,8 @@ enum nl80211_sta_bss_param {
|
|
|
|
@@ -1918,6 +1918,8 @@ enum nl80211_sta_bss_param {
|
|
|
|
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
|
|
|
|
* @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
|
|
|
|
* @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
|
|
|
|
* @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
|
|
|
|
* @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
|
|
|
|
* non-peer STA
|
|
|
|
+ * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
|
|
|
|
+ * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
|
|
|
|
+ * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
|
|
|
|
+ * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
|
|
|
|
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
|
|
|
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
|
|
|
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
|
|
|
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@@ -1862,6 +1864,8 @@ enum nl80211_sta_info {
|
|
|
|
@@ -1947,6 +1949,8 @@ enum nl80211_sta_info {
|
|
|
|
NL80211_STA_INFO_STA_FLAGS,
|
|
|
|
NL80211_STA_INFO_NONPEER_PM,
|
|
|
|
NL80211_STA_INFO_BEACON_LOSS,
|
|
|
|
NL80211_STA_INFO_RX_BYTES64,
|
|
|
|
NL80211_STA_INFO_T_OFFSET,
|
|
|
|
NL80211_STA_INFO_TX_BYTES64,
|
|
|
|
+ NL80211_STA_INFO_CHAIN_SIGNAL,
|
|
|
|
+ NL80211_STA_INFO_CHAIN_SIGNAL,
|
|
|
|
+ NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
|
|
|
|
+ NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
|
|
|
|
|
|
|
|
|
|
|
@ -268,7 +277,7 @@ |
|
|
|
__NL80211_STA_INFO_AFTER_LAST,
|
|
|
|
__NL80211_STA_INFO_AFTER_LAST,
|
|
|
|
--- a/net/wireless/nl80211.c
|
|
|
|
--- a/net/wireless/nl80211.c
|
|
|
|
+++ b/net/wireless/nl80211.c
|
|
|
|
+++ b/net/wireless/nl80211.c
|
|
|
|
@@ -2910,6 +2910,32 @@ static bool nl80211_put_sta_rate(struct
|
|
|
|
@@ -3082,6 +3082,32 @@ static bool nl80211_put_sta_rate(struct
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -301,7 +310,7 @@ |
|
|
|
static int nl80211_send_station(struct sk_buff *msg, u32 portid, u32 seq,
|
|
|
|
static int nl80211_send_station(struct sk_buff *msg, u32 portid, u32 seq,
|
|
|
|
int flags,
|
|
|
|
int flags,
|
|
|
|
struct cfg80211_registered_device *rdev,
|
|
|
|
struct cfg80211_registered_device *rdev,
|
|
|
|
@@ -2971,6 +2997,18 @@ static int nl80211_send_station(struct s
|
|
|
|
@@ -3153,6 +3179,18 @@ static int nl80211_send_station(struct s
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -322,7 +331,7 @@ |
|
|
|
NL80211_STA_INFO_TX_BITRATE))
|
|
|
|
NL80211_STA_INFO_TX_BITRATE))
|
|
|
|
--- a/net/mac80211/cfg.c
|
|
|
|
--- a/net/mac80211/cfg.c
|
|
|
|
+++ b/net/mac80211/cfg.c
|
|
|
|
+++ b/net/mac80211/cfg.c
|
|
|
|
@@ -435,6 +435,7 @@ static void sta_set_sinfo(struct sta_inf
|
|
|
|
@@ -445,6 +445,7 @@ static void sta_set_sinfo(struct sta_inf
|
|
|
|
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
|
|
|
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
|
|
|
struct ieee80211_local *local = sdata->local;
|
|
|
|
struct ieee80211_local *local = sdata->local;
|
|
|
|
struct timespec uptime;
|
|
|
|
struct timespec uptime;
|
|
|
@ -330,7 +339,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
sinfo->generation = sdata->local->sta_generation;
|
|
|
|
sinfo->generation = sdata->local->sta_generation;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -474,6 +475,17 @@ static void sta_set_sinfo(struct sta_inf
|
|
|
|
@@ -484,6 +485,17 @@ static void sta_set_sinfo(struct sta_inf
|
|
|
|
sinfo->signal = (s8)sta->last_signal;
|
|
|
|
sinfo->signal = (s8)sta->last_signal;
|
|
|
|
sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
|
|
|
|
sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|