Bug 208758 - 'service netif restart' makes iwn useless until kldunload/load of if_iwn
Summary: 'service netif restart' makes iwn useless until kldunload/load of if_iwn
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-12 20:54 UTC by Hiren Panchasara
Modified: 2020-02-13 07:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiren Panchasara freebsd_committer 2016-04-12 20:54:36 UTC
I am on
FreeBSD 11.0-CURRENT #2 r297521M: Sun Apr  3 12:30:45 PDT 2016
with latest sys/dev/iwn and I can no longer switch to a new ssid with 'service netif restart'. I have to do 'kldunload if_iwn; kldload if_iwn'.

jhb@ suggested to do devctl disable/enable iwn0. 

I think this should be fixed.
Comment 1 Hiren Panchasara freebsd_committer 2016-04-12 21:28:44 UTC
A few observations:
1) if a network/ssid goes away, iwn connects to the next available one without trouble.
2) wpa_cli reassoc - works perfectly as jhb suggested

Problem occurs when I start up my phone hotspot (which has higher priority in wpa_supplicant.conf) and try to associate with it via 'service netif restart' as I used to. 

Actually, after doing 'service netif restart' iwn doesn't associate with anything. Which is the actual bug.

# ifconfig -v wlan0 list scan

returns nothing.

# ifconfig -v wlan0
wlan0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether a0:88:b4:f1:65:78
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid "" channel 1 (2412 MHz 11g) bssid 00:00:00:00:00:00
        regdomain 0 country US anywhere -ecm authmode WPA1+WPA2/802.11i -wps
        -tsn privacy MIXED deftxkey UNDEF powersavemode OFF powersavesleep 100
        txpower 11 txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346
        bmiss 10
        11a     ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11b     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        11g     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        turboA  ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        turboG  ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        sturbo  ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11na    ucast NONE    mgmt 12 MCS  mcast 12 MCS  maxretry 6
        11ng    ucast NONE    mgmt  2 MCS  mcast  2 MCS  maxretry 6
        half    ucast NONE    mgmt  3 Mb/s mcast  3 Mb/s maxretry 6
        quarter ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        scanvalid 60 -bgscan bgscanintvl 300 bgscanidle 250
        roam:11a     rssi    7dBm rate 12 Mb/s
        roam:11b     rssi    7dBm rate  1 Mb/s
        roam:11g     rssi    7dBm rate  5 Mb/s
        roam:turboA  rssi    7dBm rate 12 Mb/s
        roam:turboG  rssi    7dBm rate 12 Mb/s
        roam:sturbo  rssi    7dBm rate 12 Mb/s
        roam:11na    rssi    7dBm  MCS  1    
        roam:11ng    rssi    7dBm  MCS  1    
        roam:half    rssi    7dBm rate  6 Mb/s
        roam:quarter rssi    7dBm rate  3 Mb/s
        -pureg protmode CTS ht htcompat ampdu ampdulimit 8k ampdudensity NA
        -amsdutx amsdurx shortgi htprotmode RTSCTS -puren -smps -rifs wme
        -burst -dwds roaming MANUAL bintval 0
        AC_BE cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm ack
              cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm
        AC_BK cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm ack
              cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm
        AC_VI cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm ack
              cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm
        AC_VO cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm ack
              cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm
        groups: wlan 


Sometimes (not always) on 'service netif restart' iwn crashes:

ifa_maintain_loopback_route: deletion failed for interface lo0: 48
wlan0: Ethernet address: a0:88:b4:f1:65:78
iwn0: iwn_read_firmware: ucode rev=0x12a80601
iwn0: iwn_intr: fatal firmware error
firmware error log:
  error type      = "UNKNOWN" (0x00002776)
  program counter = 0x00008AD0
  source line     = 0x00000067
  error data      = 0x0901008000000002
  branch link     = 0x00008ABE00008ABE
  interrupt link  = 0x0000D6BE00000000
  time            = 26954
driver status:
  tx ring  0: qid=0  cur=0   queued=0  
  tx ring  1: qid=1  cur=0   queued=0  
  tx ring  2: qid=2  cur=0   queued=0  
  tx ring  3: qid=3  cur=0   queued=0  
  tx ring  4: qid=4  cur=0   queued=0  
  tx ring  5: qid=5  cur=0   queued=0  
  tx ring  6: qid=6  cur=0   queued=0  
  tx ring  7: qid=7  cur=0   queued=0  
  tx ring  8: qid=8  cur=0   queued=0  
  tx ring  9: qid=9  cur=3   queued=0  
  tx ring 10: qid=10 cur=0   queued=0  
  tx ring 11: qid=11 cur=0   queued=0  
  tx ring 12: qid=12 cur=0   queued=0  
  tx ring 13: qid=13 cur=0   queued=0  
  tx ring 14: qid=14 cur=0   queued=0  
  tx ring 15: qid=15 cur=0   queued=0  
  tx ring 16: qid=16 cur=0   queued=0  
  tx ring 17: qid=17 cur=0   queued=0  
  tx ring 18: qid=18 cur=0   queued=0  
  tx ring 19: qid=19 cur=0   queued=0  
  rx ring: cur=1
iwn0: iwn_panicked: controller panicked, iv_state = 0; restarting
iwn0: iwn5000_post_alive: could not configure WiMAX coexistence, error 35
iwn0: iwn_init_locked: could not initialize hardware, error 35

After this, only way to revive iwn is 
# kldunload if_iwn; kldload if_iwn