# bcm4318 restart problem

## SomeoneHere

Hi

I've got Broadcom bcm4318 network card and it's running ok. Problem arises when I try to restart it. I use script restartWireless:

```

/etc/init.d/net.wlan1 stop

rfkill unblock all

/etc/init.d/net.wlan1 start

/etc/init.d/sshd restart

```

When I execute:

date; date >> asdf.log;./restartWireless >> asdf.log;ping -c 3 onet.pl >> asdf.log;date >> asdf.log

In asdf.log I've got:

```

Sat Jun 12 14:47:54 CEST 2010

 * Stopping wlan1

 *   Loading networking modules for wlan1

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig wpa_supplicant essidnet iptunnel ifconfig iproute2 pppd system dhclient ip6to4

 *   Bringing down wlan1

 *     Shutting down wlan1 ...                                            [ ok ]

 * Starting wlan1

 *   Loading networking modules for wlan1

 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel iproute2 pppd system dhclient ip6to4

 *       iwconfig provides wireless

 *       iproute2 provides interface

 *       pppd provides ppp

 *       dhclient provides dhcp

 *   Configuring wlan1 for MAC address XXXXXX ...              [ ok ]

 *   Configuring wireless network for wlan1

 *   Connecting to "XXXXX" in managed mode (WEP Disabled) ...            [ ok ]

 *     wlan1 connected to ESSID "XXXX" at XXXXXXXXXX

 *     in managed mode on channel 11 (WEP disabled)

 *   Configuring wlan1 for ESSID "XXXXX" ...                             [ ok ]

 *   Bringing up wlan1

 *     192.168.1.111/24                                                   [ ok ]

 *   Adding routes

 *     default via 192.168.1.1 ...                                        [ ok ]

 * Stopping sshd ...                                                      [ ok ]

 * Starting sshd ...                                                      [ ok ]

PING onet.pl (213.180.146.27) 56(84) bytes of data.

64 bytes from s4.m1r2.onet.pl (213.180.146.27): icmp_seq=1 ttl=52 time=23.0 ms

64 bytes from s4.m1r2.onet.pl (213.180.146.27): icmp_seq=2 ttl=52 time=21.0 ms

64 bytes from s4.m1r2.onet.pl (213.180.146.27): icmp_seq=3 ttl=52 time=22.0 ms

--- onet.pl ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2002ms

rtt min/avg/max/mdev = 21.000/22.000/23.000/0.816 ms

Sat Jun 12 14:48:02 CEST 2010

```

So in theory it's working after restart. But, despite the fact that ping from machine is working, ping to that machine shows that Destination host is unreachable and I can't remotely connect to that machine using sshd. To make it possible I have to restart system...

Can anyone help me with that problem?

----------

## DONAHUE

```
lspci -k
```

Network controller ?

Subsystem ?

Kernel driver in use ?

Kernel modules ?

```
cat /etc/conf.d/net
```

 ?

with due regard to protecting security

```
cat /etc/wpa_supplicant/wpa_supplicant.conf
```

 ?

```
grep -i rfkill /usr/src/linux/.config
```

 ?

----------

## SomeoneHere

Kernel: linux-2.6.34-rc6

lspci -k

```
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 01)

        Kernel driver in use: agpgart-intel

00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01)

        Subsystem: Compaq Computer Corporation Device 00c5

00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)

        Subsystem: Compaq Computer Corporation Device 00c5

        Kernel driver in use: uhci_hcd

00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)

        Subsystem: Compaq Computer Corporation Device 00c5

        Kernel driver in use: uhci_hcd

00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)

        Subsystem: Compaq Computer Corporation Device 00c5

        Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81)

00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 01)

        Subsystem: Compaq Computer Corporation Device 00c5

        Kernel driver in use: ata_piix

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)

        Subsystem: Compaq Computer Corporation Device 00c5

05:04.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)

        Subsystem: ASUSTeK Computer Inc. WL-138G V2 802.11g WLAN PCI Card

        Kernel driver in use: b43-pci-bridge

        Kernel modules: ssb

05:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (LOM) Ethernet Controller (rev 81)

        Subsystem: Compaq Computer Corporation Device 0091

        Kernel driver in use: e100

```

lsmod

```

Module                  Size  Used by

b43                   139399  0

ssb                    27565  1 b43

```

cat /et/conf.d/net

```

config_wlan1=( "192.168.1.111/24" )

routes_wlan1=( "default via 192.168.1.1" )

modules=( "iwconfig" )

essid_wlan1="XXX"

preferred_aps=( "prezes" )

associate_order_wlan1="forcepreferredonly"

```

grep -i rfkill /usr/src/linux/.config

```

CONFIG_RFKILL=y

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

```

I don't use WPA.

----------

## DONAHUE

does  *Quote:*   

> essid_wlan1="XXX"

  conflict with  *Quote:*   

> preferred_aps=( "prezes" ) 
> 
> associate_order_wlan1="forcepreferredonly" 

 

If not, have you found the redundancy necessary?

Long ago used this script as /etc/init.d/net.wlan0 instead of gentoo's symlink to /etc/init.d/net.lo (adapted from http://ciaranm.wordpress.com/2008/07/14/edimax-ew-7728in-80211n-ralink-rt2860-with-linux-2626/#comments )

 *Quote:*   

> #!/sbin/runscript
> 
> depend() {
> 
>     need localmount
> ...

 

you might want to adapt, make executable, and see if it changes behavior

----------

## DONAHUE

what happens if you add *Quote:*   

> preup () {
> 
>         if [[ ${IFACE} == "wlan1" ]]; then
> 
>                 rfkill unblock all
> ...

 to /etc/conf.d/net and run 

```
/etc/init.d/net.wlan1 restart
```

?

is there a difference in the output of 

```
rc-status
```

when run just after booting and just after restart?

----------

## SomeoneHere

There's no difference in rc-status before and after restart. Also addin preup() doesn't help. Still after restart I can see network from computer, but network doesn't see me.

----------

