Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if  it's unused anyway
Date: Fri, 10 Aug 2007 23:38:01 +0200	[thread overview]
Message-ID: <1186781881.17351.15.camel@johannes.berg> (raw)

Hostapd doesn't do anything about such frames. Kernel no longer sends
them and the constant was removed, so let's not reference it any longer.


Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

--- hostap.orig/hostapd/driver_devicescape.c	2007-08-10 23:33:19.000000000 +0200
+++ hostap/hostapd/driver_devicescape.c	2007-08-10 23:35:10.000000000 +0200
@@ -1351,9 +1351,12 @@ static void handle_frame(struct hostapd_
 	}
 
 	/* PS-Poll frame from not associated is 16 bytes. All other frames
-	 * passed to hostapd are 24 bytes or longer. */
-	if (len < 24 &&
-	    (msg_type != ieee80211_msg_sta_not_assoc || len < 16)) {
+	 * passed to hostapd are 24 bytes or longer.
+	 * Right now, the kernel doesn't send us any frames from not-associated
+	 * because the code here doesn't care. TODO: add support to kernel
+	 * and send DEAUTH/DISASSOC to them...
+	 */
+	if (len < 24) {
 		printf("handle_frame: too short (%lu), type %d\n",
 		       (unsigned long) len, msg_type);
 		return;
@@ -1425,9 +1428,15 @@ static void handle_frame(struct hostapd_
 	case ieee80211_msg_michael_mic_failure:
 		hostapd_michael_mic_failure(hapd, buf, data_len);
 		return;
-	case ieee80211_msg_sta_not_assoc:
-		/* TODO: ieee802_11_rx_sta_not_assoc(hapd, buf, data_len); */
+/*
+ * TODO
+ * We should be telling them to go away. But we don't support that now.
+ * See also below and above for other TODO items related to this.
+
+ 	case ieee80211_msg_sta_not_assoc:
+		ieee802_11_rx_sta_not_assoc(hapd, buf, data_len);
 		return;
+ */
 	default:
 		printf("handle_frame: unknown msg_type %d\n", msg_type);
 		return;



             reply	other threads:[~2007-08-10 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 21:38 Johannes Berg [this message]
2007-08-15  3:40 ` [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway Jouni Malinen
2007-08-15 10:48   ` Johannes Berg
2007-08-16  2:05     ` 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=1186781881.17351.15.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --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