diff options
-rwxr-xr-x | recipes-kernel/rsi-91x/files/rs9113_load_modules.sh | 13 | ||||
-rwxr-xr-x | recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh | 2 | ||||
-rw-r--r-- | recipes-kernel/rsi-91x/rsi-91x-fw_2.5.1.bb | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/recipes-kernel/rsi-91x/files/rs9113_load_modules.sh b/recipes-kernel/rsi-91x/files/rs9113_load_modules.sh index d9a5ed0..3977a5c 100755 --- a/recipes-kernel/rsi-91x/files/rs9113_load_modules.sh +++ b/recipes-kernel/rsi-91x/files/rs9113_load_modules.sh @@ -80,7 +80,18 @@ fi logger -s -p daemon.error "Using COUNTRY_CODE $COUNTRY_CODE" cd /opt/rs9113/modules -modprobe cfg80211 ieee80211_regdom="$COUNTRY_CODE" +# Remove cfg80211 if not the correct regulatory domain +if [[ $(lsmod) =~ [[:space:]]cfg80211[[:space:]] ]] ; then + if ! [[ $(iw reg get) =~ [[:space:]]country[[:space:]]${COUNTRY_CODE}: ]] ; then + logger -s -p daemon.alert "Removing modules related to cfg80211 to set up country code" + /usr/sbin/rs9113_remove_modules.sh + fi +fi +if [[ $(lsmod) =~ [[:space:]]cfg80211[[:space:]] ]] ; then + logger -s -p daemon.error "ERROR: cfg80211 will not remove." +fi + +modprobe cfg80211 ieee80211_regdom="$COUNTRY_CODE" 2>&1 modprobe mac80211 modprobe bluetooth diff --git a/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh b/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh index acdb27b..ba65254 100755 --- a/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh +++ b/recipes-kernel/rsi-91x/files/rs9113_remove_modules.sh @@ -7,7 +7,7 @@ sleep 2 modules=" "$(lsmod)" " ### COMMON HAL MODULES -for mod in bnep rfcomm rsi_btsdio rsi_btusb rsi_bt91x rsi_sdio rsi_usb rsi_91x mac80211 cfg80211 bluetooth rfkill ; do +for mod in bnep rfcomm rsi_btsdio rsi_btusb rsi_bt91x rsi_sdio rsi_usb rsi_91x mac80211 cfg80211 bluetooth ; do if [[ ${modules} =~ [[:space:]]${mod}[[:space:]] ]] ; then result+=$(rmmod $mod 2>&1) last=$? diff --git a/recipes-kernel/rsi-91x/rsi-91x-fw_2.5.1.bb b/recipes-kernel/rsi-91x/rsi-91x-fw_2.5.1.bb index 50753f2..eb5b6eb 100644 --- a/recipes-kernel/rsi-91x/rsi-91x-fw_2.5.1.bb +++ b/recipes-kernel/rsi-91x/rsi-91x-fw_2.5.1.bb @@ -1,6 +1,6 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/git/rsi/Makefile;beginline=1;endline=29;md5=5eb8ffe925477437d8fcd5e2859c96a1" LICENSE = "BSD-3-Clause" -PR = "r1" +PR = "r2" inherit allarch inherit update-rc.d |