summaryrefslogtreecommitdiff
path: root/recipes/misc-binary-only/prism-firmware
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/misc-binary-only/prism-firmware
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/misc-binary-only/prism-firmware')
-rw-r--r--recipes/misc-binary-only/prism-firmware/hostap.rules4
-rw-r--r--recipes/misc-binary-only/prism-firmware/prism-fw.sh32
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes/misc-binary-only/prism-firmware/hostap.rules b/recipes/misc-binary-only/prism-firmware/hostap.rules
new file mode 100644
index 0000000000..dece98ae93
--- /dev/null
+++ b/recipes/misc-binary-only/prism-firmware/hostap.rules
@@ -0,0 +1,4 @@
+#
+# update firmware on Prism cards (load it to RAM, not to Flash)
+#
+SUBSYSTEM=="net", KERNEL=="wlan*" RUN="/lib/udev/prism-fw.sh"
diff --git a/recipes/misc-binary-only/prism-firmware/prism-fw.sh b/recipes/misc-binary-only/prism-firmware/prism-fw.sh
new file mode 100644
index 0000000000..619f612be1
--- /dev/null
+++ b/recipes/misc-binary-only/prism-firmware/prism-fw.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+CARD_ID=`/usr/sbin/hostap_diag $INTERFACE|grep NICID|awk '{print $2}'|sed -e 's/id=0x//'`
+
+# 801d cards lack even Primary firmware so we cannot use hostap_diag
+PRI=/lib/firmware/pm010102.hex
+STA=/lib/firmware/rf010704.hex
+
+if [ $CARD_ID = '800c' ] || [ $CARD_ID = '8013' ] || [ $CARD_ID = '8017' ] || \
+ [ $CARD_ID = '801b' ] || [ $CARD_ID = '8022' ] || [ $CARD_ID = '8023' ] ; then
+ PRI=/lib/firmware/ak010104.hex
+elif [ $CARD_ID = '800b' ] || [ $CARD_ID = '8012' ] || [ $CARD_ID = '8016' ] || \
+ [ $CARD_ID = '801a' ] ; then
+ PRI=/lib/firmware/af010104.hex
+elif [ $CARD_ID = '800e' ] || [ $CARD_ID = '8015' ] || [ $CARD_ID = '8019' ] || \
+ [ $CARD_ID = '801d' ] ; then
+ PRI=/lib/firmware/pm010102.hex
+fi
+
+DIR=/proc/net/hostap/wlan0
+
+if [ ! -d $DIR ]; then
+ exit 1
+fi
+
+if grep -q no_pri=1 $DIR/debug; then
+ /usr/sbin/prism2_srec -gs wlan0 $PRI
+ /usr/sbin/prism2_srec -gp wlan0 $PRI
+fi
+
+/usr/sbin/prism2_srec -rp wlan0 $STA
+