Boot2 version used to be hardcoded in the uploaded firmware,
this patch preserves the boot2 version before uploading firmware
and sends it to the firmware again on resume.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Driver support for the monitor mode support that will be available in the next
OLPC 'bleeding edge' Marvell firmware release (most likely, 5.110.16.p2).
To activate monitor mode,
echo mode > /sys/class/net/{ethX,mshX}/device/libertas_rtap
where mode is the hex mask that specifies which frames to sniff (in short, 0x1
for data, 0x2 for all management but beacons, 0x4 for beacons). Any non zero
mode will activate the monitor mode, inhibiting transmission in ethX and mshX
interfaces and routing all the incoming traffic to a new rtapX interface that
will output the packets in 802.11+radiotap headers format.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
multipledtim was initialized with MRVDRV_DEFAULT_MULTIPLE_DTIM and then
kept at that value, so we could use that define directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
locallisteninterval was initialized with 0, but there is no code that
changes it, rendering it rather useless.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
No code ever initialized this variable, so it was 0 because of kzalloc().
But no other code changes it, making it rather useless.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Those two variables were initialized with some default values, but there
is no code that would ever change them. So we could use as well the defaults
directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The value of txrate was only set by a CMD_802_11_TX_RATE_QUERY command,
but there was no code in the driver that ever issued this command.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There was nowhere any code that used the values of those
variables.
This patch also removes two static functions that are now unused.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
... and LBS_DEB_CMD for command execution. Also tidies misc
comments to give a consistent output.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Currently, when you define LBS_DEB_HEX, you get every hex dump in the
whole driver, e.g. for LBS_DEB_CMD, LBS_DEB_RX, LBS_DEB_TX etc. This
patch makes sure that you only get the hexdump that you're interested in.
Renamed lbs_dbg_hex() into lbs_deb_hex(), like the other lbs_deb_XXX()
macros.
Made lbs_deb_hex() issue a line feed (and a new prompt) after 16 bytes.
As lbs_deb_hex() now prints the ":" after the prompt by itself, removed
the misc colons in the various *.c files.
lbs_deb_XXX() now print the debug category as well.
As lbs_deb_XXX() --- and especially lbs_deb_11d() --- now print the
category, I removed various "11D:" prefixes in 11d.c as well.
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>
Mistakently introduced by a previous patch to upper-case all command
constants.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove the thread.h abstractions and opencode kthread stuff
to make it clearer.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
It doesn't touch hardware and therefore doesn't need endian notations
either.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't clobber the firmware's internal state machine by setting
ENABLE_RSN more than once during the 4-way handshake. Check what
the ENABLE_RSN status is and only set if it should be changed.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix WPA so it works up through the supplicant 4-Way handshake process.
Doesn't successfully pass traffic yet; may be problems installing
the GTK to the firmware.
- RSN needs to be enabled before the association command is sent
- Use keys from the association request not the adapter structure
- cmd_act_mac_strict_protection_enable != IW_AUTH_DROP_UNENCRYPTED
- Fix network filtering logic in is_network_compatible() WPA helpers
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Updated commands fwt_add and fwt_list, bt_list.
New commands: bt_get_invert, bt_set_invert, to invert the blinding table,
i.e., receive only frames from nodes listed in the BT.
This patch needs/is needed for firmware 5.220.9.p11.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Actually, this patch removev wlan_dev_t totally and puts the used variables
of it directly into wlan_private. That reduces one level of indirection and
looks a little bit simpler. It's now "priv->card" and not
"priv->wlan_dev.card" and "priv->dev" instead of "priv->wlan_dev.netdev"
Changed two occurences of "((wlan_private *) dev->priv)->wlan_dev.netdev"
into "dev", because I didn't see the point in doing pointer-ping-pong.
The variables "ioport", "upld_rcv" and "upld_type" where unused. They have
been removed.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* add CONFIG_LIBERTAS to Kconfig
* remove global variable libertas_fw_name, the USB module might want to
use a different default FW name than the CF module, so libertas_fw_name
is now local to if_usb.c
* exported some symbols as GPL
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This functions makes all libertas_sbi_XXX functions static to the
if_usb.c file and renames them to if_usb_XXXX(). The get called from
other places of the source code via priv->hw_XXXX().
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The debug output of libertas was either not present or it was overwhelming.
This patch adds the possibility to specify a bitmask for the area of
interest. One should then only get the desired output.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
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>