net/d80211 and management interface (wmaster0ap)
Subsystems (3)
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.
net/d80211/ieee80211.c +2 -0
@@ -4115,6 +4115,8 @@ struct net_device *ieee80211_alloc_hw(siether_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;
drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c +3 -0
@@ -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 ) {
Signature · 1 line
Jouni Malinen PGP id EFC895FA
Quoted 6 lines · Jouni Malinen
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_MGMTinadd_interfacehandler or shouldieee80211.cbe 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.
Quoted 7 lines
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 usewireless_handlerspointer for recognizing interfaces which (like to comment says) is not that nice.wireless_handlerswere 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
Signature · 2 lines
Jiri Benc SUSE Labs