LinuxCommandLibrary

iwpriv

Configure vendor-specific wireless network interface settings

SYNOPSIS

iwpriv [options] [interface] [{private-command} [{val1} [{val2}]]]

PARAMETERS

-a, --all
    Apply to all wireless interfaces.

-m, --mlme
    Enable MLME (802.11 management) commands.

-f, --fixed
    Force fixed frequency (no auto-select).

-v, --verbose
    Increase output verbosity.

-w, --wait
    Wait for ioctl completion response.

interface
    Name of wireless interface (e.g., wlan0, eth1).

private-command
    Driver-specific ioctl name (list with 'iwpriv ifname').

val1, val2, ...
    Command arguments (int, string, hex; format per ioctl).

DESCRIPTION

iwpriv is a command-line tool from the wireless-tools package for managing private ioctl commands on Linux wireless interfaces using the legacy Wireless Extensions (WEX) API. It allows users to access driver-specific features not available through standard tools like iwconfig, such as advanced power management, antenna selection, monitor mode toggling, or proprietary settings in older chipsets (e.g., Atheros ath5k/ath9k, Broadcom).

Invoke it with an interface name like wlan0, optionally followed by a private command and parameters. Running iwpriv wlan0 (no arguments) displays all supported private ioctls for that device, including their names, types, and argument formats.

For example, iwpriv wlan0 set_Mode 3 might switch to ad-hoc mode if supported by the driver. GET-style commands retrieve values, while SET applies changes.

However, iwpriv is largely deprecated. Modern kernels (2.6.32+) favor the cfg80211/nl80211 framework and the iw command, which offer better security, reliability, and mac80211 support. Many drivers disable WEX private ioctls, rendering iwpriv ineffective or risky. It requires root privileges and can cause instability if misused.

Primarily used for legacy hardware or debugging older systems, iwpriv remains in distributions for compatibility but is not recommended for new deployments.

CAVEATS

Deprecated: Superseded by iw (nl80211); often unsupported on new drivers.
Driver-specific and undocumented commands risk crashes.
Requires root; no validation on inputs.
Not for mac80211 fullmac devices.

LISTING IOCTLS

Run iwpriv wlan0 to show all private commands, e.g.:
monitor : set 1 int
power : get 1 int

COMMON EXAMPLES

iwpriv wlan0 monitor 1 — enable monitor mode.
iwpriv ra0 set_WscGenPinCode 12345670 — Ralink WPS (driver-specific).

HISTORY

Developed by Jean Tourrilhes (Jean II) in the wireless-tools package.
Released ~1997-2004 alongside Linux Wireless Extensions (WEX) for 2.2/2.4 kernels.
Version 29+ added private ioctl support; peaked with 30.pre9 (2008).
Declined post-2006 with cfg80211/nl80211 adoption.

SEE ALSO

iwconfig(8), iwlist(8), iwspy(8), iw(8)

Copied to clipboard