osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: [PATCH] ath9k: Add sanity check for beacon_int in
adhoc/mesh case - msg#01241

List: linux-wireless

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

It looks like mac80211 can request the driver to start beaconing with
a beacon interval of zero in some cases (at least for mesh point). This
does not sound correct and something may need to be fixed in
mac80211. However, taken into account the unpleasantness of getting
stuck in an infinite busy loop with rtnl_lock held, let's add a quick
workaround in the driver to avoid the worst symptom while someone more
familiar with the mesh implementation can figure out what should be done
with mac80211 as far as beacon interval configuration is concerned.

Signed-off-by: Jouni Malinen <jouni.malinen@xxxxxxxxxxx>

---
drivers/net/wireless/ath/ath9k/beacon.c | 8 ++++++++
1 file changed, 8 insertions(+)

--- wireless-testing.orig/drivers/net/wireless/ath/ath9k/beacon.c
2009-05-28 19:13:54.000000000 +0300
+++ wireless-testing/drivers/net/wireless/ath/ath9k/beacon.c 2009-05-28
19:14:58.000000000 +0300
@@ -673,6 +673,14 @@ static void ath_beacon_config_adhoc(stru

intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;

+ /*
+ * It looks like mac80211 may end up using beacon interval of zero in
+ * some cases (at least for mesh point). Avoid getting into an
+ * infinite loop by using a bit safer value instead..
+ */
+ if (intval == 0)
+ intval = 100;
+
/* Pull nexttbtt forward to reflect the current TSF */

nexttbtt = TSF_TO_TU(sc->beacon.bc_tstamp >> 32, sc->beacon.bc_tstamp);

--
Jouni Malinen PGP id EFC895FA
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html

Thread at a glance:

Previous Message by Date:

Re: ath9k locks up when bringing up a mesh point interface

On Thu, May 28, 2009 at 07:40:36AM -0700, Andrey Yurovsky wrote: > Thanks. For what it's worth, substituting rt2x00 for ath9k works (ie: > one can bring up a mesh) on the same kernel, so it likely has > something to do with the driver. OK, I traced it to the driver. It looks like mac80211 is asking the driver to setup beaconing with beacon interval of zero (struct ieee80211_bss_conf::beacon_int == 0) which does not sound correct to me.. The adhoc mode beacon setup (which is also shared for mesh) in ath9k does not exactly like this and ends up in an infinite loop trying to figure out how many beacon frames have been transfered before the current TSF.. We can obviously add a sanity check to the driver to avoid the busy loop, but I would assume that something in the mac80211 mesh code could also be changed to provide a more reason beacon interval to the driver. -- Jouni Malinen PGP id EFC895FA -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html

Next Message by Date:

Re: ath5k: works only occasionaly

On Thu, 2009-05-28 at 17:32 +0200, Daniel Mierswa wrote: > i'm facing issues with ath5k and my laptop ever since i first installed > it, linux 2.6.24 or somewhere around there. The current kernel version is more important than the one you tried initially. Also, the chip revision from the kernel log may be useful. > i get occasionaly associated and working wireless lan at home though any > attempt to access public wifi (university/schools/cafes) results in > "CTRL-EVENT-DISCONNECTED -- remove keys" The reason for disconnect should be printed before that line. > or "noise floor calibration > timeout" errors from wpa_supplicant It must be from the driver, not from wpa_supplicant. > (don't worry i already tried every > wpa_supplicant version from 0.6.1 to trunk, whereas the newer ones even > with the -Dnl80211 option). Using -Dwext or -Dnl80211 should have no effect on disconnects. > sometimes wpa_supplicant associates me but > packets will just time out (dhcp, ping, etc) and it will disassociate me > shortly after that attempt, also tried using nohwcrypt=1 as module > parameter and different kernels (as of request in > #linux-wireless/Freenode) which didn't cause any effect at all. > as you can imagine it's hard to provide you with useful debug > information right now, since i'm at home but i'm thankful for any > suggestions and guides on how to give you more useful information than that. If you can, try connecting to an access point with known good signal to see if the problem is caused by low signal. -- Regards, Pavel Roskin -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html

Previous Message by Thread:

ath5k: works only occasionaly

i'm facing issues with ath5k and my laptop ever since i first installed it, linux 2.6.24 or somewhere around there. i get occasionaly associated and working wireless lan at home though any attempt to access public wifi (university/schools/cafes) results in "CTRL-EVENT-DISCONNECTED -- remove keys" or "noise floor calibration timeout" errors from wpa_supplicant (don't worry i already tried every wpa_supplicant version from 0.6.1 to trunk, whereas the newer ones even with the -Dnl80211 option). sometimes wpa_supplicant associates me but packets will just time out (dhcp, ping, etc) and it will disassociate me shortly after that attempt, also tried using nohwcrypt=1 as module parameter and different kernels (as of request in #linux-wireless/Freenode) which didn't cause any effect at all. as you can imagine it's hard to provide you with useful debug information right now, since i'm at home but i'm thankful for any suggestions and guides on how to give you more useful information than that. -- Mierswa, Daniel If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do. --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html

Next Message by Thread:

[PATCH 0/2] ar9170: 1-stage firmware support / AVM fritz

This series now works for me on my WNDA31000, it took a newer shiny 1-stage firmware to work. I'll push the firmware into linux-firmware next. Should work with the AVM Fritz devices now, haven't tested it but I think it should work. Luis R. Rodriguez (2): ar9170: add support for 1-stage firmware ar9170: add AVM FRITZ devices drivers/net/wireless/ath/ar9170/usb.c | 47 +++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ar9170/usb.h | 2 + 2 files changed, 44 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!