We used AR 5212 wireless cards for our experimentation and driver used to run these cards was madwifi-0.9.4 Channel width of the wireless cards was modified by changing the frequency of the reference clock that drives the PLL. The clock value can be changed by writing to a register (AR5K_AR5212_PHY_PLL). We also configured the turbo mode of the card for this purpose (AR5K_AR5212_PHY_TURBO). madwifi-0.9.4 does not come with the capability to write to a register directly, so we also have to modify the driver to add this functionality. More details: - address of the turbo config register AR5K_AR5212_PHY_TURBO is 0x9804 - address of the PLL register AR5K_AR5212_PHY_PLL is 0x987c - values of AR5K_AR5212_PHY_TURBO and AR5K_AR5212_PHY_PLL should be as follows: 5 MHZ : (0x00 and 0x2ea) 10 MHZ : (0x00 and 0x1ea) 20 MHZ : (0x00 and 0xea) 40 MHZ : (0x03 and 0xea) - inorder to write to these registers, we added an ioctl "writereg" that can be used with "iwpriv" command. Actual script :: (works only on AR 5212 cards) ##################################### ## usage ./script 2412 5 ath1 (to set ath1 interface to channel 1 with 5 MHz bandwidth) input=$1; freq=`echo $input | cut -d " " -f 1`; width=`echo $input | cut -d " " -f 2`; iface=`echo $input | cut -d " " -f 3`; # the fourth arg (epoch number) is for debug, not being used #echo "freq=$freq width=$width iface=$iface"; iwconfig $iface freq ${freq}M ## set width if [[ $width -eq 5 ]] then iwpriv $iface writereg 0x9804 0x00 iwpriv $iface writereg 0x987c 0x2ea elif [[ $width -eq 10 ]] then iwpriv $iface writereg 0x9804 0x00 iwpriv $iface writereg 0x987c 0x1ea elif [[ $width -eq 20 ]] then iwpriv $iface writereg 0x9804 0x00 iwpriv $iface writereg 0x987c 0xea elif [[ $width -eq 40 ]] then iwpriv $iface writereg 0x9804 0x03 iwpriv $iface writereg 0x987c 0xea else echo "Error: Not setting the width" fi exit 0; ##################################### Driver modifications to enable the command "writereg" #################################### A patch to do this for madwifi-ng is available here: http://nms.csail.mit.edu/~mythili/cmap/madwifi-ng-patch we made similar modifications to madwifi-0.9.4 ####################################