Bug 216923 - iwi(4): cannot use channels 12 and 13 for DE/ETSI
Summary: iwi(4): cannot use channels 12 and 13 for DE/ETSI
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Andriy Voskoboinyk
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-02-08 18:54 UTC by Taras Korenko
Modified: 2017-02-18 19:26 UTC (History)
1 user (show)

See Also:


Attachments
svn diff for iwi(4) (stable/11, r313440) (3.05 KB, patch)
2017-02-08 21:16 UTC, Taras Korenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Taras Korenko 2017-02-08 18:54:05 UTC
Hi, folks!

  It is still not possible to use channels 12 and 13 despite setting country/regdomain to DE/ETSI (or any other which permits usage of channels 12, 13).

  I'm aware of bug #174722.  Applying recommendations from that PR yield no desired results.  Comparing to that PR -- the driver is the same (iwi(4)), however, two things differ: the wireless card is 'Intel(R) PRO/Wireless 2915ABG', and the system is FreeBSD 11.0-STABLE (r313440).

  How to reproduce:
Run the following (on a freshly booted system):
------------------------------------------------------------------------
d610# ifconfig wlan0
ifconfig: interface wlan0 does not exist

d610# ifconfig wlan0 create wlandev iwi0

d610# ifconfig wlan0 country DE ecm
d610# ifconfig wlan0
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:16:6f:89:cc:bb
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 1 (2412 MHz 11b)
        regdomain ETSI country DE authmode OPEN privacy OFF txpower 30
        bmiss 24 scanvalid 60 wme bintval 0
        groups: wlan

d610# ifconfig wlan0 list regdomain
:regdomain ETSI country DE anywhere ecm
Channel   1 : 2412      MHz 11b          Channel   7 : 2442      MHz 11g
Channel   1 : 2412      MHz 11g          Channel   8 : 2447      MHz 11b
Channel   2 : 2417      MHz 11b          Channel   8 : 2447      MHz 11g
Channel   2 : 2417      MHz 11g          Channel   9 : 2452      MHz 11b
Channel   3 : 2422      MHz 11b          Channel   9 : 2452      MHz 11g
Channel   3 : 2422      MHz 11g          Channel  10 : 2457      MHz 11b
Channel   4 : 2427      MHz 11b          Channel  10 : 2457      MHz 11g
Channel   4 : 2427      MHz 11g          Channel  11 : 2462      MHz 11b
Channel   5 : 2432      MHz 11b          Channel  11 : 2462      MHz 11g
Channel   5 : 2432      MHz 11g          Channel  36 : 5180      MHz 11a
Channel   6 : 2437      MHz 11b          Channel  40 : 5200      MHz 11a
Channel   6 : 2437      MHz 11g          Channel  44 : 5220      MHz 11a
Channel   7 : 2442      MHz 11b          Channel  48 : 5240      MHz 11a
d610#
------------------------------------------------------------------------
  There are channels 12, 13 missing from the list, thus the command 'ifconfig wlan0 channel 13' fails.

d610% uname -a
FreeBSD d610.synfin.me 11.0-STABLE FreeBSD 11.0-STABLE #0 r313440: Wed Feb  8 14:50:02 EET 2017     ds@d610.synfin.me:/usr/local/obj/usr/local/src/sys/GENERIC  i386

d610% dmesg | grep iwi0
iwi0: <Intel(R) PRO/Wireless 2915ABG> mem 0xdfcff000-0xdfcfffff irq 17 at device 3.0 on pci2
Comment 1 Taras Korenko 2017-02-08 19:22:40 UTC
Those were facts, now it's time to my observations and assumptions.

Another incarnation of the same(IMO) bug may be reproduced by 'touching' the country/regdomain settings.  (Under 'touching' I mean 'changing to other value and rolling back').  Thus, on a freshly booted system, one may run the following:
------------------------------------------------------------------------
d610% ifconfig wlan0
ifconfig: interface wlan0 does not exist

d610# ifconfig wlan0 create wlandev iwi0
d610# ifconfig wlan0 country US
d610# ifconfig wlan0 list chan
Channel   1 : 2412  MHz 11g          Channel  11 : 2462  MHz 11g
Channel   2 : 2417  MHz 11g          Channel  36 : 5180  MHz 11a
Channel   3 : 2422  MHz 11g          Channel  40 : 5200  MHz 11a
Channel   4 : 2427  MHz 11g          Channel  44 : 5220  MHz 11a
Channel   5 : 2432  MHz 11g          Channel  48 : 5240  MHz 11a
Channel   6 : 2437  MHz 11g          Channel 149 : 5745  MHz 11a
Channel   7 : 2442  MHz 11g          Channel 153 : 5765  MHz 11a
Channel   8 : 2447  MHz 11g          Channel 157 : 5785  MHz 11a
Channel   9 : 2452  MHz 11g          Channel 161 : 5805  MHz 11a
Channel  10 : 2457  MHz 11g

d610# ifconfig wlan0 country DE
d610# ifconfig wlan0 country US
d610# ifconfig wlan0 list chan
Channel   1 : 2412  MHz 11g          Channel   9 : 2452  MHz 11g
Channel   2 : 2417  MHz 11g          Channel  10 : 2457  MHz 11g
Channel   3 : 2422  MHz 11g          Channel  11 : 2462  MHz 11g
Channel   4 : 2427  MHz 11g          Channel  36 : 5180  MHz 11a
Channel   5 : 2432  MHz 11g          Channel  40 : 5200  MHz 11a
Channel   6 : 2437  MHz 11g          Channel  44 : 5220  MHz 11a
Channel   7 : 2442  MHz 11g          Channel  48 : 5240  MHz 11a
Channel   8 : 2447  MHz 11g
d610#
------------------------------------------------------------------------

  Note, that touching regulatory settings effectively shrinked the list of available channels: 149,153,157,161 are missing.
Comment 2 Taras Korenko 2017-02-08 21:16:08 UTC
Created attachment 179774 [details]
svn diff for iwi(4) (stable/11, r313440)
Comment 3 Taras Korenko 2017-02-08 21:21:29 UTC
  To make long story short: the possible cause of this weird behavior is missing implementation of ic_getradiocaps 'method(?)' within iwi(4) driver.

  The workaround is attached ( comment #2 ), however I dunno whether it is correct from design POV; at least it works for me:

------------------------------------------------------------------------
d610# ifconfig wlan0 create wlandev iwi0

d610# ifconfig wlan0 country US
d610# ifconfig wlan0 list chan
Channel   1 : 2412  MHz 11g          Channel  11 : 2462  MHz 11g
Channel   2 : 2417  MHz 11g          Channel  36 : 5180  MHz 11a
Channel   3 : 2422  MHz 11g          Channel  40 : 5200  MHz 11a
Channel   4 : 2427  MHz 11g          Channel  44 : 5220  MHz 11a
Channel   5 : 2432  MHz 11g          Channel  48 : 5240  MHz 11a
Channel   6 : 2437  MHz 11g          Channel 149 : 5745  MHz 11a
Channel   7 : 2442  MHz 11g          Channel 153 : 5765  MHz 11a
Channel   8 : 2447  MHz 11g          Channel 157 : 5785  MHz 11a
Channel   9 : 2452  MHz 11g          Channel 161 : 5805  MHz 11a
Channel  10 : 2457  MHz 11g          Channel 165 : 5825* MHz 11a

d610# ifconfig wlan0 country DE
d610# ifconfig wlan0 list chan
Channel   1 : 2412  MHz 11g          Channel  48 : 5240  MHz 11a
Channel   2 : 2417  MHz 11g          Channel  52 : 5260* MHz 11a
Channel   3 : 2422  MHz 11g          Channel  56 : 5280* MHz 11a
Channel   4 : 2427  MHz 11g          Channel  60 : 5300* MHz 11a
Channel   5 : 2432  MHz 11g          Channel  64 : 5320* MHz 11a
Channel   6 : 2437  MHz 11g          Channel 100 : 5500* MHz 11a
Channel   7 : 2442  MHz 11g          Channel 104 : 5520* MHz 11a
Channel   8 : 2447  MHz 11g          Channel 108 : 5540* MHz 11a
Channel   9 : 2452  MHz 11g          Channel 112 : 5560* MHz 11a
Channel  10 : 2457  MHz 11g          Channel 116 : 5580* MHz 11a
Channel  11 : 2462  MHz 11g          Channel 120 : 5600* MHz 11a
Channel  12 : 2467  MHz 11g          Channel 124 : 5620* MHz 11a
Channel  13 : 2472  MHz 11g          Channel 128 : 5640* MHz 11a
Channel  36 : 5180  MHz 11a          Channel 132 : 5660* MHz 11a
Channel  40 : 5200  MHz 11a          Channel 136 : 5680* MHz 11a
Channel  44 : 5220  MHz 11a          Channel 140 : 5700* MHz 11a

d610# ifconfig wlan0 country US
d610# ifconfig wlan0 list chan
Channel   1 : 2412  MHz 11g          Channel  11 : 2462  MHz 11g
Channel   2 : 2417  MHz 11g          Channel  36 : 5180  MHz 11a
Channel   3 : 2422  MHz 11g          Channel  40 : 5200  MHz 11a
Channel   4 : 2427  MHz 11g          Channel  44 : 5220  MHz 11a
Channel   5 : 2432  MHz 11g          Channel  48 : 5240  MHz 11a
Channel   6 : 2437  MHz 11g          Channel 149 : 5745  MHz 11a
Channel   7 : 2442  MHz 11g          Channel 153 : 5765  MHz 11a
Channel   8 : 2447  MHz 11g          Channel 157 : 5785  MHz 11a
Channel   9 : 2452  MHz 11g          Channel 161 : 5805  MHz 11a
Channel  10 : 2457  MHz 11g          Channel 165 : 5825* MHz 11a
d610#
------------------------------------------------------------------------
Comment 4 Andriy Voskoboinyk freebsd_committer 2017-02-13 01:53:57 UTC
Take.

(OpenBSD / NetBSD drivers are not using channels 100-140 with this device - however, ieee80211_init_channels() already adds them and there are no bug reports about channel list misconfiguration, so lets assume that it just works)
Comment 5 commit-hook freebsd_committer 2017-02-13 02:16:55 UTC
A commit references this bug:

Author: avos
Date: Mon Feb 13 02:15:56 UTC 2017
New revision: 313694
URL: https://svnweb.freebsd.org/changeset/base/313694

Log:
  iwi: add 12-14 2GHz channels into channel list.

  Return full channel list via iwi_getradiocaps() method
  (ieee80211_init_channels() was replaced with iwi_getradiocaps()
  to be consistent with other drivers).

  PR:				216923
  Submitted and tested by:	ds@ukrhub.net (original patch)
  MFC after:			5 days

Changes:
  head/sys/dev/iwi/if_iwi.c
Comment 6 commit-hook freebsd_committer 2017-02-18 19:19:52 UTC
A commit references this bug:

Author: avos
Date: Sat Feb 18 19:19:08 UTC 2017
New revision: 313921
URL: https://svnweb.freebsd.org/changeset/base/313921

Log:
  MFC r313694:
  iwi: add 12-14 2GHz channels into channel list.

  Return full channel list via iwi_getradiocaps() method
  (ieee80211_init_channels() was replaced with iwi_getradiocaps()
  to be consistent with other drivers).

  PR:		216923
  Submitted and tested by:	ds@ukrhub.net (original patch)

Changes:
_U  stable/11/
  stable/11/sys/dev/iwi/if_iwi.c
Comment 7 Andriy Voskoboinyk freebsd_committer 2017-02-18 19:26:19 UTC
Committed, thanks!