Commit Graph

15 Commits (8fc229a51b0e10f4ceb794e8b99fa0a427a7ba41)

Author SHA1 Message Date
Arik Nemtsov 2f18cf7c3b wlcore: reconfigure sleep_auth when removing interfaces
The sleep_auth value of the last interface to be set up prevailed when
an interface was removed. Take care of this by correctly configuring the
value according to the remaining STA/AP interfaces.

Take this opportunity to refactor the sleep_auth setting code for better
readability.

[Small style fix. -- Luca]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21 12:51:55 +03:00
Arik Nemtsov 66340e5b25 wlcore: allow setting sleep_auth before interface init
Hold a value for sta_sleep_auth that is amenable to change by debugfs.
When detecting a legal value in this variable on interface init, use it
as an override value for sleep_auth.

This makes debugging more intuitive using the debugfs value.

Increment the conf version since we added an element to the conf
structure.

Note: An AP going up will always set sleep_auth to PSM_CAM.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21 12:51:41 +03:00
Luciano Coelho 26b5858a67 wlcore: add a debugfs entry to allow changing the sleep mode by hand
For FW debugging purposes, we may need to change the sleep mode
(aka. sleep_auth) by hand, and set it to the mode we want.  To allow
this, a debugfs entry is added.

Now we store the sleep_auth value that has been set and use that
instead of the quirk to decide whether we should enter ELP or not.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-21 12:44:17 +03:00
Luciano Coelho 4987257c30 wlcore: abstract debugfs fw_stats to be handled by the lower drivers
The FW statistics differ from hardware to hardware.  This commit
prepares for hardware-specific implementation of the FW statistics
debugfs entries.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:02 +03:00
Luciano Coelho c331b344d5 wlcore/wl12xx: add plt_init op and move the code to wl12xx
PLT mode needs to be initialized differently for each chip.  This
patch adds an operation to init PLT and moves the existing PLT
initialization into the wl12xx driver.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:33 +03:00
Eyal Shapira 4161923a24 wlcore: fix undefined symbols when CONFIG_PM is not defined
commit c21eebb503
"wl12xx: add RX filters ACX commands" breaks the build
when CONFIG_PM isn't defined:

ERROR: "wl1271_rx_filter_get_fields_size"
[drivers/net/wireless/ti/wlcore/wlcore.ko] undefined!
ERROR: "wl1271_rx_filter_flatten_fields"
[drivers/net/wireless/ti/wlcore/wlcore.ko] undefined!

code in drivers/net/wireless/ti/wlcore/acx.c is using these
functions unconditionally while they are #ifdefed CONFIG_PM.
Fix it by ifdefing all relevant RX filters code with CONFIG_PM.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-29 13:45:23 -04:00
Luciano Coelho 3246a7fbc5 wlcore: fix pointer print out in wl1271_acx_set_rx_filter()
The debug print in wl1271_acx_set_rx_filter() was causing the
following warning:

  CC      drivers/net/wireless/ti/wlcore/acx.o
drivers/net/wireless/ti/wlcore/acx.c: In function ‘wl1271_acx_set_rx_filter’:
drivers/net/wireless/ti/wlcore/acx.c:1759:2: warning: cast from pointer to integer of different size

Instead of casting the pointer to an integer, use %p to print it our
instead.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 13:08:27 -04:00
Eyal Shapira c21eebb503 wl12xx: add RX filters ACX commands
More prep work for wowlan patterns.
Added ACXs to set global RX filter behavior and
enable or disable a specific filter.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15 17:53:23 -04:00
Arik Nemtsov fa7930afa5 wlcore/wl12xx: add hw op to get rate-mask for AP-link in STA mode
In some chip-families, there are operating modes where we must mask-out
certain Tx rates, and/or tweak the rate-mask with special HW-specific
bits.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:44:01 +03:00
Luciano Coelho 5453dc105a wlcore/wl12xx: use a single memory config and reset if using wl127x
Instead of having two memory configuration sets, one for wl127x and
one for wl128x, we can use only one which should be correctly set by
the lower driver.

The wl12xx driver now uses the wl128x memory config by default but
changes it when if it identifies the wl127x chips.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:44:01 +03:00
Luciano Coelho 9d68d1eea7 wlcore/wl12xx: add hw_init operation
Move all the wl12xx-specific hw initialization procedures into a new
hw_init op.  Move some commands and ACX functions to wl12xx.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:44:00 +03:00
Arik Nemtsov 72b0624fa5 wlcore/wl12xx: set the number of Tx descriptors per chip family
Each chip family can have a different amount of Tx descriptors. These
are set on init.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:43:58 +03:00
Luciano Coelho 00782136b4 wlcore/wl12xx: implement chip-specific register tables
Add register tables support in wlcore, add some new IO functions to
read and write to chip-specific register and data addresses.  Move
some common register values from wl12xx to wlcore and add the
registers table to wl12xx.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:43:56 +03:00
Luciano Coelho c31be25a71 wl12xx/wlcore: move wl1271 struct to wlcore and add ops
In order to add chip-specific operations and prepare for future
elements that need to be set by the lower driver, move the wl1271
structure to the wlcore.h file and add an empty placeholder for the
operations structure.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:43:56 +03:00
Luciano Coelho 7b3115f265 wl12xx/wlcore: rename wl12xx to wlcore
Rename the wl12xx driver directory to wlcore as an initial step
towards the split of the driver into wlcore and wl12xx.  We just
rename the directory first to keep git blame happy.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12 08:43:56 +03:00