All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Petr Štetiar" <ynezz@true.cz>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Petr Štetiar" <ynezz@true.cz>,
	users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org
Subject: Re: Multi-bss operation issue with rt2x00 and hostapd on rt305x platform
Date: Sun, 25 Nov 2012 20:39:10 +0100	[thread overview]
Message-ID: <20121125193910.GR8292@ibawizard.net> (raw)
In-Reply-To: <1353871018.9875.7.camel@jlt4.sipsolutions.net>

Johannes Berg <johannes@sipsolutions.net> [2012-11-25 20:16:58]:

> On Sun, 2012-11-25 at 20:00 +0100, Petr Štetiar wrote:
> 
> > 	nl80211: CMD_FRAME freq=2457 wait=0 no_cck=0 no_ack=0 offchanok=0
> > 	nl80211: Frame TX command accepted; cookie 0x81937c00
> > 	Add randomness: count=39 entropy=38
> > 	nl80211: Event message available
> > -->	nl80211: MLME event 60 (NL80211_CMD_REGISTER_FRAME)
> 
> That command string is wrong. 60 really is NL80211_CMD_FRAME_TX_STATUS.
> How did you print that string? The other one, 59, is NL80211_CMD_FRAME,
> not NL80211_CMD_SET_TX_BITRATE_MASK.
> 
> It seems to me that you've messed up the nl80211.h header in either
> hostapd or the kernel.

Sorry, my bad. I've created small helper function and messed the enum -> txt
conversion macro in Vim which simply didn't handled the following assign case:

	NL80211_CMD_NEW_BEACON = NL80211_CMD_START_AP

I've compared the headers in the hostapd/kernel and here's the diff:

	--- nl_hostapd.h	2012-11-25 20:35:47.733001929 +0100
	+++ nl_linux.h	2012-11-25 20:36:04.997001488 +0100
	@@ -138,6 +138,11 @@
	 
		NL80211_CMD_CH_SWITCH_NOTIFY,
	 
	+	NL80211_CMD_START_P2P_DEVICE,
	+	NL80211_CMD_STOP_P2P_DEVICE,
	+
	+	NL80211_CMD_CONN_FAILED,
	+
		/* add new commands above here */
	 
		/* used to define NL80211_CMD_MAX below */

So I hope it should be ok. Thanks.

-- ynezz

	--- driver_nl80211.c.orig	2012-11-25 17:19:40.609302795 +0100
	+++ driver_nl80211.c
	2012-11-25 16:58:03.929335949 +0100
	@@ -1444,6 +1444,107 @@
		wpa_supplicant_event(drv->ctx, type, &event);
	 }
	 
	+static const char* cmd_txt(int cmd)
	+{
	+	const char *tmp[] = {
	+		"NL80211_CMD_UNSPEC",

			...snipped...

	+		"NL80211_CMD_CH_SWITCH_NOTIFY",
	+	};
	+
	+	return tmp[cmd];
	+}
	 
	 static void mlme_event(struct wpa_driver_nl80211_data *drv,
			       enum nl80211_commands cmd, struct nlattr *frame,
	@@ -1462,8 +1563,8 @@
			return;
		}
	 
	-	wpa_printf(MSG_DEBUG, "nl80211: MLME event %d", cmd);
	+	wpa_printf(MSG_DEBUG, "nl80211: MLME event %d (%s)", cmd, cmd_txt(cmd));
	 
		switch (cmd) {


  reply	other threads:[~2012-11-25 19:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-25 19:00 Multi-bss operation issue with rt2x00 and hostapd on rt305x platform Petr Štetiar
2012-11-25 19:16 ` Johannes Berg
2012-11-25 19:39   ` Petr Štetiar [this message]
     [not found] ` <50B29159.20209@googlemail.com>
2012-11-25 21:53   ` Helmut Schaa
2012-11-25 22:29     ` Petr Štetiar
2012-11-25 23:27       ` Petr Štetiar

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=20121125193910.GR8292@ibawizard.net \
    --to=ynezz@true.cz \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=users@rt2x00.serialmonkey.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.