From: Reiner Karlsberg <karlsberg@softart-ge.com>
To: linux-wireless@vger.kernel.org
Subject: iw ignores channel switch
Date: Thu, 3 Dec 2015 12:01:33 +0100 [thread overview]
Message-ID: <5660210D.4090303@softart-ge.com> (raw)
I am using openwrt on the following system:
root@OpenWrt:/tmp# iw --version
iw version 3.17
ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb8100000, irq=47
I want to switch between managed (station) mode and monitor mode.
So I have the follwoing scenarion:
root@OpenWrt:/tmp# iw dev
phy#1
Interface wlan1
ifindex 5
wdev 0x100000001
addr 00:90:a9:ab:f8:ed
type managed
phy#0
Interface wlan0
ifindex 21 #steadily increasing, not re-used ?
wdev 0x10
addr 00:90:a9:ab:f8:eb
type managed
root@OpenWrt:/tmp# ifconfig wlan0 up
root@OpenWrt:/tmp# iw dev wlan0 connect SSID
root@OpenWrt:/tmp# udhcpc -i wlan0 --quit
udhcpc (v1.23.2) started
Sending discover...
Sending select for 192.168.20.144...
Lease of 192.168.20.144 obtained, lease time 28800
udhcpc: ifconfig wlan0 192.168.20.144 netmask 255.255.255.0 broadcast 192.168.20.255
udhcpc: setting default routers: 192.168.20.1
root@OpenWrt:/tmp# wget http://somewhere.com/something.html
Connecting to somewhere.com (xx.xx.xx.xx:80)
wget: server returned error: HTTP/1.1 500 Internal Server Error
root@OpenWrt:/tmp# iw phy phy0 interface add wmon0 type monitor
root@OpenWrt:/tmp# iw dev
phy#1
Interface wlan1
ifindex 5
wdev 0x100000001
addr 00:90:a9:ab:f8:ed
type managed
phy#0
Interface wmon0
ifindex 22
wdev 0x11
addr 00:90:a9:ab:f8:eb
type monitor
Interface wlan0
ifindex 21
wdev 0x10
addr 00:90:a9:ab:f8:eb
ssid SSID
type managed
channel 7 (2442 MHz), width: 40 MHz, center1: 2452 MHz
root@OpenWrt:/tmp# ifconfig wmon0 up
root@OpenWrt:/tmp# iw dev
phy#1
Interface wlan1
ifindex 5
wdev 0x100000001
addr 00:90:a9:ab:f8:ed
type managed
phy#0
Interface wmon0
ifindex 22
wdev 0x11
addr 00:90:a9:ab:f8:eb
type monitor
Interface wlan0
ifindex 21
wdev 0x10
addr 00:90:a9:ab:f8:eb
ssid SSID
type managed
channel 7 (2442 MHz), width: 40 MHz, center1: 2452 MHz
root@OpenWrt:/tmp# iw dev wlan0 del
root@OpenWrt:/tmp# iw dev
phy#1
Interface wlan1
ifindex 5
wdev 0x100000001
addr 00:90:a9:ab:f8:ed
type managed
phy#0
Interface wmon0
ifindex 22
wdev 0x11
addr 00:90:a9:ab:f8:eb
type monitor
channel 7 (2442 MHz), width: 20 MHz (no HT), center1: 2442 MHz
root@OpenWrt:/tmp# iw dev wmon0 set channel 1
root@OpenWrt:/tmp# iw dev
phy#1
Interface wlan1
ifindex 5
wdev 0x100000001
addr 00:90:a9:ab:f8:ed
type managed
phy#0
Interface wmon0
ifindex 22
wdev 0x11
addr 00:90:a9:ab:f8:eb
type monitor
channel 7 (2442 MHz), width: 20 MHz (no HT), center1: 2442 MHz
As to be seen, the modification of the channel does not generate an error, but is simply ignored.
What did I do wrong ?
Second question: The "ifindex" is always increasing, during several tests,
when unsuccessfully trying similar scenarios (different sequence of ifconfig ... up/down, iw dev ... del etc.)
Will this "ifindex" "overflow" some time,
even in case of repeated "iw phy phy0 interface add wmon0 type monitor" "iw dev wmon0 del" ?
I would have expected some kind of "reuse".
Regards
--
Reiner Karlsberg
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4842 / Virus Database: 4447/10982 - Release Date: 11/11/15
Internal Virus Database is out of date.
next reply other threads:[~2015-12-03 11:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 11:01 Reiner Karlsberg [this message]
2015-12-03 12:45 ` iw ignores channel switch Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5660210D.4090303@softart-ge.com \
--to=karlsberg@softart-ge.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.