author | max <max> | 2003-02-12 01:05:29 (UTC) |
---|---|---|
committer | max <max> | 2003-02-12 01:05:29 (UTC) |
commit | 8072f9767faaf606c5bb0c6dd936ff895a9d189c (patch) (side-by-side diff) | |
tree | 7861b276122d12d94c814c808b7352b85ac10fcb | |
parent | c7fe028f53eb676c9ce619840c0d0a4603a9301f (diff) | |
download | opie-8072f9767faaf606c5bb0c6dd936ff895a9d189c.zip opie-8072f9767faaf606c5bb0c6dd936ff895a9d189c.tar.gz opie-8072f9767faaf606c5bb0c6dd936ff895a9d189c.tar.bz2 |
MAXCHANNEL dynamic detection
-rw-r--r-- | noncore/net/wellenreiter/daemon/source/daemon.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/daemon.cc b/noncore/net/wellenreiter/daemon/source/daemon.cc index 46a50ed..d77d987 100644 --- a/noncore/net/wellenreiter/daemon/source/daemon.cc +++ b/noncore/net/wellenreiter/daemon/source/daemon.cc @@ -166,10 +166,19 @@ void * channel_switcher(void *cardtypeptr) { wl_cardtype_t *cardtype; + int maxchan=0; int channel=1; - /* Get card info struct */ cardtype = (wl_cardtype_t *)cardtypeptr; + /* Get from the wireless extension the amount of available channels + this prevents a fail in switching on us cards */ + maxchan = card_detect_channels(cardtype->iface); + + if (maxchan < MAXCHANNEL) + { + #undef MAXCHANNEL + #define MAXCHANNEL maxchan + } while(1) { |