diff options
| author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-23 18:27:17 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-23 18:27:17 +0200 |
| commit | 5c0106b7cfe928006222e7e49a504b413359b995 (patch) | |
| tree | 490e5f878058df16fc024c9c3255306fdc00c61b | |
| parent | f39374b47ecc9521e16a691ff900c1a1f11609ff (diff) | |
| download | plan9front-5c0106b7cfe928006222e7e49a504b413359b995.tar.xz | |
etheriwl: allow switching channels in promisc mode
promisc mode prevented the call to rxon() in transmit
possibly causing association to fail while running snoopy.
| -rw-r--r-- | sys/src/9/pc/etheriwl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/9/pc/etheriwl.c b/sys/src/9/pc/etheriwl.c index 02b7de2e6..6c0a1a8ff 100644 --- a/sys/src/9/pc/etheriwl.c +++ b/sys/src/9/pc/etheriwl.c @@ -1723,6 +1723,8 @@ rxon(Ether *edev, Wnode *bss) filter = FilterNoDecrypt | FilterMulticast | FilterBeacon; if(ctlr->prom){ filter |= FilterPromisc; + if(bss != nil) + ctlr->channel = bss->channel; bss = nil; } if(bss != nil){ @@ -1843,10 +1845,8 @@ transmit(Wifi *wifi, Wnode *wn, Block *b) return; } - if(ctlr->prom == 0) - if(wn->aid != ctlr->aid - || wn->channel != ctlr->channel - || memcmp(wn->bssid, ctlr->bssid, Eaddrlen) != 0) + if((wn->channel != ctlr->channel) + || (!ctlr->prom && (wn->aid != ctlr->aid || memcmp(wn->bssid, ctlr->bssid, Eaddrlen) != 0))) rxon(edev, wn); if(b == nil){ |
