From: "Jouni Malinen" <jkm@devicescape.com>
To: Jiri Benc <jbenc@suse.cz>
Cc: netdev@vger.kernel.org
Subject: net/d80211 and management interface (wmaster0ap)
Date: Tue, 2 May 2006 11:39:30 -0700 [thread overview]
Message-ID: <20060502183930.GA28777@instant802.com> (raw)
It looks like one of your patches in wireless-dev.git broke management
interface. I'm not completely sure about how this was supposed to work,
but are the low-level drivers now expected to accept
IEEE80211_IF_TYPE_MGMT in add_interface handler or should ieee80211.c be
modified to accept wmaster0ap to be set UP without asking the low-level
driver? The patch below does the former by modifying bcm43xx_main.c to
have a special case for IEEE80211_IF_TYPE_MGMT. This interface itself
does not require additional functionality from the low-level driver.
In addition to this, it looked like sending packets from wmaster0ap did
not work. The packets were being dropped since originating device
(wmaster0ap) did not match in is_ieee80211_device(). This function
seemed to use wireless_handlers pointer for recognizing interfaces which
(like to comment says) is not that nice. wireless_handlers were not set
for apdev, so the patch below adds it to make TX work through
wmaster0ap.
Does these match with your understanding of how the management interface
is supposed to work now after your patches went in?
Allow management interface (wmaster0ap) to be set UP with bcm43xx and
allow frames to be sent through it by making sure that
is_ieee80211_device(apdev) returns 1.
Signed-off-by: Jouni Malinen <jkm@devicescape.com>
Index: wireless-dev/net/d80211/ieee80211.c
===================================================================
--- wireless-dev.orig/net/d80211/ieee80211.c
+++ wireless-dev/net/d80211/ieee80211.c
@@ -4115,6 +4115,8 @@ struct net_device *ieee80211_alloc_hw(si
ether_setup(apdev);
apdev->priv = local;
apdev->hard_start_xmit = ieee80211_mgmt_start_xmit;
+ apdev->wireless_handlers =
+ (struct iw_handler_def *) &ieee80211_iw_handler_def;
apdev->change_mtu = ieee80211_change_mtu_apdev;
apdev->get_stats = ieee80211_get_stats;
apdev->open = ieee80211_open;
Index: wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
+++ wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
@@ -4195,6 +4195,9 @@ static int bcm43xx_add_interface(struct
{
struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
+ if (conf->type == IEEE80211_IF_TYPE_MGMT)
+ return 0;
+
if (bcm->interfaces > 0)
return -ENOBUFS;
if (conf->type == IEEE80211_IF_TYPE_MNTR) {
--
Jouni Malinen PGP id EFC895FA
next reply other threads:[~2006-05-02 18:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 18:39 Jouni Malinen [this message]
2006-05-03 12:08 ` net/d80211 and management interface (wmaster0ap) Jiri Benc
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=20060502183930.GA28777@instant802.com \
--to=jkm@devicescape.com \
--cc=jbenc@suse.cz \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).