From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Ed Howland <ed.howland@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: [PATCH] hostapd: make it work on the latest kernel
Date: Fri, 10 Aug 2007 23:20:05 +0200 [thread overview]
Message-ID: <1186780805.17351.3.camel@johannes.berg> (raw)
i802_if_update isn't actually used so remove all code from it, add
ieee80211_msg_passive_scan as our own constant and #if 0 more code in
handle_frame()
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
diff --git a/hostapd/driver_devicescape.c b/hostapd/driver_devicescape.c
index 73e05f0..de8fe4a 100644
--- a/hostapd/driver_devicescape.c
+++ b/hostapd/driver_devicescape.c
@@ -39,6 +39,11 @@
#include "hw_features.h"
#include <hostapd_ioctl.h>
#include <ieee80211_common.h>
+
+/* there used to be this constant in the kernel sources, but
+ * the kernel no longer needs it.... we use it internally.... */
+#define ieee80211_msg_passive_scan 3
+
/* from net/mac80211.h */
enum {
MODE_IEEE80211A = 0 /* IEEE 802.11a */,
@@ -1021,32 +1026,8 @@ static int i802_if_add(const char *iface, void *priv,
static int i802_if_update(void *priv, enum hostapd_driver_if_type type,
char *ifname, const u8 *addr)
{
- struct i802_driver_data *drv = priv;
- struct prism2_hostapd_param *param;
-
- param = malloc(sizeof(struct prism2_hostapd_param) + ETH_ALEN);
- if (!param)
- return -1;
- memset(param, 0, sizeof(param));
-
- param->cmd = PRISM2_HOSTAPD_UPDATE_IF;
- param->u.if_info.type = i802_if_type(type);
- if (addr)
- memcpy(param->u.if_info.data, addr, ETH_ALEN);
- else
- memset(param->u.if_info.data, 0, ETH_ALEN);
- os_strlcpy((char *) param->u.if_info.name, ifname, IFNAMSIZ);
-
- /* FIX: should the size have + ETH_ALEN ? */
- if (hostapd_ioctl(drv, param, sizeof(struct prism2_hostapd_param))) {
- printf("Could not update iface: %s.\n", ifname);
- free(param);
- return -1;
- }
-
- os_strlcpy(ifname, (char *) param->u.if_info.name, IFNAMSIZ);
- free(param);
- return 0;
+ /* unused at the moment */
+ return -1;
}
@@ -1354,13 +1335,13 @@ static void handle_frame(struct hostapd_iface *iface, u8 *buf, size_t len,
int msg_type = ntohl(fi->msg_type);
struct hostapd_frame_info hfi;
+#if 0 /* TODO */
/* special handling for message types without IEEE 802.11 header */
if (msg_type == ieee80211_msg_set_aid_for_sta) {
-#if 0 /* TODO */
ieee802_11_set_aid_for_sta(iface->bss[0], buf, data_len);
-#endif
return;
}
+#endif
if (msg_type == ieee80211_msg_key_threshold_notification) {
#if 0 /* TODO */
ieee802_11_key_threshold_notification(iface->bss[0], buf,
next reply other threads:[~2007-08-10 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 21:20 Johannes Berg [this message]
2007-08-15 3:27 ` [PATCH] hostapd: make it work on the latest kernel Jouni Malinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1186780805.17351.3.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=dwmw2@infradead.org \
--cc=ed.howland@gmail.com \
--cc=j@w1.fi \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox