summaryrefslogtreecommitdiffstats
path: root/meta/packages/misc-binary-only
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-06-26 09:13:21 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-06-26 09:13:21 +0000
commit4816b77538e07835e1a705d759df33befb776461 (patch)
tree4efa8d33f6ea90e4cafb3f7b93925dd8ac8396b1 /meta/packages/misc-binary-only
parent3abd842df0b0fce1960ff8db216f7076b07af7eb (diff)
downloadpoky-4816b77538e07835e1a705d759df33befb776461.tar.gz
prism-firmware: added support of loading 1.8.4 firmware for Prism2/3 CF cards on insert
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. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1999 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/misc-binary-only')
-rw-r--r--meta/packages/misc-binary-only/prism-firmware.bb30
-rw-r--r--meta/packages/misc-binary-only/prism-firmware/hostap.rules4
-rw-r--r--meta/packages/misc-binary-only/prism-firmware/prism-fw.sh33
3 files changed, 67 insertions, 0 deletions
diff --git a/meta/packages/misc-binary-only/prism-firmware.bb b/meta/packages/misc-binary-only/prism-firmware.bb
new file mode 100644
index 0000000000..4b18d865da
--- /dev/null
+++ b/meta/packages/misc-binary-only/prism-firmware.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "Firmware for the Prism 2.x/3 cards"
2SECTION = "base"
3LICENSE = "closed"
4RDEPENDS = "hostap-utils"
5RREPLACES = "prism3-firmware prism3-support"
6RCONFLICTS = "prism3-firmware prism3-support"
7PACKAGE_ARCH = "all"
8PR = "r1"
9
10SRC_URI = "http://www.red-bean.com/~proski/firmware/Latest-prism.tar.bz2 \
11 file://prism-fw.sh \
12 file://hostap.rules"
13
14S = "${WORKDIR}/Latest-prism/"
15
16do_install() {
17 install -d ${D}${base_libdir}/firmware/
18 install -d ${D}${base_libdir}/udev/
19 install -d ${D}${sysconfdir}/pcmcia/
20 install -d ${D}${sysconfdir}/udev/rules.d/
21
22 install -m 0644 primary-RAM/*.hex ${D}${base_libdir}/firmware/
23 install -m 0644 secondary-RAM/rf010804.hex ${D}${base_libdir}/firmware/
24
25 install -m 0755 ${WORKDIR}/prism-fw.sh ${D}${base_libdir}/udev/
26 install -m 0644 ${WORKDIR}/hostap.rules ${D}${sysconfdir}/udev/rules.d/
27}
28
29PACKAGES = "${PN}"
30FILES_${PN} += "${base_libdir}"
diff --git a/meta/packages/misc-binary-only/prism-firmware/hostap.rules b/meta/packages/misc-binary-only/prism-firmware/hostap.rules
new file mode 100644
index 0000000000..dece98ae93
--- /dev/null
+++ b/meta/packages/misc-binary-only/prism-firmware/hostap.rules
@@ -0,0 +1,4 @@
1#
2# update firmware on Prism cards (load it to RAM, not to Flash)
3#
4SUBSYSTEM=="net", KERNEL=="wlan*" RUN="/lib/udev/prism-fw.sh"
diff --git a/meta/packages/misc-binary-only/prism-firmware/prism-fw.sh b/meta/packages/misc-binary-only/prism-firmware/prism-fw.sh
new file mode 100644
index 0000000000..c58600791c
--- /dev/null
+++ b/meta/packages/misc-binary-only/prism-firmware/prism-fw.sh
@@ -0,0 +1,33 @@
1#!/bin/sh
2
3CARD_ID=`/usr/sbin/hostap_diag $INTERFACE|grep NICID|awk '{print $2}'|sed -e 's/id=0x//'`
4
5# 801d cards lack even Primary firmware so we cannot use hostap_diag
6PRI=/lib/firmware/pm010102.hex
7STA=/lib/firmware/rf010804.hex
8
9if [ $CARD_ID = '800c' ] || [ $CARD_ID = '8013' ] || [ $CARD_ID = '8017' ] || \
10 [ $CARD_ID = '801b' ] || [ $CARD_ID = '8022' ] || [ $CARD_ID = '8023' ] ; then
11 PRI=/lib/firmware/ak010104.hex
12elif [ $CARD_ID = '800b' ] || [ $CARD_ID = '8012' ] || [ $CARD_ID = '8016' ] || \
13 [ $CARD_ID = '801a' ] ; then
14 PRI=/lib/firmware/af010104.hex
15elif [ $CARD_ID = '800e' ] || [ $CARD_ID = '8015' ] || [ $CARD_ID = '8019' ] || \
16 [ $CARD_ID = '801d' ] ; then
17 PRI=/lib/firmware/pm010102.hex
18fi
19
20DIR=/proc/net/hostap/wlan0
21
22if [ ! -d $DIR ]; then
23 exit 1
24fi
25
26if grep -q no_pri=1 $DIR/debug; then
27 /usr/sbin/prism2_srec -gs wlan0 $PRI
28 /usr/sbin/prism2_srec -gp wlan0 $PRI
29fi
30
31if grep -q pri_only=0 $DIR/debug; then
32 /usr/sbin/prism2_srec -rp wlan0 $STA
33fi