* No beacons generated when you bring ath9k AP interface down and up. @ 2011-01-14 7:13 Ben Greear 2011-01-14 8:26 ` Johannes Berg 2011-01-14 9:12 ` Jouni Malinen 0 siblings, 2 replies; 6+ messages in thread From: Ben Greear @ 2011-01-14 7:13 UTC (permalink / raw) To: linux-wireless@vger.kernel.org Been a long day, but I think I finally see the problem. If you have an ath9k AP interface running with hostapd, and you run: ip link set vap0 down; ip link set vap0 up; then it will disable beaconing. One reason is that the ieee80211_do_open calls the ieee80211_bss_info_change_notify before it sets the RUNNING flag, so it would disable beaconing. A second is that it doesn't set the BEACON_CHANGED flag anyway, so even if you hack things to set RUNNING first, it still doesn't work right. I'm not sure where the problem actually lies: Should ath9k start beaconing automatically on VAP interface add? Is it up to hostapd to detect the ifdown/ifup and re-set everything up properly? Or maybe it's just a very bad idea to bounce a VAP interface with 'ip link set'? Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: No beacons generated when you bring ath9k AP interface down and up. 2011-01-14 7:13 No beacons generated when you bring ath9k AP interface down and up Ben Greear @ 2011-01-14 8:26 ` Johannes Berg 2011-01-14 9:12 ` Jouni Malinen 1 sibling, 0 replies; 6+ messages in thread From: Johannes Berg @ 2011-01-14 8:26 UTC (permalink / raw) To: Ben Greear; +Cc: linux-wireless@vger.kernel.org On Thu, 2011-01-13 at 23:13 -0800, Ben Greear wrote: > Been a long day, but I think I finally see the problem. > > If you have an ath9k AP interface running with hostapd, and you > run: ip link set vap0 down; ip link set vap0 up; > then it will disable beaconing. > > One reason is that the ieee80211_do_open calls the > ieee80211_bss_info_change_notify before it sets the RUNNING > flag, so it would disable beaconing. A second is that > it doesn't set the BEACON_CHANGED flag anyway, so even if you > hack things to set RUNNING first, it still doesn't work right. > > I'm not sure where the problem actually lies: Should ath9k > start beaconing automatically on VAP interface add? Is > it up to hostapd to detect the ifdown/ifup and re-set everything > up properly? Or maybe it's just a very bad idea to bounce > a VAP interface with 'ip link set'? Why would that be a good idea? I mean ... why would you want to do that?! johannes ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: No beacons generated when you bring ath9k AP interface down and up. 2011-01-14 7:13 No beacons generated when you bring ath9k AP interface down and up Ben Greear 2011-01-14 8:26 ` Johannes Berg @ 2011-01-14 9:12 ` Jouni Malinen 2011-01-14 13:22 ` Ben Greear 2011-01-14 13:49 ` Jorge Boncompte [DTI2] 1 sibling, 2 replies; 6+ messages in thread From: Jouni Malinen @ 2011-01-14 9:12 UTC (permalink / raw) To: Ben Greear; +Cc: linux-wireless@vger.kernel.org On Thu, Jan 13, 2011 at 11:13:40PM -0800, Ben Greear wrote: > If you have an ath9k AP interface running with hostapd, and you > run: ip link set vap0 down; ip link set vap0 up; > then it will disable beaconing. Yes. So what? > I'm not sure where the problem actually lies: Should ath9k > start beaconing automatically on VAP interface add? Is > it up to hostapd to detect the ifdown/ifup and re-set everything > up properly? Or maybe it's just a very bad idea to bounce > a VAP interface with 'ip link set'? I would say it is up to whoever decided to set the interface down to restart hostapd.. There is a proposed patch for hostapd to do this automatically, but I'm yet to fully understand why one would set the interface down in the first place. -- Jouni Malinen PGP id EFC895FA ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: No beacons generated when you bring ath9k AP interface down and up. 2011-01-14 9:12 ` Jouni Malinen @ 2011-01-14 13:22 ` Ben Greear 2011-01-14 14:17 ` Brian Prodoehl 2011-01-14 13:49 ` Jorge Boncompte [DTI2] 1 sibling, 1 reply; 6+ messages in thread From: Ben Greear @ 2011-01-14 13:22 UTC (permalink / raw) To: Jouni Malinen; +Cc: linux-wireless@vger.kernel.org On 01/14/2011 01:12 AM, Jouni Malinen wrote: > On Thu, Jan 13, 2011 at 11:13:40PM -0800, Ben Greear wrote: >> If you have an ath9k AP interface running with hostapd, and you >> run: ip link set vap0 down; ip link set vap0 up; >> then it will disable beaconing. > > Yes. So what? > >> I'm not sure where the problem actually lies: Should ath9k >> start beaconing automatically on VAP interface add? Is >> it up to hostapd to detect the ifdown/ifup and re-set everything >> up properly? Or maybe it's just a very bad idea to bounce >> a VAP interface with 'ip link set'? > > I would say it is up to whoever decided to set the interface down to > restart hostapd.. There is a proposed patch for hostapd to do this > automatically, but I'm yet to fully understand why one would set the > interface down in the first place. My tool automatically downs and ups interfaces when IPs configuration changes to clear IP & routing information. It's not so difficult to restart hostapd or even not bounce the VAP to begin with. But, it was quite difficult to figure out that the VAP was just *mostly* working. It seems that everything but beaconing was working, or at least 70 or so virtual station devices could associate and pass traffic, though they did complain about not receiving beacons. I think that we should either change hostapd to fix this up automatically, or have hostapd exit on error when this happens, or have some other very obvious clue that the VAP is not fully functional. Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: No beacons generated when you bring ath9k AP interface down and up. 2011-01-14 13:22 ` Ben Greear @ 2011-01-14 14:17 ` Brian Prodoehl 0 siblings, 0 replies; 6+ messages in thread From: Brian Prodoehl @ 2011-01-14 14:17 UTC (permalink / raw) To: Ben Greear; +Cc: Jouni Malinen, linux-wireless@vger.kernel.org On Fri, Jan 14, 2011 at 8:22 AM, Ben Greear <greearb@candelatech.com> wrote: > On 01/14/2011 01:12 AM, Jouni Malinen wrote: >> >> On Thu, Jan 13, 2011 at 11:13:40PM -0800, Ben Greear wrote: >>> >>> If you have an ath9k AP interface running with hostapd, and you >>> run: ip link set vap0 down; ip link set vap0 up; >>> then it will disable beaconing. >> >> Yes. So what? >> >>> I'm not sure where the problem actually lies: Should ath9k >>> start beaconing automatically on VAP interface add? Is >>> it up to hostapd to detect the ifdown/ifup and re-set everything >>> up properly? Or maybe it's just a very bad idea to bounce >>> a VAP interface with 'ip link set'? >> >> I would say it is up to whoever decided to set the interface down to >> restart hostapd.. There is a proposed patch for hostapd to do this >> automatically, but I'm yet to fully understand why one would set the >> interface down in the first place. > > My tool automatically downs and ups interfaces when IPs configuration > changes to clear IP & routing information. It's not so difficult to > restart hostapd or even not bounce the VAP to begin with. > > But, it was quite difficult to figure out > that the VAP was just *mostly* working. It seems that everything but > beaconing was working, or at least 70 or so virtual station devices > could associate and pass traffic, though they did complain about > not receiving beacons. > > I think that we should either change hostapd to fix this up automatically, > or have hostapd exit on error when this happens, or have some other very > obvious clue that the VAP is not fully functional. > > Thanks, > Ben OpenWrt brings the AP interface down after launching hostapd to set the MAC address every time during network restart, and beaconing becomes disabled then, too. I created this ticket 6 weeks ago: https://dev.openwrt.org/ticket/8362 My conclusion was that bringing the interface down with hostapd up is a terrible thing to do. Some sort of fix beyond "don't do that" would be really nice, though. It would be great if hostapd would detect that the interface went down, and reinitialize when the interface comes back up. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: No beacons generated when you bring ath9k AP interface down and up. 2011-01-14 9:12 ` Jouni Malinen 2011-01-14 13:22 ` Ben Greear @ 2011-01-14 13:49 ` Jorge Boncompte [DTI2] 1 sibling, 0 replies; 6+ messages in thread From: Jorge Boncompte [DTI2] @ 2011-01-14 13:49 UTC (permalink / raw) To: linux-wireless@vger.kernel.org El 14/01/2011 10:12, Jouni Malinen escribió: > On Thu, Jan 13, 2011 at 11:13:40PM -0800, Ben Greear wrote: >> If you have an ath9k AP interface running with hostapd, and you >> run: ip link set vap0 down; ip link set vap0 up; >> then it will disable beaconing. > > Yes. So what? > >> I'm not sure where the problem actually lies: Should ath9k >> start beaconing automatically on VAP interface add? Is >> it up to hostapd to detect the ifdown/ifup and re-set everything >> up properly? Or maybe it's just a very bad idea to bounce >> a VAP interface with 'ip link set'? > > I would say it is up to whoever decided to set the interface down to > restart hostapd.. There is a proposed patch for hostapd to do this > automatically, but I'm yet to fully understand why one would set the > interface down in the first place. I usually do it to influence routing from within quagga. Quagga have no provisions to restart another daemons on interface state change. This is just an example, I'm sure there are others valid use cases, so I really think that hostapd should restart beaconing/whatever in this case. Regards, Jorge -- ============================================================== Jorge Boncompte - Ingenieria y Gestion de RED DTI2 - Desarrollo de la Tecnologia de las Comunicaciones -------------------------------------------------------------- C/ Abogado Enriquez Barrios, 5 14004 CORDOBA (SPAIN) Tlf: +34 957 761395 / FAX: +34 957 450380 ============================================================== - There is only so much duct tape you can put on something before it just becomes a giant ball of duct tape. ============================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-14 14:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-14 7:13 No beacons generated when you bring ath9k AP interface down and up Ben Greear 2011-01-14 8:26 ` Johannes Berg 2011-01-14 9:12 ` Jouni Malinen 2011-01-14 13:22 ` Ben Greear 2011-01-14 14:17 ` Brian Prodoehl 2011-01-14 13:49 ` Jorge Boncompte [DTI2]
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).