|
@@ -4678,7 +4678,8 @@ static int32_t hdd_add_tx_bitrate(struct sk_buff *skb,
|
|
if (!nla_attr)
|
|
if (!nla_attr)
|
|
goto fail;
|
|
goto fail;
|
|
/* cfg80211_calculate_bitrate will return 0 for mcs >= 32 */
|
|
/* cfg80211_calculate_bitrate will return 0 for mcs >= 32 */
|
|
- bitrate = cfg80211_calculate_bitrate(&hdd_sta_ctx->conn_info.txrate);
|
|
|
|
|
|
+ bitrate = cfg80211_calculate_bitrate(&hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.txrate);
|
|
|
|
|
|
/* report 16-bit bitrate only if we can */
|
|
/* report 16-bit bitrate only if we can */
|
|
bitrate_compat = bitrate < (1UL << 16) ? bitrate : 0;
|
|
bitrate_compat = bitrate < (1UL << 16) ? bitrate : 0;
|
|
@@ -4693,7 +4694,7 @@ static int32_t hdd_add_tx_bitrate(struct sk_buff *skb,
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
if (nla_put_u8(skb, NL80211_RATE_INFO_VHT_NSS,
|
|
if (nla_put_u8(skb, NL80211_RATE_INFO_VHT_NSS,
|
|
- hdd_sta_ctx->conn_info.txrate.nss)) {
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.txrate.nss)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -4720,7 +4721,7 @@ static int32_t hdd_add_sta_info(struct sk_buff *skb,
|
|
if (!nla_attr)
|
|
if (!nla_attr)
|
|
goto fail;
|
|
goto fail;
|
|
if (nla_put_u8(skb, NL80211_STA_INFO_SIGNAL,
|
|
if (nla_put_u8(skb, NL80211_STA_INFO_SIGNAL,
|
|
- (hdd_sta_ctx->conn_info.signal + 100))) {
|
|
|
|
|
|
+ (hdd_sta_ctx->cache_conn_info.signal + 100))) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -4750,9 +4751,9 @@ static int32_t hdd_add_survey_info(struct sk_buff *skb,
|
|
if (!nla_attr)
|
|
if (!nla_attr)
|
|
goto fail;
|
|
goto fail;
|
|
if (nla_put_u32(skb, NL80211_SURVEY_INFO_FREQUENCY,
|
|
if (nla_put_u32(skb, NL80211_SURVEY_INFO_FREQUENCY,
|
|
- hdd_sta_ctx->conn_info.freq) ||
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.freq) ||
|
|
nla_put_u8(skb, NL80211_SURVEY_INFO_NOISE,
|
|
nla_put_u8(skb, NL80211_SURVEY_INFO_NOISE,
|
|
- (hdd_sta_ctx->conn_info.noise + 100))) {
|
|
|
|
|
|
+ (hdd_sta_ctx->cache_conn_info.noise + 100))) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -4781,13 +4782,13 @@ hdd_add_link_standard_info(struct sk_buff *skb,
|
|
goto fail;
|
|
goto fail;
|
|
if (nla_put(skb,
|
|
if (nla_put(skb,
|
|
NL80211_ATTR_SSID,
|
|
NL80211_ATTR_SSID,
|
|
- hdd_sta_ctx->conn_info.last_ssid.SSID.length,
|
|
|
|
- hdd_sta_ctx->conn_info.last_ssid.SSID.ssId)) {
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.last_ssid.SSID.length,
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.last_ssid.SSID.ssId)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
if (nla_put(skb, NL80211_ATTR_MAC, QDF_MAC_ADDR_SIZE,
|
|
if (nla_put(skb, NL80211_ATTR_MAC, QDF_MAC_ADDR_SIZE,
|
|
- hdd_sta_ctx->conn_info.bssId.bytes)) {
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.bssId.bytes)) {
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
if (hdd_add_survey_info(skb, hdd_sta_ctx, NL80211_ATTR_SURVEY_INFO))
|
|
if (hdd_add_survey_info(skb, hdd_sta_ctx, NL80211_ATTR_SURVEY_INFO))
|
|
@@ -4817,17 +4818,17 @@ hdd_add_ap_standard_info(struct sk_buff *skb,
|
|
nla_attr = nla_nest_start(skb, idx);
|
|
nla_attr = nla_nest_start(skb, idx);
|
|
if (!nla_attr)
|
|
if (!nla_attr)
|
|
goto fail;
|
|
goto fail;
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.vht_present)
|
|
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.vht_present)
|
|
if (nla_put(skb, NL80211_ATTR_VHT_CAPABILITY,
|
|
if (nla_put(skb, NL80211_ATTR_VHT_CAPABILITY,
|
|
- sizeof(hdd_sta_ctx->conn_info.vht_caps),
|
|
|
|
- &hdd_sta_ctx->conn_info.vht_caps)) {
|
|
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.vht_caps),
|
|
|
|
+ &hdd_sta_ctx->cache_conn_info.vht_caps)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.ht_present)
|
|
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.ht_present)
|
|
if (nla_put(skb, NL80211_ATTR_HT_CAPABILITY,
|
|
if (nla_put(skb, NL80211_ATTR_HT_CAPABILITY,
|
|
- sizeof(hdd_sta_ctx->conn_info.ht_caps),
|
|
|
|
- &hdd_sta_ctx->conn_info.ht_caps)) {
|
|
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.ht_caps),
|
|
|
|
+ &hdd_sta_ctx->cache_conn_info.ht_caps)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -4855,29 +4856,33 @@ static int hdd_get_station_info(struct hdd_context *hdd_ctx,
|
|
hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
|
|
|
|
|
nl_buf_len = NLMSG_HDRLEN;
|
|
nl_buf_len = NLMSG_HDRLEN;
|
|
- nl_buf_len += sizeof(hdd_sta_ctx->conn_info.last_ssid.SSID.length) +
|
|
|
|
|
|
+ nl_buf_len += sizeof(hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.last_ssid.SSID.length) +
|
|
QDF_MAC_ADDR_SIZE +
|
|
QDF_MAC_ADDR_SIZE +
|
|
- sizeof(hdd_sta_ctx->conn_info.freq) +
|
|
|
|
- sizeof(hdd_sta_ctx->conn_info.noise) +
|
|
|
|
- sizeof(hdd_sta_ctx->conn_info.signal) +
|
|
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.freq) +
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.noise) +
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.signal) +
|
|
(sizeof(uint32_t) * 2) +
|
|
(sizeof(uint32_t) * 2) +
|
|
- sizeof(hdd_sta_ctx->conn_info.txrate.nss) +
|
|
|
|
- sizeof(hdd_sta_ctx->conn_info.roam_count) +
|
|
|
|
- sizeof(hdd_sta_ctx->conn_info.last_auth_type) +
|
|
|
|
- sizeof(hdd_sta_ctx->conn_info.dot11Mode);
|
|
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.vht_present)
|
|
|
|
- nl_buf_len += sizeof(hdd_sta_ctx->conn_info.vht_caps);
|
|
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.ht_present)
|
|
|
|
- nl_buf_len += sizeof(hdd_sta_ctx->conn_info.ht_caps);
|
|
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.hs20_present) {
|
|
|
|
- tmp_hs20 = (uint8_t *)&(hdd_sta_ctx->conn_info.hs20vendor_ie);
|
|
|
|
- nl_buf_len += (sizeof(hdd_sta_ctx->conn_info.hs20vendor_ie) -
|
|
|
|
- 1);
|
|
|
|
- }
|
|
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.ht_op_present)
|
|
|
|
- nl_buf_len += sizeof(hdd_sta_ctx->conn_info.ht_operation);
|
|
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.vht_op_present)
|
|
|
|
- nl_buf_len += sizeof(hdd_sta_ctx->conn_info.vht_operation);
|
|
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.txrate.nss) +
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.roam_count) +
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.last_auth_type) +
|
|
|
|
+ sizeof(hdd_sta_ctx->cache_conn_info.dot11Mode);
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.vht_present)
|
|
|
|
+ nl_buf_len += sizeof(hdd_sta_ctx->cache_conn_info.vht_caps);
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.ht_present)
|
|
|
|
+ nl_buf_len += sizeof(hdd_sta_ctx->cache_conn_info.ht_caps);
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.hs20_present) {
|
|
|
|
+ tmp_hs20 = (uint8_t *)&(hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.hs20vendor_ie);
|
|
|
|
+ nl_buf_len += (sizeof(hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.hs20vendor_ie) - 1);
|
|
|
|
+ }
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.ht_op_present)
|
|
|
|
+ nl_buf_len += sizeof(hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.ht_operation);
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.vht_op_present)
|
|
|
|
+ nl_buf_len += sizeof(hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.vht_operation);
|
|
|
|
|
|
|
|
|
|
skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len);
|
|
skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len);
|
|
@@ -4897,33 +4902,35 @@ static int hdd_get_station_info(struct hdd_context *hdd_ctx,
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
if (nla_put_u32(skb, INFO_ROAM_COUNT,
|
|
if (nla_put_u32(skb, INFO_ROAM_COUNT,
|
|
- hdd_sta_ctx->conn_info.roam_count) ||
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.roam_count) ||
|
|
nla_put_u32(skb, INFO_AKM,
|
|
nla_put_u32(skb, INFO_AKM,
|
|
hdd_convert_auth_type(
|
|
hdd_convert_auth_type(
|
|
- hdd_sta_ctx->conn_info.last_auth_type)) ||
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.last_auth_type)) ||
|
|
nla_put_u32(skb, WLAN802_11_MODE,
|
|
nla_put_u32(skb, WLAN802_11_MODE,
|
|
hdd_convert_dot11mode(
|
|
hdd_convert_dot11mode(
|
|
- hdd_sta_ctx->conn_info.dot11Mode))) {
|
|
|
|
|
|
+ hdd_sta_ctx->cache_conn_info.dot11Mode))) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.ht_op_present)
|
|
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.ht_op_present)
|
|
if (nla_put(skb, HT_OPERATION,
|
|
if (nla_put(skb, HT_OPERATION,
|
|
- (sizeof(hdd_sta_ctx->conn_info.ht_operation)),
|
|
|
|
- &hdd_sta_ctx->conn_info.ht_operation)) {
|
|
|
|
|
|
+ (sizeof(hdd_sta_ctx->cache_conn_info.ht_operation)),
|
|
|
|
+ &hdd_sta_ctx->cache_conn_info.ht_operation)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.vht_op_present)
|
|
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.vht_op_present)
|
|
if (nla_put(skb, VHT_OPERATION,
|
|
if (nla_put(skb, VHT_OPERATION,
|
|
- (sizeof(hdd_sta_ctx->conn_info.vht_operation)),
|
|
|
|
- &hdd_sta_ctx->conn_info.vht_operation)) {
|
|
|
|
|
|
+ (sizeof(hdd_sta_ctx->
|
|
|
|
+ cache_conn_info.vht_operation)),
|
|
|
|
+ &hdd_sta_ctx->cache_conn_info.vht_operation)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
- if (hdd_sta_ctx->conn_info.conn_flag.hs20_present)
|
|
|
|
|
|
+ if (hdd_sta_ctx->cache_conn_info.conn_flag.hs20_present)
|
|
if (nla_put(skb, AP_INFO_HS20_INDICATION,
|
|
if (nla_put(skb, AP_INFO_HS20_INDICATION,
|
|
- (sizeof(hdd_sta_ctx->conn_info.hs20vendor_ie) - 1),
|
|
|
|
|
|
+ (sizeof(hdd_sta_ctx->cache_conn_info.hs20vendor_ie)
|
|
|
|
+ - 1),
|
|
tmp_hs20 + 1)) {
|
|
tmp_hs20 + 1)) {
|
|
hdd_err("put fail");
|
|
hdd_err("put fail");
|
|
goto fail;
|
|
goto fail;
|