* net/d80211 and management interface (wmaster0ap)
@ 2006-05-02 18:39 Jouni Malinen
2006-05-03 12:08 ` Jiri Benc
0 siblings, 1 reply; 2+ messages in thread
From: Jouni Malinen @ 2006-05-02 18:39 UTC (permalink / raw)
To: Jiri Benc; +Cc: netdev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: net/d80211 and management interface (wmaster0ap)
2006-05-02 18:39 net/d80211 and management interface (wmaster0ap) Jouni Malinen
@ 2006-05-03 12:08 ` Jiri Benc
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Benc @ 2006-05-03 12:08 UTC (permalink / raw)
To: Jouni Malinen; +Cc: netdev
On Tue, 2 May 2006 11:39:30 -0700, Jouni Malinen wrote:
> 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?
It shouldn't ask the driver. This was a part of the dropped patch for
removing default management device. I will send a patch to address this
particular issue later today.
> 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.
Oh, thanks for finding this. But we probably don't want wmaster0ap to
have wireless_handlers set. I will try to rewrite is_ieee80211_device in
some another way.
Thanks,
Jiri
--
Jiri Benc
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-03 12:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-02 18:39 net/d80211 and management interface (wmaster0ap) Jouni Malinen
2006-05-03 12:08 ` Jiri Benc
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).