Commit Graph

9 Commits

Author SHA1 Message Date
Andriy Voskoboinyk
a061fea6ee net80211 + drivers: hide size of 'bands' array behind a macro.
Auto-replace 'howmany(IEEE80211_MODE_MAX, 8)' with 'IEEE80211_MODE_BYTES'.
No functional changes.
2016-04-29 22:14:11 +00:00
Andriy Voskoboinyk
31021a2b4e net80211: replace internal LE_READ_*/LE_WRITE_* macro with system
le*dec / le*enc functions.

Replace net80211 specific macros with system-wide bytestream
encoding/decoding functions:
- LE_READ_2 ->  le16dec
- LE_READ_4 ->  le32dec
- LE_WRITE_2 -> le16enc
- LE_WRITE_4 -> le32enc

+ drop ieee80211_input.h include, where it was included for these
operations only.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D6030
2016-04-20 18:29:30 +00:00
Andriy Voskoboinyk
5036353a49 rtwn: import r290048.
- Fix scanning from AUTH state.

Tested by: Simone Mario Lombardo <evil.lombo@gmail.com>

PR:		203105
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4820
2016-02-21 18:51:48 +00:00
Andriy Voskoboinyk
798e1ce39b rtwn: do not start vap when initialization fails
- Start vap(s) (via ieee80211_start_all()) only when initialization
succeeds; stop the first vap otherwise (via ieee80211_stop());
- Do not try to stop a device multiple times
(move (sc->sc_flags & RTWN_RUNNING) check to urtwn_stop_locked()).

Tested by:	kevlo
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5058
2016-01-26 16:50:59 +00:00
Andriy Voskoboinyk
5274f944ba rtwn: use ieee80211_restart_all() for device reset
Tested by:	kevlo
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5057
2016-01-26 16:34:27 +00:00
Andriy Voskoboinyk
6420fb29aa rtwn: import r290022 (do not filter out control frames in the RX path)
Tested by:	kevlo
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4838
2016-01-12 00:12:18 +00:00
Andriy Voskoboinyk
950678b488 rtwn: fix sequence number assignment (part of r290630)
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4819
2016-01-09 21:45:21 +00:00
Andriy Voskoboinyk
0046e1868f net80211 drivers: fix ieee80211_init_channels() usage
Fix out-of-bounds read (all) / write (11n capable) for drivers
that are using ieee80211_init_channels() to initialize channel list.

Tested with:
 * RTL8188EU, STA mode.
 * RTL8188CUS, STA mode.
 * WUSB54GC, HOSTAP mode.

Approved by:	adrian (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D4818
2016-01-07 18:41:03 +00:00
Adrian Chadd
bcaed14bd9 [rtwn] bring over initial rtwn driver.
This is a port from openbsd.  It's incomplete and unstable, but it's better
than nothing.  I have no plans to MFC this until it's complete and stable.

Submitted by:	kevlo
2015-12-31 22:32:36 +00:00