aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-07 03:30:33 (GMT)
committerJouni Malinen <j@w1.fi>2008-02-07 03:30:33 (GMT)
commitdd0dee21a169c12cb706c1419f733ad43df8df79 (patch)
tree711f8be4b7e16b1999d1bf1ac5cdffce7de7ade6
parent672e26f5cb6b9e2ae7d6c797b42bf2680f936663 (diff)
downloadhostap-history-dd0dee21a169c12cb706c1419f733ad43df8df79.zip
hostap-history-dd0dee21a169c12cb706c1419f733ad43df8df79.tar.gz
hostap-history-dd0dee21a169c12cb706c1419f733ad43df8df79.tar.bz2
Internalize port control into nl80211 driver
The kernel no longer keeps track of whether port control is enabled or disabled so hostapd now needs to do that. This patch does that, but this code will not work for multi-BSS so this patch disables that for now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
-rw-r--r--hostapd/driver_nl80211.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/hostapd/driver_nl80211.c b/hostapd/driver_nl80211.c
index 81b620c..c9fe9a0 100644
--- a/hostapd/driver_nl80211.c
+++ b/hostapd/driver_nl80211.c
@@ -50,7 +50,6 @@
#define PRISM2_IOCTL_HOSTAPD (SIOCIWFIRSTPRIV + 3)
#define PRISM2_PARAM_AP_BRIDGE_PACKETS 10
-#define PRISM2_PARAM_IEEE_802_1X 23
#ifndef ALIGNED
#define ALIGNED __attribute__ ((aligned))
@@ -141,6 +140,7 @@ struct i802_driver_data {
struct genl_family *nl80211;
int dtim_period;
unsigned int beacon_set:1;
+ unsigned int ieee802_1x_active:1;
};
@@ -952,7 +952,7 @@ static int i802_sta_set_flags(void *priv, const u8 *addr,
if_nametoindex(drv->iface));
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
- if (total_flags & WLAN_STA_AUTHORIZED)
+ if (total_flags & WLAN_STA_AUTHORIZED || !drv->ieee802_1x_active)
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_AUTHORIZED);
if (total_flags & WLAN_STA_WME)
@@ -1115,6 +1115,13 @@ static int i802_bss_add(void *priv, const char *ifname, const u8 *bssid)
{
int ifidx;
+ /*
+ * The kernel supports that when the low-level driver does,
+ * but we currently don't because we need per-BSS data that
+ * currently we can't handle easily.
+ */
+ return -1;
+
ifidx = nl80211_create_iface(priv, ifname, NL80211_IFTYPE_AP, bssid);
if (ifidx < 0)
return -1;
@@ -1205,13 +1212,10 @@ static int i802_set_ieee8021x(const char *ifname, void *priv, int enabled)
{
struct i802_driver_data *drv = priv;
- if (hostap_ioctl_prism2param_iface(ifname, drv,
- PRISM2_PARAM_IEEE_802_1X, enabled))
- {
- printf("%s: Could not %s IEEE 802.1X PAE support in kernel "
- "driver.\n", ifname, enabled ? "enable" : "disable");
- return -1;
- }
+ /*
+ * FIXME: This needs to be per interface (BSS)
+ */
+ drv->ieee802_1x_active = enabled;
return 0;
}