Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h.
Contains a bugfix in libertas where the SSID parsing could overrun the
buffer when the AP sends invalid information.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas]
Acked-by: Pavel Roskin <proski@gnu.org> [orinoco]
Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Besides code moving, I did the following changes:
* made some functions static
* removed some unneeded #include's
* made patch checkpatch.pl clean
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't store an (hardware base) u8 value in bss_descriptor, but just an
unsigned int (RSSI is really unsigned). Compilers generate more efficent
code for ints than for bytes.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported
scanning for a specific SSID. However, wpa_supplicant is a possible user of
this ioctl, so here is code that add's this.
While passing, removed even more of the debugfs-based scanning. You can (and
should) the SIOCSIWSCAN to ask for scans, so there is no need for
proprietary interfaces for scanning. And, besides, the scan result couldn't
be used further, e.g. not for associating.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There seems to be no reason for a separate structure; move it all
into struct lbs_private.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove the ability to specify channels to scan via debugfs
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove the ability to specify number of probes via debugfs
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
New typedefs are usually frowned upon. This patch changes
libertas_adapter -> struct libertas_adapter
libertas_priv -> struct libertas_priv
While passing, make everything checkpatch.pl-clean that gets touches.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch unifies the namespace of variables, functions defines
and structures. It does:
- rename libertas_XXX to lbs_XXX
- rename LIBERTAS_XXX to lbs_XXX
- rename wlan_XXX to lbs_XXX
- rename WLAN_XXX to LBS_XXX (but only those that were
defined in libertas-local *.h files, e.g. not defines
from net/ieee80211.h)
While passing, I fixed some checkpatch.pl errors too.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Push WEXT scan requests to a workqueue and have each partial scan queue
the next part, then only report results when the complete scan has finished.
Full scans don't go through the work queue.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This value was parsed out, but then nowhere used ... except in
some debugfs output. I can't imagine anyone wanting to use this
value for anything real (as no other driver exports it), so
bye-bye.
Along this, made the columns of
/sys/kernel/debug/libertas_wireless/*/getscantable align again.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some functions where declared in header files, but used only once. They are
now static functions.
After doing this, I found out that some functions weren't used at all. I
removed this dead code.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove unused/duplicated fields and consolidate static data rate arrays,
for example the libertas_supported_rates[] and datarates[] arrays in
the bss_descriptor structure, and the libertas_supported_rates field
in the wlan_adapter structure.
Introduce libertas_fw_index_to_data_rate and libertas_data_rate_to_fw_index
functions and use them everywhere firmware requires a rate index rather
than a rate array.
The firmware requires the 4 basic rates to have the MSB set, but most
other stuff doesn't, like WEXT and mesh ioctls. Therefore, only set the MSB
on basic rates when pushing rate arrays to firmware instead of doing a ton
of (rate & 0x7f) everywhere.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
With this patch, scanning with mshX interface will only return mesh networks. To
differentiate them, a specific mesh IE in beacons/probe responses is used. This
IE has been introduced in firmware release 5.110.14. Note:
Even though there can be at most a single mesh per channel, this scan might
return several networks in the same channel.
If all nodes in a mesh network are associated to an AP, they won't produce
beacons/probe responses, thus the network will not be listed. This will be fixed
in future firmware releases.
Scan on ethX interface is not filtered, so it will list both mesh and non-mesh
networks.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Use standard BSS capability field constants from ieee80211.h.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kill mixed case function names from scan.c/scan.h.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Replace WLAN_802_11_SSID with direct 'ssid' and 'ssid_len' members
like ieee80211. In the process, remove private libertas_escape_essid
and depend on the ieee80211 implementation of escape_essid instead.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Previously if a fixed channel was specified along with an SSID,
the channel request would be ignored during the association
process. Instead, when searching for an adhoc or infrastructure
network to join, allow filtering results based on channel so
that the driver doesn't pick a BSS on a different channel than
requested.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Do not clear the scan list except under specific conditions, such as
when (a) user-requested, or (b) joining/starting an adhoc network.
Furthermore, only clear entries which match the SSID or BSSID of the
request, not the whole scan list.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
- use a linked list for scan results
- age scan results
- pass bss_descriptors around instead of indexes into the scan table
- lock access to the scan results
- stop returning EAGAIN from SIOCGIWSCAN handler
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Start to normalize bss_descriptor with ieee80211_network so we can
eventually replace bss_descriptor more easily.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The previous scan fix did not account for scan paths other than set_scan()
that need to do a full scan at once.
Add a "full_scan" parameter to wlan_scan_networks() to control such
behaviour.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Start to normalize bss_descriptor with ieee80211_network so we can
eventually replace bss_descriptor more easily.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add the Marvell Libertas 8388 802.11 USB driver.
Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>