# FreeBSD 13.1 and Wi-Fi only responds after running service netif restart once or twice after boot. What to do?



## mavavilj (Jun 27, 2022)

I have the problem that I have FreeBSD 13.1 on an Elitebook 8470p.

When I boot the computer the interface seems to be set up just fine, but it fails to connect to the network right at the boot.

Rather, what I need to do is to call


```
service netif restart
```

once or twice as root to get internet working.

What can I do with this? I've read several threads here about /etc/rc.conf and some other "startup script files", but my attempts with them have not been successful.

Could I make this automatic somehow?


----------



## kjeacle (Jun 28, 2022)

Is the driver for your WiFi card loaded at boot? Perhaps you need an entry in /boot/loader.conf - my laptop has if_rtwn_usb_load="YES".


----------



## CuatroTorres (Jun 28, 2022)

Did you try sync?

/etc/rc.conf
wlans_ath0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"









						Chapter 31. Network Servers
					

This chapter covers some of the more frequently used network services on UNIX systems




					docs.freebsd.org


----------



## mavavilj (Jul 2, 2022)

CuatroTorres said:


> Did you try sync?
> 
> /etc/rc.conf
> wlans_ath0="wlan0"
> ...


Yes, these I have set.

I'm confused about the drivers thing of post #2 though. I've experimented with such, but I thought they had no effect. And I am unsure about how to figure out whether the drivers are properly loaded or not. I assume they are, since 
	
	



```
service netif restart
```
 brings up the internet later on.


----------



## mavavilj (Jul 2, 2022)

It seems as if at least a temporary solution for me was to modify loader.conf as given in:





__





						iwn(4)
					






					www.freebsd.org
				




Because my laptop has the Intel Centrino Ultimate-N 6300 network chip.

Now Wi-Fi seemed connect automatically at least once, though not exactly after entering the desktop, but some time later.


----------



## aw256 (Jul 2, 2022)

Similar problem here with the iwm driver. No connection at boot, and also after boot sometimes the connetion will drop and require a netif restart. I see this in dmesg (sorry for the fact that pasting removed the newlines)

iwm0: Start Error Log Dump: iwm0: Status: 0x3, count: 6 iwm0: 0x0000090A | ADVANCED_SYSASSERT           iwm0: 000002F0 | trm_hw_status0 iwm0: 00000000 | trm_hw_status1 iwm0: 0000E258 | branchlink2 iwm0: 0002730C | interruptlink1 iwm0: 00000000 | interruptlink2 iwm0: 000000FF | data1 iwm0: 0002F4DC | data2 iwm0: DEADBEEF | data3 iwm0: FC40C0B1 | beacon time iwm0: E0A70D86 | tsf low iwm0: 0000000C | tsf hi iwm0: 00000000 | time gp1 iwm0: 2944B950 | time gp2 iwm0: 00000000 | uCode revision type iwm0: 00000016 | uCode version major iwm0: 00058404 | uCode version minor iwm0: 00000230 | hw version iwm0: 0080FF0F | board version iwm0: 00DD001C | hcmd iwm0: 00022002 | isr0 iwm0: 00000000 | isr1 iwm0: 08001802 | isr2 iwm0: 00417CC1 | isr3 iwm0: 00000000 | isr4 iwm0: 00004110 | last cmd Id iwm0: 00000000 | wait_event iwm0: 000073BF | l2p_control iwm0: 00000020 | l2p_duration iwm0: 00000000 | l2p_mhvalid iwm0: 00000030 | l2p_addr_match iwm0: 0000008F | lmpm_pmg_sel iwm0: 03071928 | timestamp iwm0: 0000F000 | flow_handler iwm0: Start UMAC Error Log Dump: iwm0: Status: 0x3, count: 7 iwm0: 0x00000070 | ADVANCED_SYSASSERT iwm0: 0x00000000 | umac branchlink1 iwm0: 0xC0082F64 | umac branchlink2 iwm0: 0xC0081000 | umac interruptlink1 iwm0: 0xC0081000 | umac interruptlink2 iwm0: 0x00000800 | umac data1 iwm0: 0xC0081000 | umac data2 iwm0: 0xDEADBEEF | umac data3 iwm0: 0x00000016 | umac major iwm0: 0x00058404 | umac minor iwm0: 0xC0886280 | frame pointer iwm0: 0xC0886280 | stack pointer iwm0: 0x09C10018 | last host cmd iwm0: 0x00000000 | isr status reg iwm0: driver status: iwm0:   tx ring  0: qid=0  cur=222 queued=1   iwm0:   tx ring  1: qid=1  cur=0   queued=0   iwm0:   tx ring  2: qid=2  cur=0   queued=0   iwm0:   tx ring  3: qid=3  cur=0   queued=0   iwm0:   tx ring  4: qid=4  cur=0   queued=0   iwm0:   tx ring  5: qid=5  cur=0   queued=0   iwm0:   tx ring  6: qid=6  cur=0   queued=0   iwm0:   tx ring  7: qid=7  cur=0   queued=0   iwm0:   tx ring  8: qid=8  cur=0   queued=0   iwm0:   tx ring  9: qid=9  cur=194 queued=1   iwm0:   tx ring 10: qid=10 cur=0   queued=0   iwm0:   tx ring 11: qid=11 cur=0   queued=0   iwm0:   tx ring 12: qid=12 cur=0   queued=0   iwm0:   tx ring 13: qid=13 cur=0   queued=0   iwm0:   tx ring 14: qid=14 cur=0   queued=0   iwm0:   tx ring 15: qid=15 cur=0   queued=0   iwm0:   tx ring 16: qid=16 cur=0   queued=0   iwm0:   tx ring 17: qid=17 cur=0   queued=0   iwm0:   tx ring 18: qid=18 cur=0   queued=0   iwm0:   tx ring 19: qid=19 cur=0   queued=0   iwm0:   tx ring 20: qid=20 cur=0   queued=0   iwm0:   tx ring 21: qid=21 cur=0   queued=0   iwm0:   tx ring 22: qid=22 cur=0   queued=0   iwm0:   tx ring 23: qid=23 cur=0   queued=0   iwm0:   tx ring 24: qid=24 cur=0   queued=0   iwm0:   tx ring 25: qid=25 cur=0   queued=0   iwm0:   tx ring 26: qid=26 cur=0   queued=0   iwm0:   tx ring 27: qid=27 cur=0   queued=0   iwm0:   tx ring 28: qid=28 cur=0   queued=0   iwm0:   tx ring 29: qid=29 cur=0   queued=0   iwm0:   tx ring 30: qid=30 cur=0   queued=0   iwm0:   rx ring: cur=248 iwm0:   802.11 state 0 iwm0: iwm_intr: controller panicked, iv_state = 0; restarting iwm0: iwm_bring_down_firmware: Failed to remove station: 35


----------

