]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use a helper function to set SA Query timeout
authorKarthik M <karthik.m@oss.qualcomm.com>
Thu, 11 Sep 2025 22:02:07 +0000 (03:32 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 22 Sep 2025 18:46:02 +0000 (21:46 +0300)
Introduce an ap_sta_set_sa_query_timeout() helper function to set the SA
Query timeout state. This is in preparation for extending this
functionality to cover MLD cases.

Signed-off-by: Karthik M <karthik.m@oss.qualcomm.com>
src/ap/ieee802_11.c
src/ap/sta_info.c
src/ap/sta_info.h

index ca5ca9687bd3b2519b6b5cb25eb75491961f1368..e92faa5276a19afc906fb579f77d22efb9e917d9 100644 (file)
@@ -7040,7 +7040,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
        else
                mlme_associate_indication(hapd, sta);
 
-       sta->sa_query_timed_out = 0;
+       ap_sta_set_sa_query_timeout(hapd, sta, 0);
 
        if (sta->eapol_sm == NULL) {
                /*
index dd0e3a7acfeedd341dbc69936df97ff99b0dc665..e99d7cbebdca87d81a6b1dbaf387e98f83fc9243 100644 (file)
@@ -1432,6 +1432,13 @@ done:
 }
 
 
+void ap_sta_set_sa_query_timeout(struct hostapd_data *hapd,
+                                struct sta_info *sta, int value)
+{
+       sta->sa_query_timed_out = value;
+}
+
+
 int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta)
 {
        u32 tu;
@@ -1444,7 +1451,7 @@ int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta)
                               HOSTAPD_MODULE_IEEE80211,
                               HOSTAPD_LEVEL_DEBUG,
                               "association SA Query timed out");
-               sta->sa_query_timed_out = 1;
+               ap_sta_set_sa_query_timeout(hapd, sta, 1);
                os_free(sta->sa_query_trans_id);
                sta->sa_query_trans_id = NULL;
                sta->sa_query_count = 0;
index f963e8fd38bbe4e46359c5af420158b5d6209406..6ed2930dd24bb443d620cc810d3f3d29dc335789 100644 (file)
@@ -377,6 +377,8 @@ int ap_sta_set_vlan(struct hostapd_data *hapd, struct sta_info *sta,
                    struct vlan_description *vlan_desc);
 void ap_sta_start_sa_query(struct hostapd_data *hapd, struct sta_info *sta);
 void ap_sta_stop_sa_query(struct hostapd_data *hapd, struct sta_info *sta);
+void ap_sta_set_sa_query_timeout(struct hostapd_data *hapd,
+                                struct sta_info *sta, int value);
 int ap_check_sa_query_timeout(struct hostapd_data *hapd, struct sta_info *sta);
 const char * ap_sta_wpa_get_keyid(struct hostapd_data *hapd,
                                  struct sta_info *sta);