Merge "[[RDKB][mt7990]rdkb development]"
diff --git a/src/logan_wifi/wifi_hal.c b/src/logan_wifi/wifi_hal.c
index ceb4463..9050d2e 100644
--- a/src/logan_wifi/wifi_hal.c
+++ b/src/logan_wifi/wifi_hal.c
@@ -10853,25 +10853,27 @@
return NL_SKIP;
}
- nla_for_each_nested(tidattr, sinfo[NL80211_STA_INFO_TID_STATS], rem)
- {
- stats_entry = &out->tid_array[tid_index];
+ if (sinfo[NL80211_STA_INFO_TID_STATS]) {
+ nla_for_each_nested(tidattr, sinfo[NL80211_STA_INFO_TID_STATS], rem)
+ {
+ stats_entry = &out->tid_array[tid_index];
- stats_entry->tid = tid_index;
- stats_entry->ac = _tid_ac_index_get[tid_index];
+ stats_entry->tid = tid_index;
+ stats_entry->ac = _tid_ac_index_get[tid_index];
- if(sinfo[NL80211_STA_INFO_TID_STATS])
- {
- if(nla_parse_nested(stats_info, NL80211_TID_STATS_MAX,tidattr, tid_policy)) {
- printf("failed to parse nested stats attributes!");
- return NL_SKIP;
+ if(sinfo[NL80211_STA_INFO_TID_STATS])
+ {
+ if(nla_parse_nested(stats_info, NL80211_TID_STATS_MAX,tidattr, tid_policy)) {
+ printf("failed to parse nested stats attributes!");
+ return NL_SKIP;
+ }
}
- }
- if(stats_info[NL80211_TID_STATS_TX_MSDU])
- stats_entry->num_msdus = (unsigned long long)nla_get_u64(stats_info[NL80211_TID_STATS_TX_MSDU]);
+ if(stats_info[NL80211_TID_STATS_TX_MSDU])
+ stats_entry->num_msdus = (unsigned long long)nla_get_u64(stats_info[NL80211_TID_STATS_TX_MSDU]);
- if(tid_index < (PS_MAX_TID - 1))
- tid_index++;
+ if(tid_index < (PS_MAX_TID - 1))
+ tid_index++;
+ }
}
//ToDo: sum_time_ms, ewma_time_ms
return NL_SKIP;
@@ -11112,9 +11114,11 @@
if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), dev);
- if(nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX, sinfo[NL80211_STA_INFO_RX_BITRATE], rate_policy )) {
- fprintf(stderr, "failed to parse nested rate attributes!");
- return NL_SKIP;
+ if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
+ if(nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX, sinfo[NL80211_STA_INFO_RX_BITRATE], rate_policy )) {
+ fprintf(stderr, "failed to parse nested rate attributes!");
+ return NL_SKIP;
+ }
}
if(sinfo[NL80211_STA_INFO_TID_STATS])
@@ -11252,9 +11256,11 @@
if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), dev);
- if(nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX, sinfo[NL80211_STA_INFO_TX_BITRATE], rate_policy)) {
- fprintf(stderr, "failed to parse nested rate attributes!");
- return NL_SKIP;
+ if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
+ if(nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX, sinfo[NL80211_STA_INFO_TX_BITRATE], rate_policy)) {
+ fprintf(stderr, "failed to parse nested rate attributes!");
+ return NL_SKIP;
+ }
}
if(sinfo[NL80211_STA_INFO_TID_STATS])