/usr/sbin/prism2_param is in hostap-utils 1:0.4.7-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | #!/bin/sh
IWPRIV=iwpriv
usage()
{
cat <<EOF
Usage: prism2_param <interface> <parameter> [value]
Wrapper for setting prism2.o parameters using iwpriv and prism2_param ioctl.
This wrapper converts the given text parameter (see list below) to
corresponding prism2_param ioctl() value and uses iwpriv to set the given
value.
If value argument is not given, the current value is shown (if available).
interface:
interface name for the wireless LAN device to be used (e.g., wlan0)
parameter:
txratectrl:
0 = use host driver based TX rate control (default),
1 = use f/w based TX rate control
beacon_int: beacon interval (1 = 1024 usec)
dtim_period: DTIM period, i.e., number of beacon intervals between
successive delivery traffic identification maps (DTIMs),
used for power saving and multicast/broadcast delivery
pseudo_ibss:
0 = use IEEE 802.11 IBSS mode (default),
1 = use pseudo adhoc mode (no management frames)
other_ap_policy:
0 = skip all beacons
1 = accept beacons with our SSID
2 = accept beacons from all APs
3 = accept all beacons (even from IBSS)
dump: set RX/TX/TXEXC debug dump header bitfield
0 = do not dump frame headers
1 = dump RX frame headers
2 = dump TX frame headers
4 = dump TX error frame headers
(these values can be bitwise ORed; e.g. 3 = both RX and TX)
ap_max_inactivity: Time (in seconds) after which inactive stations
can be removed from AP's station list
ap_bridge_packets:
0 = do not bridge packets between associated stations, i.e.,
just pass them to upper layers for handling
1 = bridge packets directly between associated stations, i.e.,
upper layers do not even see these packets
ap_nullfunc_ack:
0 = let station firmware take care of data::nullfunc ACKs
1 = send "extra" ACKs for data::nullfunc frames to workaround
problems with stations using PS mode
(default 1 if STA f/w version is 0.8.0, otherwise 0)
max_wds: maximum number of allowed WDS connections (default 16)
autom_ap_wds:
0 = add WDS connections manually
1 = add WDS connections automatically to all recorded APs
(based on other_ap_policy)
ap_auth_algs: allowed authentication algorithms
0 = none (no authentication will succeed)
1 = only open
2 = only shared key
3 = open or shared key (default)
monitor_allow_fcserr:
0 = drop frames with FCS errors in monitor mode
1 = pass also frames with FCS errors
host_encrypt:
0 = do not use host encryption unless in Host AP mode
1 = use host encryption in all modes
host_decrypt:
0 = use WLAN card firmware to decrypt frames
1 = use host driver to decrypt frames
bus_master_threshold_rx:
packet length threshold for using PCI bus master on RX
(only used with hostap_pci.o and if PRISM2_BUS_MASTER is set)
bus_master_threshold_tx:
packet length threshold for using PCI bus master on TX
(only used with hostap_pci.o and if PRISM2_BUS_MASTER is set)
host_roaming:
0 = use station firmware for roaming decision (default)
1 = use host driver roaming decision (automatic scan)
2 = manual scan and roaming
bcrx_sta_key:
0 = use station specific key (WEP key mapping) to override
default keys only for RX frames sent to unicast address
("individual RA") (default)
1 = use station specific key also with broadcast RX frames
(this is against IEEE 802.11, but makes it easier to use
different keys with stations that do not support WEP key
mapping)
ieee_802_1x:
0 = do not use IEEE 802.1X specific functionality (default)
1 = use IEEE 802.1X: require 802.1X auth, filter EAPOL packets
antsel_tx:
0 = do not touch TX AntSel, i.e., use card default (default)
1 = use antenna diversity
2 = force TX AntSel pin low
3 = force TX AntSel pin high
antsel_rx:
0 = do not touch RX AntSel, i.e., use card default (default)
1 = use antenna diversity
2 = force RX AntSel pin low
3 = force RX AntSel pin high
monitor_type:
0 = IEEE 802.11 headers (ARPHRD_IEEE80211)
1 = Prism2 + IEEE 802.11 headers (ARPHRD_IEEE80211_PRISM)
2 = AVS monitor header + IEEE 802.11 headers
(ARPHRD_IEEE80211_PRISM)
wds_type: WDS type bitfield
0 = options disabled (default)
1 = use broadcast RA (WDS frame destination) for broadcast and
multicast frames
2 = use AP client mode in 'Managed mode'
4 = use standard compliant WDS (4 addr) frame also in Host AP
mode (Note! This requires STA f/w ver 1.5.x or newer)
hostscan: perform non-destructive AP scanning (i.e., maintain current
association state); this requires STA f/w ver 1.3.1 or newer
1 = send Probe Request at 1 Mbps
2 = send Probe Request at 2 Mbps
3 = send Probe Request at 5.5 Mbps
4 = send Probe Request at 11 Mbps
ap_scan: interval (in seconds) between passive AP scans on different
channels, 0 = disabled (default)
enh_sec: "enhanced security" bitfield
0 = options disabled (default)
1 = hide SSID in beacon frames
2 = ignore clients configured with "ANY" (broadcast) SSID
(3 = both options)
Note! This requires STA f/w ver 1.6.3 or newer
basic_rates: basic transmit rate bitmap
bit 0: 1 M, bit 1: 2 M, bit 2: 5.5 M, bit 3: 11 M
(default 3: 1 and 2 Mbps)
oper_rates: operational transmit rate bitmap
bit 0: 1 M, bit 1: 2 M, bit 2: 5.5 M, bit 3: 11 M
(default 15: 1, 2, 5.5, and 11 Mbps)
Note! This changes the same value as iwconfig rate command, but
as a bitfield.
hostapd: hostapd mode configuration
0 = use kernel driver for IEEE 802.11 management
1 = use user space daemon, hostapd, for IEEE 802.11 management
hostapd_sta: hostapd mode configuration
0 = no extra STA interface
1 = use hostapd to control extra STA interface (wlan#sta)
Following parameters are for debug use only;
do not use unless you are sure what you are doing!
alc: 0=disabled ALC, 1=enable ALC (automatic level control)
EOF
exit 1;
}
if [ $# != 3 -a $# != 2 ]; then
usage
fi
if ! $IWPRIV $1 | grep -q prism2_param; then
echo "Interface '$1' does not seem to support prism2_param command."
echo "Run '$0' without any arguments for usage information."
exit 2
fi
case $2 in
txratectrl) param=2 ;;
beacon_int) param=3 ;;
pseudo_ibss) param=4 ;;
alc) param=5 ;;
dump) param=7 ;;
other_ap_policy) param=8 ;;
ap_max_inactivity) param=9 ;;
ap_bridge_packets) param=10 ;;
dtim_period) param=11 ;;
ap_nullfunc_ack) param=12 ;;
max_wds) param=13 ;;
autom_ap_wds) param=14 ;;
ap_auth_algs) param=15 ;;
monitor_allow_fcserr) param=16 ;;
host_encrypt) param=17 ;;
host_decrypt) param=18 ;;
bus_master_threshold_rx) param=19 ;;
bus_master_threshold_tx) param=20 ;;
host_roaming) param=21 ;;
bcrx_sta_key) param=22 ;;
ieee_802_1x) param=23 ;;
antsel_tx) param=24 ;;
antsel_rx) param=25 ;;
monitor_type) param=26 ;;
wds_type) param=27 ;;
hostscan) param=28 ;;
ap_scan) param=29 ;;
enh_sec) param=30 ;;
io_debug) param=31 ;;
basic_rates) param=32 ;;
oper_rates) param=33 ;;
hostapd) param=34 ;;
hostapd_sta) param=35 ;;
*)
echo "Unknown parameter '$2'."
echo "Run '$0' without any arguments for usage information."
exit 3
esac
if [ $# = 3 ]; then
$IWPRIV $1 prism2_param $param $3
else
$IWPRIV $1 getprism2_param $param
fi
|