From 6887fa041983903966cc0a6800cfd990ece871a0 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 26 Jun 2007 09:36:04 +0000 Subject: prism-firmware: added support of loading 1.8.4 firmware for Prism2/3 CF cards on insert (from Poky) This will give possibility of using WPA/WPA2 for users which cards have firmware older then 1.7.4 (which was first version with WPA support). It is alternative to reflashing cards. Tested on Prism2 and Prism3 cards, replace all previous ways of supporting them. --- .../misc-binary-only/prism-firmware/.mtn2git_empty | 0 .../misc-binary-only/prism-firmware/hostap.rules | 4 +++ .../misc-binary-only/prism-firmware/prism-fw.sh | 33 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 packages/misc-binary-only/prism-firmware/.mtn2git_empty create mode 100644 packages/misc-binary-only/prism-firmware/hostap.rules create mode 100644 packages/misc-binary-only/prism-firmware/prism-fw.sh (limited to 'packages/misc-binary-only/prism-firmware') diff --git a/packages/misc-binary-only/prism-firmware/.mtn2git_empty b/packages/misc-binary-only/prism-firmware/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/misc-binary-only/prism-firmware/hostap.rules b/packages/misc-binary-only/prism-firmware/hostap.rules new file mode 100644 index 0000000000..dece98ae93 --- /dev/null +++ b/packages/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/packages/misc-binary-only/prism-firmware/prism-fw.sh b/packages/misc-binary-only/prism-firmware/prism-fw.sh new file mode 100644 index 0000000000..c58600791c --- /dev/null +++ b/packages/misc-binary-only/prism-firmware/prism-fw.sh @@ -0,0 +1,33 @@ +#!/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/rf010804.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 + +if grep -q pri_only=0 $DIR/debug; then + /usr/sbin/prism2_srec -rp wlan0 $STA +fi -- cgit v1.2.3