History log of /drivers/net/wireless/wl12xx/cmd.h
Revision Date Author Comments
5ec8a448e0e978103bc5ca7136084b5e2b36989e 01-Feb-2012 Eliad Peller <eliad@wizery.com> wl12xx: consider encryption and QoS in auto arp template

When configuring the arp response template,
and encryption is enabled, we should add some
space and set the protected flag bit in the fc.

In order to track the encryption type, set
wlvif->encryption_type when setting an encryption key,
and reconfigure the arp response. Clear this field on
wl1271_join, as keys have to be re-configured
anyway after a join command.

Similarly, track whether QoS is configured.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
f1d63a59635feef3481ed1972a883a5d6be7f9bb 31-Jan-2012 Eyal Shapira <eyal@wizery.com> wl12xx: add support for HW dynamic PS

FW now supports dynamic PS so we don't need to use mac80211 support.
FW will go to PSM after a specified timeout with no Rx/Tx traffic.
- Changed FW API to include new PS mode (AUTO_MODE) and including timeout parameter
- The default PS mode would be dynamic PS
- Default timeout is 100ms (same as it used to be in mac80211)
- Avoid using mac80211 APIs to disable/enable dynamic PS as we're not
using mac80211 PS control anymore.
- COEX is handled by the FW while in dynamic PS so removed
handling of SOFT_GEMINI

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
8332f0f6dc017aef9aa4a95a6a2bd6eba4c82d0a 31-Jan-2012 Eliad Peller <eliad@wizery.com> wl12xx: fw api change - update cmd/acx/event enums

Update enums/structs to the new fw api.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
cdaac6281170ee2934ad443cb60fbdd6cf318b64 31-Jan-2012 Eliad Peller <eliad@wizery.com> wl12xx: fw api change - add role_id to set_template

The set_template commands now takes the role_id as
parameter.

Usually, we'll use the vif's main role_id.
However, sometimes we'll want to use
wlvif->dev_role_id instead of wlvif->role_id,
so pass the wanted role_id as param.

Update WL127X_FW_NAME/WL128X_FW_NAME.

(This commit starts a series of fw update patches,
and changes the start() callback to return an error
in order to prevent the use of the driver during the
transition. This change will be reverted in the
last patch of series)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
679a673414473239d189b5b41ea4014b088be7b9 11-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: couple role_start_dev with roc

Device role is always started along with ROC.
Couple them together by introducing new wl12xx_start_dev
and wl12xx_stop_dev functions.

By using these functions, we solve a bug that occured during
channel switch - we started the dev role on one channel, and
ROCed on a different one.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
1b92f15ee0e0f06222d4fd36dc36960d217243b3 10-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: add band field to wlvif

add band field into the per-interface data.

mac80211 configures some values (e.g. band, channel)
globally, while we configure them per-interface.

In order to make it easier to keep track of the
configured value for each value while keeping sync
with mac80211, save these values both globally
and per-vif.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
83587505a2b63bb434f76b26a22f48283b86a467 10-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move bitrate_masks into wlvif

move bitrate_masks into the per-interface data, rather than
being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
c7ffb902cca655e4d6bdda4156407008573bb214 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move ap_hlid_map into wlvif.ap

Add wlvif->links_map bitmap to represent all the links
allocated for this vif.

AP vif also has a sta_hlid_map bitmap, which represents
the links stations connected to it (sta_hlid_bitmap is
a subset of wlvif->links_map, which itself is a subset
of the global wl->links_map)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
a8ab39a4b588e8523be2fa75671bdc9612d3467a 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move ap_global_hlid and ap_bcast_hlid into wlvif

move ap_global_hlid and ap_bcast_hlid into the per-interface
data, rather than being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
154da67c7da14ffd8da292394f8cbc81cc5ea4e3 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move sta_hlid into wlvif

move sta_hlid into the per-interface data, rather than
being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
7edebf56ca424484b9e0e51a6188c93c7fdd3a41 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move dev_role_id into wlvif

move dev_role_id into the per-interface data, rather than
being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
0603d891c5b5153f667a79357d4652824c22b54e 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move role_id into wlvif

move role_id into the per-interface data, rather than
being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
d2d66c56cf6c8727662aa321991f791604c22094 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: move basic_rate into wlvif

move basic_rate into the per-interface data, rather than
being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
87fbcb0f8c5c8fd57a4e3e7e638977c04ce1e0ca 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: define wl12xx_vif

Define a per-vif data struct.
This struct holds all the vif-specifc data, which is
currently being hold by the global wl struct.

Start by moving the basic_rate_set field into it.

NOTE: in order to make the patches a bit smaller, start by
using wl->vif in some functions, instead of changing all
the function prototypes at once. finally, wl->vif will be
removed altogether.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
784f694d0f3ca927361aa0c26de1aa340eb5b275 05-Oct-2011 Eliad Peller <eliad@wizery.com> wl12xx: replace wl->mac_addr with vif->addr

The mac address of the interface already exists in vif->addr.
Use it instead of wl->mac_addr.

It seems that due to some fw bug, we still need to set nvs->mac
to the actual mac addresss, otherwise the fw doesn't function
well (e.g. can't get dhcp address).
Thus, use wl->mac_addr for this purpose, and don't delete it yet.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
6d158ff38d8c99dc1bee775a66451168316692f4 08-Sep-2011 Shahar Levi <shahar_levi@ti.com> wl12xx: Add support for HW channel switch

The wl12xx FW supports HW channel switch. If we don't use it,
sometimes the firmware gets confused when recalibrating to the new
channel, causing RX problems. This commit adds HW channel switch
support by implementing the channell_switch op.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
[added one comment, remove the tx_flush and rephrased the commit message]
Signed-off-by: Luciano Coelho <coelho@ti.com>
1ec23f7f709b7ab5552cb9c34089633c384ec657 25-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: declare support for WIPHY_FLAG_AP_UAPSD

Declare support for uapsd when working as AP, and
set psd_type and sp_len whan a station is being added.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
31cd3aed29ca7ebcdaa2570a891a3fab75fe35f6 14-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: add wl12xx_cmd_role_start_ibss()

Add wl12xx_cmd_role_start_ibss() implementation and defintion.
This function is used in order to start the IBSS role.

Stopping the IBSS is done by using the same api as stop STA,
so there is no need for a separate function.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
b67476ef1a6417b92d3bb52510ceee266cd9ea1e 14-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: call wl12xx_cmd_set_peer_state() in AP mode

After adding a station, call wl12xx_cmd_set_peer_state().
This is required for 11n support.

Change wl12xx_cmd_set_peer_state() prototype to get hlid
as param.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
0f9c8250e10a16f48f82ffda3a5a7cb9e7b4a9ee 17-Aug-2011 Arik Nemtsov <arik@wizery.com> wl12xx: re-enable block ack session support

Incorporate interface changes for HT support.

Add ba_bitmap field to the wl1271_link struct, to indicate
activate RX BA sessions (for AP mode).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
251c177f886027fbce494202e44935762f103137 14-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: replace dummy_join with ROC/CROC commands

The ROC command asks the fw stay on the channel of the given
hlid. it currently has 2 primary functions:

1. Allow tx/rx from the device role.

In order to tx/rx packets while the stations is not associated
(e.g. auth req/resp), the device role has to be used, along
with ROC on its link.

Keep the logic similiar to the one used in dummy_join. However,
since we can't scan while we ROC, we add CROC before starting
a scan, and ROC again (if needed) on scan complete.

2. Keeping the antenna for a specific link.

We ROC until the connection was completed (after EAPOLs exchange)
in order to prevent BT coex operations from taking the antenna
and failing the connection (after this stage, psm can be used).

During association, we ROC on the station role, and then CROC
the device role, thus assuring being ROC during all the connection
process.

Delete the WL1271_FLAG_JOINED flag, and use a roc bitmap
to indicate what roles are currently ROCed.

Add wl12xx_roc/croc functions in order to wrap the roc/croc
commands while taking care of the roc bitmap.

The current ROC/CROC state-machine is a bit complicated. In
the future we'll probably want to use wpa_supplicant to control
the ROC during connection.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
a7cba38471bd457db8c536c94073673f41ef66f4 14-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: add ROC/CROC commands

Add structs and functions to support the ROC/CROC commands.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
154037d1681caaff7d33521b84017ee58b396438 14-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: change max/default template size

The max template size was increased in the new fw.
However, we should use the max size only when needed, as it
consumes some of the chip's memory.

Thus, by default initialize the templates to the default size.
Initialize to the maximum size only when required.

Use WL1271_CMD_TEMPL_DFLT_SIZE instead of some of the
predefined structs, as some of them didn't account
for additional IEs that might be added to the template.

Delete structs defintions not used after these changes.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
c690ec816f9fa2ab2b6200c5b79b6933acca49a4 14-Aug-2011 Eliad Peller <eliad@wizery.com> wl12xx: update commands & events

Change the commands and events according to the new fw api
(fw >= 6/7.3.0.0.75).

The main change is the replacement of JOIN/DISCONNECT commands,
with ROLE_START/ROLE_STOP commands.

The use of these commands should be preceded by the ROLE_ENABLE
command (allocating role resources), and followed by the
ROLE_DISABLE command (freeing role resources).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
3b40c04071ce3c0d74d19518ef884fed5c981fd7 13-Jul-2011 Johannes Berg <johannes.berg@intel.com> wl12xx: remove wext dependencies

This driver uses IW_ESSID_MAX_SIZE when it should
be using IEEE80211_MAX_SSID_LEN instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
95dac04f881322b510c45e5ae83f0dbee4f823a2 06-Jun-2011 Ido Yariv <ido@wizery.com> wl12xx: Support routing FW logs to the host

A recently added feature to the firmware enables the driver to retrieve
firmware logs via the host bus (SDIO or SPI).

There are two modes of operation:
1. On-demand: The FW collects its log in an internal ring buffer. This
buffer can later be read, for example, upon recovery.
2. Continuous: The FW pushes the FW logs as special packets in the RX
path.

Reading the internal ring buffer does not involve the FW. Thus, as long
as the HW is not in ELP, it should be possible to read the logs, even if
the FW crashes.

A sysfs binary file named "fwlog" was added to support this feature,
letting a monitor process read the FW messages. The log is transferred
from the FW only when available, so the reading process might block.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
49d750ca14cd49e76ab039b33b5a621e0a92b9fd 06-Mar-2011 Shahar Levi <shahar_levi@ti.com> wl12xx: 1281/1283 support - New radio structs and functions

New general and radio parameters structures and functions.
Implemented as separate functions due to auto-detection
between wl127x and wl128x.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
c8bde243421d759844264cf11e4248e7862c2722 02-Feb-2011 Eliad Peller <eliad@wizery.com> wl12xx: move to new firmware (6.1.3.50.49)

This patch adds support for the new wl12xx firmware (Rev 6.1.3.50.49)

Since this fw is not backward compatible with previous fw versions,
a new fw (with different name) is being fetched.

(the patch is big because it contains all the required fw api changes.
splitting it into multiple patches will result in corrupted intermediate
commits)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
7f179b468963564aa3faa5729fb3153c08b3d7c1 16-Oct-2010 Arik Nemtsov <arik@wizery.com> wl12xx: AP mode - encryption support

Encryption key configuration is different for AP/STA modes.

AP encryption keys are recorded when the BSS is not started. On BSS
start they are propagated to the AP (in wl1271_ap_init_hwenc).

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
e0fe371b74326a85029fe8720506e021fe73905a 16-Oct-2010 Arik Nemtsov <arik@wizery.com> wl12xx: AP mode - init sequence

Split HW init sequence into AP/STA specific parts

The AP specific init sequence includes configuration of templates, rate
classes, power mode, etc. Also unmask AP specific events in the event mbox.

Separate the differences between AP and STA init into mode
specific functions called from wl1271_hw_init. The first is called after
radio configuration and the second after memory configuration.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
98bdaabbbced007c7eb89cd373f9cb1640635b46 16-Oct-2010 Arik Nemtsov <arik@wizery.com> wl12xx: AP-mode high level commands

Add commands to start/stop BSS, add/remove STA and configure encryption
keys. Split the encryption commands "set key" and "set default key" into
AP and STA specific versions.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
c5312772156bb5f9b2e95e4c91526d578426a069 09-Dec-2010 Eliad Peller <eliad@wizery.com> wl12xx: add auto-arp support

The auto-arp feature of wl12xx allows the firmware to automatically
response to arp requests asking for its ip.

in order to use it, we configure the arp response template and
enable the corresponding bit in wl1271_acx_arp_filter (along with
passing its ip)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2f6724b24525fc989c0707974b23d96b36132385 24-Nov-2010 Juuso Oikarinen <juuso.oikarinen@nokia.com> wl1271: Fix setting of the hardware connection monitoring probe-req template

The probe-request template used in the hardware connection monitoring feature
thus far has been an empty one, without the SSID IE and without supported rate
IEs. This causes problems with some AP's.

Additionally, after connected scans, the template for connection maintenance
would remain to be the one last used for scanning - potentially incorrect.

Fix these by getting a pre-filled directed probe-request template for the
associated-to AP from mac80211.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
91433029e42e58d8536299f32fa55cf589adff35 07-Nov-2010 Gery Kahn <geryk@ti.com> wl1271: cleanup unused code of calibration structures

The cleanup unused code for calibration procedures.

Signed-off-by: Gery Kahn <geryk@ti.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
00d201001bd4e8a46e3d03c970abcb72256c368b 08-Nov-2010 Shahar Levi <shahar_levi@ti.com> wl1271: Change wl12xx Files Names

All files name prefix removed due to the fact that wl12xx driver supports
wl1271 and wl1273.
Also the definition in Kconfig and header files changed respectively.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
ef2f8d45771490de5b8373c25e983ee1e3aee9ea 12-Jun-2009 Kalle Valo <kalle.valo@nokia.com> wl1251: add wl1251 prefix to all 1251 files

Now that all 1271 files are split, we can add wl1251_ prefix to the files.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
77cc9e43cee58303893f3a4fb8eaa2a3288c9c17 12-Jun-2009 Juuso Oikarinen <juuso.oikarinen@nokia.com> wl12xx: Use chipset specific join commands

Add implementation to use chipset specific join commands.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ff25839bf0c99e828c26864a24417a36a6b6a31e 12-Jun-2009 Kalle Valo <kalle.valo@nokia.com> wl12xx: cmd and acx interface rework

Rework cmd and acx interfaces, it was just too confusing earlier. Now
all commands need to contain all the needed headers, either just cmd
headers or both cmd and acx headers. This accomplish to remove the
extra copy done for each command. The interfaces are now properly
documented as well.

Also try to make all commands safe for DMA transfers. I might have missed
some, but most of them should be fixed now.

And this is not all! As a free bonus you will also get some cosmetic
cleanups and code reorganisation. Order today!

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2f01a1f58889fbfeb68b1bc1b52e4197f3333490 29-Apr-2009 Kalle Valo <kalle.valo@nokia.com> wl12xx: add driver

wl12xx is a driver for TI wl1251 802.11 chipset designed for embedded
devices, supporting both SDIO and SPI busses. Currently the driver
supports only SPI. Adding support 1253 (the 5 GHz version) should be
relatively easy. More information here:

http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?contentId=4711&navigationId=12494&templateId=6123

(Collapsed original sequence of pre-merge patches into single commit for
initial merge. -- JWL)

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>