Adding ack signal support in station dump if the driver supports; also made changes to update
"last ack signal" and "avg ack signal" for both data and management tx ack packet.
Balaji Pothunoori (3):
cfg80211: Extend avg ack rssi support for mgmt frames
mac80211: Extend avg ack rssi support for mgmt frames
ath10k: management tx ack rssi capability check
drivers/net/wireless/ath/ath10k/mac.c | 5 +++--
include/uapi/linux/nl80211.h | 7 +++++++
net/mac80211/sta_info.c | 26 +++++++++++++-------------
net/wireless/nl80211.c | 7 ++++---
4 files changed, 27 insertions(+), 18 deletions(-)
--
v2 : Addressed Johannes comments
Modified subject and commit log
2.7.4
Adding WMI service check for management tx ack rssi support; this is
done to maintain common avg ack signal in user level for both data
and management tx ack packet.
Tested on QCA4019(fw version-10.4-3.2.1-00063).
Signed-off-by: Balaji Pothunoori <[email protected]>
---
Note: This patch depends on following patch
https://patchwork.kernel.org/patch/10343153/
drivers/net/wireless/ath/ath10k/mac.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 1ebd9c63..70d8489 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -8410,9 +8410,10 @@ int ath10k_mac_register(struct ath10k *ar)
wiphy_ext_feature_set(ar->hw->wiphy,
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
- if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map))
+ if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
+ test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
wiphy_ext_feature_set(ar->hw->wiphy,
- NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT);
+ NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT);
/*
* on LL hardware queues are managed entirely by the FW
--
2.7.4
Used defined API to make common average ack rssi
support irrespective of data or mamagement tx ack packet.
Signed-off-by: Balaji Pothunoori <[email protected]>
---
v2: Addressed Johannes comments
Modified subject and commit log
net/mac80211/sta_info.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index aa8fe77..1364f0b 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -2317,19 +2317,19 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
sinfo->expected_throughput = thr;
}
- if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL)) &&
- sta->status_stats.ack_signal_filled) {
- sinfo->ack_signal = sta->status_stats.last_ack_signal;
- sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
- }
-
- if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS) &&
- !(sinfo->filled & BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG))) {
- sinfo->avg_ack_signal =
- -(s8)ewma_avg_signal_read(
- &sta->status_stats.avg_ack_signal);
- sinfo->filled |=
- BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG);
+ if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS)) {
+ if (sta->status_stats.ack_signal_filled &&
+ (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL)) ||
+ !(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG)))) {
+ sinfo->ack_signal =
+ sta->status_stats.last_ack_signal;
+ sinfo->filled |=
+ BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
+ sinfo->avg_ack_signal =
+ -(s8)ewma_avg_signal_read(&sta->status_stats.avg_ack_signal);
+ sinfo->filled |=
+ BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG);
+ }
}
}
--
2.7.4
Defining APIs to update avg ack rssi irrespective of data or
mgmt tx ack packet; this patch keeps the original behavior
intact without breaking the existing API.
Signed-off-by: Balaji Pothunoori <[email protected]>
---
v2: Addressed Johannes comments
Modified subject and commit log
include/uapi/linux/nl80211.h | 7 +++++++
net/wireless/nl80211.c | 7 ++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f82ce3c..06f23db 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -52,6 +52,13 @@
#define NL80211_MULTICAST_GROUP_NAN "nan"
#define NL80211_MULTICAST_GROUP_TESTMODE "testmode"
+/*
+ * These APIs are defined to maintain average ack signal for both data and
+ * mgmt tx ack packets
+ */
+#define NL80211_STA_INFO_ACK_SIGNAL_AVG NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG
+#define NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT
+
/**
* DOC: Station handling
*
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0ccce33..a0ad39e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4723,10 +4723,11 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
PUT_SINFO_U64(RX_DROP_MISC, rx_dropped_misc);
PUT_SINFO_U64(BEACON_RX, rx_beacon);
PUT_SINFO(BEACON_SIGNAL_AVG, rx_beacon_signal_avg, u8);
- PUT_SINFO(ACK_SIGNAL, ack_signal, u8);
if (wiphy_ext_feature_isset(&rdev->wiphy,
- NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT))
- PUT_SINFO(DATA_ACK_SIGNAL_AVG, avg_ack_signal, s8);
+ NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT)) {
+ PUT_SINFO(ACK_SIGNAL, ack_signal, u8);
+ PUT_SINFO(ACK_SIGNAL_AVG, avg_ack_signal, s8);
+ }
#undef PUT_SINFO
#undef PUT_SINFO_U64
--
2.7.4
On Thu, 2018-07-19 at 18:56 +0530, Balaji Pothunoori wrote:
>
>
> - if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map))
> + if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
> + test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, ar->wmi.svc_map))
> wiphy_ext_feature_set(ar->hw->wiphy,
> - NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT);
> + NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT);
You should use the new name, and fix indentation.
johannes
I've sort of applied patches 1/2 squashed together, but with some changes.
I hope those are OK - otherwise send me another patch on top please.
johannes
On 2018-08-29 14:23, Johannes Berg wrote:
> On Thu, 2018-07-19 at 18:56 +0530, Balaji Pothunoori wrote:
>>
>>
>> - if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map))
>> + if (test_bit(WMI_SERVICE_TX_DATA_ACK_RSSI, ar->wmi.svc_map) ||
>> + test_bit(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
>> ar->wmi.svc_map))
>> wiphy_ext_feature_set(ar->hw->wiphy,
>> - NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT);
>> + NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT);
>
> You should use the new name, and fix indentation.
>
> johannes
Sure, i will send updated v3 patch.