Use generic driver events for TX status and RX reporting
[libeap.git] / hostapd / wme.c
index 7f92a0a..8e17a41 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "includes.h"
 
+#include "common.h"
 #include "hostapd.h"
 #include "ieee802_11.h"
 #include "wme.h"
@@ -90,7 +91,7 @@ u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid)
 /* This function is called when a station sends an association request with
  * WMM info element. The function returns zero on success or non-zero on any
  * error in WMM element. eid does not include Element ID and Length octets. */
-int hostapd_eid_wmm_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
+int hostapd_eid_wmm_valid(struct hostapd_data *hapd, const u8 *eid, size_t len)
 {
        struct wmm_information_element *wmm;
 
@@ -117,23 +118,6 @@ int hostapd_eid_wmm_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
 }
 
 
-/* This function is called when a station sends an ACK frame for an AssocResp
- * frame (status=success) and the matching AssocReq contained a WMM element.
- */
-int hostapd_wmm_sta_config(struct hostapd_data *hapd, struct sta_info *sta)
-{
-       /* update kernel STA data for WMM related items (WLAN_STA_WPA flag) */
-       if (sta->flags & WLAN_STA_WMM)
-               hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
-                                     WLAN_STA_WMM, ~0);
-       else
-               hostapd_sta_set_flags(hapd, sta->addr, sta->flags,
-                                     0, ~WLAN_STA_WMM);
-
-       return 0;
-}
-
-
 static void wmm_send_action(struct hostapd_data *hapd, const u8 *addr,
                            const struct wmm_tspec_element *tspec,
                            u8 action_code, u8 dialogue_token, u8 status_code)
@@ -160,7 +144,7 @@ static void wmm_send_action(struct hostapd_data *hapd, const u8 *addr,
        os_memcpy(t, tspec, sizeof(struct wmm_tspec_element));
        len = ((u8 *) (t + 1)) - buf;
 
-       if (hostapd_send_mgmt_frame(hapd, m, len, 0) < 0)
+       if (hostapd_send_mgmt_frame(hapd, m, len) < 0)
                perror("wmm_send_action: send");
 }