Commit 1303a51c authored by Markus Theil's avatar Markus Theil Committed by Johannes Berg

cfg80211/mac80211: add connected to auth server to station info

This patch adds the necessary bits to later query the auth server
flag for every peer from iw.
Signed-off-by: default avatarMarkus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200611140238.427461-2-markus.theil@tu-ilmenau.deSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 184eebe6
...@@ -1598,6 +1598,7 @@ struct cfg80211_tid_stats { ...@@ -1598,6 +1598,7 @@ struct cfg80211_tid_stats {
* an FCS error. This counter should be incremented only when TA of the * an FCS error. This counter should be incremented only when TA of the
* received packet with an FCS error matches the peer MAC address. * received packet with an FCS error matches the peer MAC address.
* @airtime_link_metric: mesh airtime link metric. * @airtime_link_metric: mesh airtime link metric.
* @connected_to_as: true if mesh STA has a path to authentication server
*/ */
struct station_info { struct station_info {
u64 filled; u64 filled;
...@@ -1655,6 +1656,8 @@ struct station_info { ...@@ -1655,6 +1656,8 @@ struct station_info {
u32 fcs_err_count; u32 fcs_err_count;
u32 airtime_link_metric; u32 airtime_link_metric;
u8 connected_to_as;
}; };
#if IS_ENABLED(CONFIG_CFG80211) #if IS_ENABLED(CONFIG_CFG80211)
......
...@@ -3370,6 +3370,8 @@ enum nl80211_sta_bss_param { ...@@ -3370,6 +3370,8 @@ enum nl80211_sta_bss_param {
* @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station
* @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds) * @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds)
* of STA's association * of STA's association
* @NL80211_STA_INFO_CONNECTED_TO_AS: set to true if STA has a path to a
* authentication server (u8, 0 or 1)
* @__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
*/ */
...@@ -3417,6 +3419,7 @@ enum nl80211_sta_info { ...@@ -3417,6 +3419,7 @@ enum nl80211_sta_info {
NL80211_STA_INFO_AIRTIME_WEIGHT, NL80211_STA_INFO_AIRTIME_WEIGHT,
NL80211_STA_INFO_AIRTIME_LINK_METRIC, NL80211_STA_INFO_AIRTIME_LINK_METRIC,
NL80211_STA_INFO_ASSOC_AT_BOOTTIME, NL80211_STA_INFO_ASSOC_AT_BOOTTIME,
NL80211_STA_INFO_CONNECTED_TO_AS,
/* keep last */ /* keep last */
__NL80211_STA_INFO_AFTER_LAST, __NL80211_STA_INFO_AFTER_LAST,
......
...@@ -2426,7 +2426,8 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, ...@@ -2426,7 +2426,8 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
BIT_ULL(NL80211_STA_INFO_LOCAL_PM) | BIT_ULL(NL80211_STA_INFO_LOCAL_PM) |
BIT_ULL(NL80211_STA_INFO_PEER_PM) | BIT_ULL(NL80211_STA_INFO_PEER_PM) |
BIT_ULL(NL80211_STA_INFO_NONPEER_PM) | BIT_ULL(NL80211_STA_INFO_NONPEER_PM) |
BIT_ULL(NL80211_STA_INFO_CONNECTED_TO_GATE); BIT_ULL(NL80211_STA_INFO_CONNECTED_TO_GATE) |
BIT_ULL(NL80211_STA_INFO_CONNECTED_TO_AS);
sinfo->llid = sta->mesh->llid; sinfo->llid = sta->mesh->llid;
sinfo->plid = sta->mesh->plid; sinfo->plid = sta->mesh->plid;
...@@ -2439,6 +2440,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo, ...@@ -2439,6 +2440,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
sinfo->peer_pm = sta->mesh->peer_pm; sinfo->peer_pm = sta->mesh->peer_pm;
sinfo->nonpeer_pm = sta->mesh->nonpeer_pm; sinfo->nonpeer_pm = sta->mesh->nonpeer_pm;
sinfo->connected_to_gate = sta->mesh->connected_to_gate; sinfo->connected_to_gate = sta->mesh->connected_to_gate;
sinfo->connected_to_as = sta->mesh->connected_to_as;
#endif #endif
} }
......
...@@ -385,6 +385,7 @@ DECLARE_EWMA(mesh_tx_rate_avg, 8, 16) ...@@ -385,6 +385,7 @@ DECLARE_EWMA(mesh_tx_rate_avg, 8, 16)
* @processed_beacon: set to true after peer rates and capabilities are * @processed_beacon: set to true after peer rates and capabilities are
* processed * processed
* @connected_to_gate: true if mesh STA has a path to a mesh gate * @connected_to_gate: true if mesh STA has a path to a mesh gate
* @connected_to_as: true if mesh STA has a path to a authentication server
* @fail_avg: moving percentage of failed MSDUs * @fail_avg: moving percentage of failed MSDUs
* @tx_rate_avg: moving average of tx bitrate * @tx_rate_avg: moving average of tx bitrate
*/ */
...@@ -404,6 +405,7 @@ struct mesh_sta { ...@@ -404,6 +405,7 @@ struct mesh_sta {
bool processed_beacon; bool processed_beacon;
bool connected_to_gate; bool connected_to_gate;
bool connected_to_as;
enum nl80211_plink_state plink_state; enum nl80211_plink_state plink_state;
u32 plink_timeout; u32 plink_timeout;
......
...@@ -5395,6 +5395,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid, ...@@ -5395,6 +5395,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
PUT_SINFO(PEER_PM, peer_pm, u32); PUT_SINFO(PEER_PM, peer_pm, u32);
PUT_SINFO(NONPEER_PM, nonpeer_pm, u32); PUT_SINFO(NONPEER_PM, nonpeer_pm, u32);
PUT_SINFO(CONNECTED_TO_GATE, connected_to_gate, u8); PUT_SINFO(CONNECTED_TO_GATE, connected_to_gate, u8);
PUT_SINFO(CONNECTED_TO_AS, connected_to_as, u8);
if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_BSS_PARAM)) { if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_BSS_PARAM)) {
bss_param = nla_nest_start_noflag(msg, bss_param = nla_nest_start_noflag(msg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment