aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-03 10:37:02 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-03 10:37:02 (GMT)
commit2a8b74163e0695169834fb2052220af7d55df9b2 (patch)
tree4c7fe9109c7bca3cd7d9fa4c42b55271ebec2bf2 /src/ap
parent3af1f9cb14ee55a0aad737a5737689ceb066b413 (diff)
downloadhostap-2a8b74163e0695169834fb2052220af7d55df9b2.zip
hostap-2a8b74163e0695169834fb2052220af7d55df9b2.tar.gz
hostap-2a8b74163e0695169834fb2052220af7d55df9b2.tar.bz2
Move struct hostapd_frame_info definition away from driver API
This is internal data structure for hostapd/AP functionality and does not need to be defined in driver.h.
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/drv_callbacks.c20
-rw-r--r--src/ap/hostapd.h6
2 files changed, 18 insertions, 8 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 28eee76..9142104 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -270,15 +270,15 @@ static void hostapd_rx_from_unknown_sta(struct hostapd_data *hapd,
}
-static void hostapd_mgmt_rx(struct hostapd_data *hapd, const u8 *buf,
- size_t len, struct hostapd_frame_info *fi)
+static void hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt)
{
struct hostapd_iface *iface = hapd->iface;
const struct ieee80211_hdr *hdr;
const u8 *bssid;
+ struct hostapd_frame_info fi;
- hdr = (const struct ieee80211_hdr *) buf;
- bssid = get_hdr_bssid(hdr, len);
+ hdr = (const struct ieee80211_hdr *) rx_mgmt->frame;
+ bssid = get_hdr_bssid(hdr, rx_mgmt->frame_len);
if (bssid == NULL)
return;
@@ -298,12 +298,17 @@ static void hostapd_mgmt_rx(struct hostapd_data *hapd, const u8 *buf,
return;
}
+ os_memset(&fi, 0, sizeof(fi));
+ fi.datarate = rx_mgmt->datarate;
+ fi.ssi_signal = rx_mgmt->ssi_signal;
+
if (hapd == HAPD_BROADCAST) {
size_t i;
for (i = 0; i < iface->num_bss; i++)
- ieee802_11_mgmt(iface->bss[i], buf, len, fi);
+ ieee802_11_mgmt(iface->bss[i], rx_mgmt->frame,
+ rx_mgmt->frame_len, &fi);
} else
- ieee802_11_mgmt(hapd, buf, len, fi);
+ ieee802_11_mgmt(hapd, rx_mgmt->frame, rx_mgmt->frame_len, &fi);
}
@@ -382,8 +387,7 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event,
data->rx_from_unknown.len);
break;
case EVENT_RX_MGMT:
- hostapd_mgmt_rx(hapd, data->rx_mgmt.frame,
- data->rx_mgmt.frame_len, data->rx_mgmt.fi);
+ hostapd_mgmt_rx(hapd, &data->rx_mgmt);
break;
#endif /* NEED_AP_MLME */
case EVENT_RX_PROBE_REQ:
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 39fb6c9..86676ff 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -40,6 +40,12 @@ struct hostapd_rate_data {
int flags; /* HOSTAPD_RATE_ flags */
};
+struct hostapd_frame_info {
+ u32 channel;
+ u32 datarate;
+ u32 ssi_signal;
+};
+
struct hostapd_driver_ops {
int (*set_ap_wps_ie)(struct hostapd_data *hapd,