From d88b0270ff6b5644f159d2c1523c571777578f7b Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 16 Apr 2013 18:18:38 +0200 Subject: [PATCH] atheros: minor fixes on modules load script * don't use a login shell to run the script. It overrides the environment that comes from the caller script. * optimize MAC address parsing * enable 'P2P' and softmac on driver's load https://jira.digi.com/browse/DEL-412 Signed-off-by: Javier Viguera --- .../recipes-kernel/kernel-module-atheros/files/atheros | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/files/atheros b/meta-digi-arm/recipes-kernel/kernel-module-atheros/files/atheros index eecb7e313..d73f5ebd5 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/files/atheros +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/files/atheros @@ -1,4 +1,4 @@ -#!/bin/sh -l +#!/bin/sh #=============================================================================== # # 10-atheros_pre-up @@ -27,8 +27,7 @@ MAC_FILENAME="softmac" # Get the wlan MAC address from kernel command line. Use a default # value if the address has not been set. # - -MAC_ADDR=`cat /proc/cmdline | sed 's/\s/\n/g' | awk '/ethaddr2/ {print}' | sed 's/ethaddr2=//g'` +MAC_ADDR="$(sed -e 's,.\+ethaddr2=\([^[:blank:]]\+\)[[:blank:]].*,\1,g' /proc/cmdline)" if [ -z "${MAC_ADDR}" -o "${MAC_ADDR}" = "00:00:00:00:00:00" ]; then MAC_ADDR="00:04:F3:4C:B1:D3" fi @@ -76,10 +75,10 @@ if [ ! -e "${BDATA_LINK}" ] || ! cmp -s "${BDATA_LINK}" "${FIRMWARE_DIR}/${BDATA fi # ath6kl_sdio.ko -ATH6KL_PARAMS="" +ATH6KL_PARAMS="ath6kl_p2p=1 softmac_enable=1" [ -f "/root/wifi_test_mode" ] && { ATH6KL_PARAMS="${ATH6KL_PARAMS} testmode=1"; test_mode_str=" in test mode"; } grep -qs ath6kl_sdio /proc/modules || \ - /sbin/modprobe --ignore-install -q ath6kl_sdio ${ATH6KL_PARAMS} || echo "Loading ath6kl_sdio module${test_mode_str}: [FAILED]" + modprobe --ignore-install -q ath6kl_sdio ${ATH6KL_PARAMS} || echo "Loading ath6kl_sdio module${test_mode_str}: [FAILED]" # Delay required for the interface 'wlan0' to settle down before trying to configure it. sleep 0.5