From: Grazvydas Ignotas Date: Mon, 8 Jun 2015 00:54:22 +0000 (+0300) Subject: wl1251-modules: update the rc script to set driver params X-Git-Tag: sz_172rc~13 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=67f9186e1b7bba2d4ba2a153baa15aea320ac157 wl1251-modules: update the rc script to set driver params --- diff --git a/recipes/pandora-system/wl1251-modules.bb b/recipes/pandora-system/wl1251-modules.bb index a7e5d7c..d618915 100755 --- a/recipes/pandora-system/wl1251-modules.bb +++ b/recipes/pandora-system/wl1251-modules.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Kernel drivers for the TI WL1251 WiFi chip found on the Pandora - Connected via SDIO" LICENSE = "GPLv2" -PR="r3" +PR="r4" SRCREV = "ccb56baff992d682cc84eca10472298b2cce1bf1" diff --git a/recipes/pandora-system/wl1251-modules/rc.wl1251 b/recipes/pandora-system/wl1251-modules/rc.wl1251 index bb352b2..ab0f43f 100755 --- a/recipes/pandora-system/wl1251-modules/rc.wl1251 +++ b/recipes/pandora-system/wl1251-modules/rc.wl1251 @@ -2,6 +2,14 @@ DESC="WL1251 MAC80211 Wireless LAN driver" NAME="wl1251" +sysfs_path="/sys/bus/mmc/devices/mmc2:0001/mmc2:0001:1" +ps_rate_threshold=30000 +use_fw_ps=Y + +if [ -f /etc/pandora/conf/wl1251 ]; then + . /etc/pandora/conf/wl1251 +fi + d_stop() { if `grep -q wl1251 /proc/modules` ; then ifconfig wlan0 down @@ -10,7 +18,11 @@ d_stop() { } d_start() { - modprobe wl1251 + wl1251_args="" + if modinfo wl1251 2> /dev/null | grep -q '\'; then + wl1251_args="use_fw_ps=$use_fw_ps" + fi + modprobe wl1251 $wl1251_args modprobe wl1251_sdio # this does not exist on newer kernels modprobe board-omap3pandora-wifi 2> /dev/null @@ -37,6 +49,12 @@ d_start() { fi done fi + + # some driver configuration + if [ -d "$sysfs_path" ]; then + test -n "$ps_rate_threshold" && echo "$ps_rate_threshold" > $sysfs_path/ps_rate_threshold + test -n "$long_doze_mode" && echo "$long_doze_mode" > $sysfs_path/long_doze_mode + fi } case "$1" in