LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Wireless LAN interface do not work after resume (https://www.linuxquestions.org/questions/slackware-14/wireless-lan-interface-do-not-work-after-resume-4175494649/)

ben_whiteus 02-12-2014 08:28 AM

Wireless LAN interface do not work after resume
 
My wireless network connection is lost when I resume from hibernation/suspend. I would need to re-run the whole wireless lan configuration sequence again to get the network connectivity back. I suppose this is not be the correct behaviour.

A search on wireless lan interface issues after hibernation suggests that I should add a file in /etc/pm/config.d/ with the entry SUSPEND_MODULES="ath9k" (yup, the kernel module for my wifi interface is ath9k). I have tried this approach without success.

Are there any other suggestions to resolve the issues?

Thanks

ben_whiteus 02-13-2014 07:37 AM

Well, I managed to resolve the issue after more troubleshooting. First off, there is no need to suspend the ath9k module. There were two other issues instead.

Firstly, the AP I was using used a hidden SSID (non-broadcast), and the wlan0 couldn't re-authenticate upon resume. As the use of hidden SSID is not a very effective security measure, I decided to do away with it. After making the changes at the AP, wlan0 managed to re-authenticate itself with the AP.

After successful re-authentication, the wlan0 interface still could not be used to connect to the Internet. The second issue was that dhcpcd was not running after resume. I am not sure if this is the normal. In any case, to resolve the issue, I added a script in /etc/pm/sleep.d/. The script is simply as follows:

Code:

#!/bin/bash                                                                                 
WLAN0_UP=`/sbin/ifconfig | grep wlan0 | awk '{print $1}'`

case $1 in
    hibernate)
        echo "Hey guy, we are going to suspend to disk!"
        ;;
    suspend)
        echo "Oh, this time we're doing a suspend to RAM. Cool!"
        ;;
    thaw)
        echo "oh, suspend to disk is over, we are resuming..."
        #dhcpcd somehow won't re-assign IP to wlan0 after resume                             
        #thus the need of this fix                                                           
        if [ -n $WLAN_UP ]; then
            dhcpcd wlan0
        fi
        ;;
    resume)
        echo "hey, the suspend to RAM seems to be over..."
        #dhcpcd somehow won't re-assign IP to wlan0 after resume                             
        #thus the need of this fix                                                           
        if [ -n $WLAN_UP ]; then
            dhcpcd wlan0
        fi
        ;;
    *)  echo "somebody is calling me totally wrong."
        ;;
esac

Cheers


All times are GMT -5. The time now is 06:53 AM.