aboutsummaryrefslogtreecommitdiffstats
path: root/testing/compile_wireless_versions
blob: affde21c0736cb77f463c758650ec0bd0c4bac94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

TMP=tmp.compile_wireless_versions

if [ ! -r $TMP ]; then
    cvs export -D now -d $TMP hostap
    pushd $TMP/driver/modules
    for f in hostap_hw hostap_cs hostap_pci hostap_plx; do
	mv $f.c $f.c.orig
	cat $f.c.orig |
	sed "s%^#include <linux/wireless.h>%#include "\"wireless-test.h\""%" |
	sed "s%^#include <net/iw_handler.h>%#include "\"iw_handler-test.h\""%" \
	> $f.c
    done
    popd
fi

cd $TMP

for i in ../wireless/wireless-*.h; do
    echo $i
    ver=`echo $i | sed "s%.*wireless-\([0-9]*\).*%\1%"`
    cp $i driver/modules/wireless-test.h
    case $ver in
	13)
	    cp ../wireless/iw_handler-2.h driver/modules/iw_handler-test.h
	    ;;
	14 | 15)
	    cp ../wireless/iw_handler-3.h driver/modules/iw_handler-test.h
	    ;;
	*)
	    rm -f driver/modules/iw_handler-test.h
	    ;;
    esac
    make clean > /dev/null
    if ! make pccard pci plx > log.$ver 2>&1; then
	echo "Errors while compiling version $ver"
    fi
done