source: src/router/aircrack-ng/scantidy @ 31642

Last change on this file since 31642 was 31642, checked in by brainslayer, 2 months ago

update helper script for newer mac80211 based devices

  • Property svn:executable set to *
File size: 854 bytes
Line 
1#!/bin/sh
2if test x$1 = x
3then
4        echo "Usage $0 interfacenumber [frequency]"
5fi
6mode=`nvram get ath${1}_net_mode`
7
8if test -e "/proc/sys/dev/wifi${1}/mimo"; then
9        /usr/sbin/80211n_wlanconfig mon${1} destroy
10else
11        /usr/sbin/wlanconfig mon${1} destroy
12        iw dev del mon${1}
13fi
14#restore mode
15/sbin/ifconfig ath${1} down
16if test mode = "mixed"
17then
18        /usr/sbin/iwpriv ath${1} mode 0
19fi
20if test mode = "b-only"
21then
22        /usr/sbin/iwpriv ath${1} mode 2
23fi
24if test mode = "g-only"
25then
26        /usr/sbin/iwpriv ath${1} mode 3
27        /usr/sbin/iwpriv ath${1} protmode 0
28fi
29if test mode = "bg-mixed"
30then
31        /usr/sbin/iwpriv ath${1} mode 3
32        /usr/sbin/iwpriv ath${1} protmode 1
33fi
34if test mode = "a-only"
35then
36        /usr/sbin/iwpriv ath${1} mode 1
37fi
38/sbin/ifconfig ath${1} up
39echo "mon interface removed"
40echo
41echo "have a nice day"
Note: See TracBrowser for help on using the repository browser.