Re: FC5, Madwifi, NM -- network recovery after suspend-to-ram?



Derek Atkins schrieb:
> Hey,
> 
> My only issue right now is that the wireless network doesn't seem to
> "come back" automatically after a suspend-to-ram.  Maybe I'm not doing

Add a file /etc/pm/hooks/80madwifi and will it with:

#!/bin/bash

. /etc/pm/functions

MADWIFI_MODULES="wlan_wep wlan_ccmp wlan_tkip ath_pci ath_rate_sample
ath_hal wlan_scan_sta wlan"

unload_modules()
{
        [ -z "$MADWIFI_MODULES" ] && return 0
        for x in $MADWIFI_MODULES ; do
                /sbin/rmmod $x >/dev/null 2>&1 0<&1
        done
        return 0
}

load_modules()
{
        [ -z "$MADWIFI_MODULES" ] && return 0
        for x in $MADWIFI_MODULES ; do
                /sbin/modprobe $x >/dev/null 2>&1 0<&1
        done
        return 0
}

case "$1" in
        suspend)
                ;;
        resume)
                unload_modules
                load_modules
                ;;
        *)
                ;;
esac

exit $?


This does the trick for me. The MADWIFI_MODULES have to be in one line.
This could be extended to check if there are actually any madwifi
drivers loaded before going rampart so that we can bundle this in the NM
package for instance as a "unfortnately needed up to now"-script...

	Tim

-- 
    Tim Niemueller <tim niemueller de>      www.niemueller.de
=================================================================
 Imagination is more important than knowledge. (Albert Einstein)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]