]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Move Management frame TX status to per BSS handling
authorSriram R <quic_srirrama@quicinc.com>
Thu, 28 Mar 2024 18:16:41 +0000 (23:46 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 20 Apr 2024 12:58:48 +0000 (15:58 +0300)
Management frame TX status events were handled on drv's first BSS
only. However, to support multiple MLDs there is requirement to handle
this on a given BSS.

Use the passed BSS instead of always going with drv's first BSS.

Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
src/drivers/driver_nl80211_event.c

index 727565c43f1058b053a2c5f67a2ce05d7042b2cb..d987703420a9788400509556e1e8c780a7a0a2fc 100644 (file)
@@ -1374,12 +1374,13 @@ static void mlme_event_mgmt(struct i802_bss *bss,
 }
 
 
-static void mlme_event_mgmt_tx_status(struct wpa_driver_nl80211_data *drv,
+static void mlme_event_mgmt_tx_status(struct i802_bss *bss,
                                      struct nlattr *cookie, const u8 *frame,
                                      size_t len, struct nlattr *ack)
 {
        union wpa_event_data event;
        const struct ieee80211_hdr *hdr = (const struct ieee80211_hdr *) frame;
+       struct wpa_driver_nl80211_data *drv = bss->drv;
        u16 fc = le_to_host16(hdr->frame_control);
        u64 cookie_val = 0;
 
@@ -1434,7 +1435,7 @@ static void mlme_event_mgmt_tx_status(struct wpa_driver_nl80211_data *drv,
        event.tx_status.ack = ack != NULL;
        event.tx_status.link_id = cookie_val == drv->send_frame_cookie ?
                drv->send_frame_link_id : NL80211_DRV_LINK_ID_NA;
-       wpa_supplicant_event(drv->ctx, EVENT_TX_STATUS, &event);
+       wpa_supplicant_event(bss->ctx, EVENT_TX_STATUS, &event);
 }
 
 
@@ -1742,7 +1743,7 @@ static void mlme_event(struct i802_bss *bss,
                                nla_len(frame), link_id);
                break;
        case NL80211_CMD_FRAME_TX_STATUS:
-               mlme_event_mgmt_tx_status(drv, cookie, nla_data(frame),
+               mlme_event_mgmt_tx_status(bss, cookie, nla_data(frame),
                                          nla_len(frame), ack);
                break;
        case NL80211_CMD_UNPROT_DEAUTHENTICATE: