#!/bin/sh

L_STD=0x01    #/* standard logging that really should be there, like error messages etc. */
L_INIT=0x02    #/* special card initialisation logging */
L_IRQ=0x04    #/* interrupt stuff */
L_ASSOC=0x08    #/* assocation (network join) and station log */
L_BIN=0x10    #/* original messages from binary drivers */
L_FUNC=0x20    #/* logging of function enter / leave */
L_STATE=0x40    #/* log of function implementation state */
L_XFER=0x80    #/* logging of transfers and mgmt */
L_DATA=0x100   #/* logging of transfer data */
L_DEBUG=0x200   #/* log of debug info */
L_IOCTL=0x400   #/* log ioctl calls */
L_CTL=0x800   #/* log of low-level ctl commands */
L_BUFR=0x1000  #/* debug rx buffer mgmt (ring buffer etc.) */
L_XFER_BEACON=0x2000  #/* also log beacon packets */
L_BUFT=0x4000  #/* debug tx buffer mgmt (ring buffer etc.) */
L_BUF=0x5000 #(L_BUFR+L_BUFT)   /* debug buffer mgmt (ring buffer etc.) */
L_USBRXTX=0x8000  #/* debug USB rx/tx operations */

sleep 2
modprobe -r acx_pci
modprobe acx_pci debug=0xffff
sleep 1
#iwconfig wlan0 mode managed essid ear channel 1
#iwconfig wlan0 mode managed essid acx channel 1
iwconfig wlan0 mode ad-hoc essid acx channel 1
sleep 1
ip l set dev wlan0 up
echo "Done! Press Ctrl-C to exit..."
sleep 30
iwpriv wlan0 SetDebug $((L_IOCTL+L_INIT+L_ASSOC+L_CTL+L_IRQ))
