]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Make hostapd_eapol_tx_status() function static
authorSriram R <quic_srirrama@quicinc.com>
Thu, 28 Mar 2024 18:16:42 +0000 (23:46 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 20 Apr 2024 15:31:09 +0000 (18:31 +0300)
hostapd_eapol_tx_status() function is used only in drv_callbacks.c.
However, it is defined in ieee802_11.c which is not really the correct
place for it.

Hence, move the function into drv_callbacks.c and make it static.

No functionality changes.

Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
src/ap/drv_callbacks.c
src/ap/ieee802_11.c
src/ap/ieee802_11.h

index b55168534e73482853cdf5eda6678ac148846a15..19b3fdf3d351aa24a29ce552193fbe1855ffbd3e 100644 (file)
@@ -2384,6 +2384,36 @@ err:
 #endif /* CONFIG_OWE */
 
 
+#ifdef NEED_AP_MLME
+static void hostapd_eapol_tx_status(struct hostapd_data *hapd, const u8 *dst,
+                                   const u8 *data, size_t len, int ack)
+{
+       struct sta_info *sta;
+       struct hostapd_iface *iface = hapd->iface;
+
+       sta = ap_get_sta(hapd, dst);
+       if (!sta && iface->num_bss > 1) {
+               size_t j;
+
+               for (j = 0; j < iface->num_bss; j++) {
+                       hapd = iface->bss[j];
+                       sta = ap_get_sta(hapd, dst);
+                       if (sta)
+                               break;
+               }
+       }
+       if (!sta || !(sta->flags & WLAN_STA_ASSOC)) {
+               wpa_printf(MSG_DEBUG, "Ignore TX status for Data frame to STA "
+                          MACSTR " that is not currently associated",
+                          MAC2STR(dst));
+               return;
+       }
+
+       ieee802_1x_eapol_tx_status(hapd, sta, data, len, ack);
+}
+#endif /* NEED_AP_MLME */
+
+
 void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
                          union wpa_event_data *data)
 {
index c53c0f2fb17560699915bcacbc9e72e7ff106ee1..f603af36df96a8dc5c4761792acdd1f7331e4cf6 100644 (file)
@@ -6860,33 +6860,6 @@ void hostapd_tx_status(struct hostapd_data *hapd, const u8 *addr,
 }
 
 
-void hostapd_eapol_tx_status(struct hostapd_data *hapd, const u8 *dst,
-                            const u8 *data, size_t len, int ack)
-{
-       struct sta_info *sta;
-       struct hostapd_iface *iface = hapd->iface;
-
-       sta = ap_get_sta(hapd, dst);
-       if (sta == NULL && iface->num_bss > 1) {
-               size_t j;
-               for (j = 0; j < iface->num_bss; j++) {
-                       hapd = iface->bss[j];
-                       sta = ap_get_sta(hapd, dst);
-                       if (sta)
-                               break;
-               }
-       }
-       if (sta == NULL || !(sta->flags & WLAN_STA_ASSOC)) {
-               wpa_printf(MSG_DEBUG, "Ignore TX status for Data frame to STA "
-                          MACSTR " that is not currently associated",
-                          MAC2STR(dst));
-               return;
-       }
-
-       ieee802_1x_eapol_tx_status(hapd, sta, data, len, ack);
-}
-
-
 void hostapd_client_poll_ok(struct hostapd_data *hapd, const u8 *addr)
 {
        struct sta_info *sta;
index f76e9bcde3eae01c589d8f37dff5a6a1b640fd8f..cdb6fb454284166609d113e33cff324949ceefd6 100644 (file)
@@ -133,8 +133,6 @@ bool hostapd_get_ht_vht_twt_responder(struct hostapd_data *hapd);
 u8 * hostapd_eid_cca(struct hostapd_data *hapd, u8 *eid);
 void hostapd_tx_status(struct hostapd_data *hapd, const u8 *addr,
                       const u8 *buf, size_t len, int ack);
-void hostapd_eapol_tx_status(struct hostapd_data *hapd, const u8 *dst,
-                            const u8 *data, size_t len, int ack);
 void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src,
                                int wds);
 u8 * hostapd_eid_assoc_comeback_time(struct hostapd_data *hapd,