iw: Print beacon-loss-event string.

There are now three possible threshold events.  The old
code assumed only above/below RSSI, and printed out 'low'
for beacon-loss-event.

Fix that, and do so with a switch statement so the compiler
can warn if the enum is further expanded w/out updating this
code.

Shorten 'connection quality monitor' to CQM to keep total string
relatively short.

Signed-off-by: Ben Greear <greearb@candelatech.com>
iw: Add VHT info in link query

Show VHT mcs, nss and bw, if present, in
iw dev link.

Eg.,
Connected to 10:6f:3f:4d:94:b4 (on mlan0)
        SSID: 122920
        freq: 5180
        RX: 0 bytes (0 packets)
        TX: 88 bytes (1 packets)
        signal: -51 dBm
        tx bitrate: 650.0 MBit/s VHT-MCS 7 80Mhz short GI VHT-NSS 2

        bss flags:
        dtim period:    1
        beacon int:     100

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
[also fix existing Mhz to MHz]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
update nl80211.h
iw: add radar detect widths to phy info

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
iw: print DFS states for channels if available

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
support TCP wakeup API

Since the configuration is complex, read it from a file.
iw: add packet offset information for wowlan pattern

Now user can provide packet offset along with the pattern in
"iw wowlan" command. Default offset will be 0 when it is not
provided.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
override default buffer size

With the TCP WoWLAN, larger messages may be needed.
To simplify the code, always use larger messages.
fix TCP wowlan bug
update nl80211.h
iw: support split wiphy dump

This adds support for the new split wiphy dump,
it only uses it for "iw list", not for "info"
though, so far. Using it for "info" would mean
querying the kernel capability first and then
using get/dump (with filter) depending on that.
iw: don't print DFS states of disabled frequencies

Also, fix indentation.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
iw: display DFS regulatory domain

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
refactor bitrate printing

I updated only "iw link" for VHT, so refactor it now to
also get "iw station dump" etc. updated and not make this
mistake again in the future.
align TDLS output
fix scan segfault when IFINDEX attribute isn't present
iw: decode some more IEs

Small update, found while verifying against the standard.

Thanks
    Jörg

The results of a boring train ride:
- Decode some IEs sent by other traveller's devices
  + IBSS ATIM window
  + TPC report
  + Old ERP IE (802.11g D4.0)
- Tiny whitespace fix
- Add Unit 'TUs' to beacon interval.

v2: TPC: Link margin element is not used in beacons

In case this project requires a sob:
Signed-off-by: Joerg Mayer <jmayer@loplof.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw:  Support can_scan_one flag.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Fix compile on systems that don't have htole16.

Use htons and manual tweaking to get it right.

Signed-off-by: Ben Greear <greearb@candelatech.com>