Luciano Coelho [Thu, 3 Nov 2011 06:44:41 +0000 (08:44 +0200)]
wl12xx: change blocksize alignment quirk to negative
SDIO blocksize alignment support is now the rule, not the exception.
To simplify the code in patches to come, invert the meaning of the
quirk to be negative (ie. the quirk is set if the device does _not_
support blocksize alignment).
Eliad Peller [Tue, 1 Nov 2011 13:12:50 +0000 (15:12 +0200)]
wl12xx: clear wl->vif on remove_interface
wl->vif should be cleared on remove_interface()
(rather than on stop()) even when only a single
vif is supported, because during vif mode change
stop() might not get called (e.g. because of
monitor interface existence)
Arik Nemtsov [Mon, 24 Oct 2011 15:25:20 +0000 (17:25 +0200)]
wl12xx: keep beacon-filtering enabled during STA operation
Enable beacon filtering on STA init, and don't disable it when entering
active mode. Otherwise dynamic-PS supports means we receive beacons from
the current AP during any Tx/Rx performed by the driver.
Eliad Peller [Tue, 11 Oct 2011 11:52:25 +0000 (13:52 +0200)]
wl12xx: handle injected packets
Injected packets are sent with no vif, causing the wl12xx
to NULL-dereference in multiple places.
Furthermore, injected packets are currently not sent at all,
as system_hlid doesn't belong to any specific role, so
wl1271_skb_dequeue() never return its packets.
Luciano Coelho [Fri, 7 Oct 2011 12:54:15 +0000 (15:54 +0300)]
wl12xx: use the same plat dev name for both SPI and SDIO
There's no need to have the bus name included in the platform device
name that we create. The core driver doesn't need to know about the
type of bus it uses. Any differences between the buses that need to
be handled differently in the core, can be passed in the platform data
(as the pwr_in_suspend boolean does).
Use "wl12xx" for the device name in both bus drivers. Rename the
platform driver name to "wl12xx_driver", just to differentiate from
the platform device names.
Shahar Lev [Fri, 7 Oct 2011 16:17:25 +0000 (18:17 +0200)]
wl12xx: remove warning message during IBSS Tx
mac80211 sets the carrier on an IBSS interface even when no network is
joined. Ignore garbage frames transmitted on a disconnected IBSS
interface without printing warnings.
Signed-off-by: Shahar Lev <shahar@wizery.com>
[merged with wlvif changes] Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Fri, 7 Oct 2011 11:33:29 +0000 (14:33 +0300)]
wl12xx: spi: use dev_err instead of wl1271_error
To prevent a useless dependency between the spi module and the wl12xx
module, we need to replace the wl1271_error macros with dev_err.
At the same time, remove the SPI data hexdump, since this produces way
too much data and is not particularly useful. There's no
print_hex_dump() equivalent for dynamic debug, so it's hard to control
when the dumps are printed out.
Luciano Coelho [Fri, 7 Oct 2011 11:14:25 +0000 (14:14 +0300)]
wl12xx: sdio: use dev_dbg instead of wl1271_debug
To prevent a useless dependency between the sdio module and the wl12xx
module, we need to replace the wl1271_debug macros (and friends) for
dev_dbg and other equivalents.
At the same time, remove the SDIO data hexdump, since this produces
way too much data and is not particularly useful. There's not
print_hex_dump() equivalent for dynamic debug, so it's hard to control
when the dumps are printed out.
Luciano Coelho [Fri, 7 Oct 2011 08:02:42 +0000 (11:02 +0300)]
wl12xx: move debugging definitions to a separate file
Separate the debugging macros and other definitions to a new debug.h
file. This is be needed because the sdio and spi modules don't need
to depend on the wl12xx module anymore, but still need to include
wl12xx.h. Currently they do depend on it, because of the debugging
global that wl12xx exports. A future patch will remove this
dependency.
Felipe Balbi [Thu, 6 Oct 2011 07:07:44 +0000 (10:07 +0300)]
wl12xx: move common init code from bus modules to main
Move all common parts from sdio.c and spi.c to main.c, since they now
can be handled as part of the platform driver.
Signed-off-by: Felipe Balbi <balbi@ti.com>
[forward-ported, cleaned-up and rephrased commit message]
[added a bunch of fixes and a new pdata element]
[moved some new code into main.c as well] Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 6 Oct 2011 19:59:37 +0000 (22:59 +0300)]
wl12xx: remove sdio_test module
This module has been causing more trouble than being useful. It only
tests the SDIO speed by connecting to the wl12xx chip and does some
throughput calculations. It is an ugly quick hack and, if we really
want to have it as part of wl12xx we need to clean it up and implement
it properly.
A tarball of the code has been created and posted here, with some
instructions:
Eliad Peller [Mon, 10 Oct 2011 08:13:17 +0000 (10:13 +0200)]
wl12xx: use round-robin policy for tx
Currently, a single vif might starve all the other vifs.
Save the last vif we dequeued a packet from, and continue
with the following one using a round-robin policy.
Eliad Peller [Mon, 10 Oct 2011 08:13:13 +0000 (10:13 +0200)]
wl12xx: replace all remaining wl->vif references
wl->vif is appropriate only when a single vif is being used.
Instead, pass wlvif as parameter or iterate through all
the vifs (e.g. when a global configuration was changed)
Leave wl->vif only to determine whether a vif was already
added (this check will be removed as well after both the
driver and fw will support multiple vifs)
Eliad Peller [Mon, 10 Oct 2011 08:13:11 +0000 (10:13 +0200)]
wl12xx: add power_level field to wlvif
move power_level 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.
Eliad Peller [Mon, 10 Oct 2011 08:13:10 +0000 (10:13 +0200)]
wl12xx: add channel field to wlvif
add channel 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.
Eliad Peller [Mon, 10 Oct 2011 08:13:09 +0000 (10:13 +0200)]
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.
Eliad Peller [Mon, 10 Oct 2011 08:12:58 +0000 (10:12 +0200)]
wl12xx: move tx_security_seq into wlvif
The last security seq num has to be saved across reconfigs.
Add a new "persistent" struct into wlvif, which won't get
deleted on wl12xx_init_vif_data()
Eliad Peller [Mon, 10 Oct 2011 08:12:57 +0000 (10:12 +0200)]
wl12xx: make event handling support multirole
Some events don't indicate the role they are intended for.
In these cases, iterate through all the relevant vifs,
and pass the event to each one of them.
This is only a workaround. future fw releases should indicate
the relevant role_id for such events.
Eliad Peller [Mon, 10 Oct 2011 08:12:51 +0000 (10:12 +0200)]
wl12xx: unify STA and AP tx_queue mechanism
Make sta use the global wl->links[hlid].tx_queue (by
considering its links map) instead of wl->tx_queue,
and then unify the tx and tx_reset flows for the
various vifs.
Eliad Peller [Mon, 10 Oct 2011 08:12:49 +0000 (10:12 +0200)]
wl12xx: refactor fw init into a new function
The fw boot and initialization currently happens inside the
add_interface() callback. This is wrong, as add_interface is
called for each new vif. However, we due to some fw limitation
(we have to know the actual mac address on boot), we can't
completely move it into the start() callback.
Until the fw will be fixed, refactor the fw init into
a new function, and call it from add_interface()
Eliad Peller [Wed, 5 Oct 2011 09:56:05 +0000 (11:56 +0200)]
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)
Eliad Peller [Wed, 5 Oct 2011 09:55:41 +0000 (11:55 +0200)]
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.
Eliad Peller [Wed, 5 Oct 2011 09:55:39 +0000 (11:55 +0200)]
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.
Shahar Levi [Thu, 8 Sep 2011 10:01:33 +0000 (13:01 +0300)]
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>
The wiphy max_sched_scan_ie_len attribute was not set correctly and
remained as 0, so when IEs were being passed in a scheduled scan, we
were returning -EINVAL.
Eliad Peller [Mon, 3 Oct 2011 10:06:36 +0000 (12:06 +0200)]
wl12xx: configure rate policy for p2p operations
p2p packets should go out only with OFDM rates.
Configure a new rate policy that will (later) be used
during p2p_find (when the p2p_cli / p2p_go interfaces
are in use, we won't have to use this policy, as
the configured rates should already be OFDM-only).
Additionally, update CONF_TX_MAX_RATE_CLASSES to reflect
the current value from the fw api.
ath9k_hw: set pci_express capability true for AR9480
the AR_SREV register does not seems to indicate whether AR9480 is
pci_express capable or not though the other information like macVersion
etc can be obtained properly. this fix is essential as ASPM won't be intialized
and its related driver functionality ath9k_hw_configpcipowersave won't be
called
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
this patch fixes the assumption of maximum number of GPIO pins present
in AR9287/AR9300. this fix is essential as we might encounter some
functionality issues involved in accessing the status of GPIO pins which
are all incorrectly assumed to be not within the range of max_num_gpio
of AR9300/AR9287 chipsets
Cc: stable@kernel.org Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Drake [Mon, 3 Oct 2011 10:33:02 +0000 (11:33 +0100)]
libertas: detect TX lockups and reset hardware
Recent patches added support for resetting the SD8686 hardware when
commands time out, which seems to happen quite frequently soon after
resuming the system from a Wake-on-WLAN-triggered resume.
At http://dev.laptop.org/ticket/10969 we see the same thing happen
with transmits. In this case, the hardware will fail to respond to
a frame passed for transmission, and libertas (correctly) will block
all further commands and transmissions as the hardware can only
deal with one thing at a time. This results in a lockup while the
system waits indefinitely for the dead card to respond.
Hook up a TX lockup timer to detect this and reset the hardware.
Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don Fry [Fri, 30 Sep 2011 18:40:20 +0000 (11:40 -0700)]
iwlagn: rename iwlagn module iwlwifi and alias to iwlagn.
Rename the iwlagn module as iwlwifi in preparation for future
changes. Add an alias to iwlagn for backward compatibility.
Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
In failure case locks are not allocated in mwifiex_register().
So mwifiex_free_lock_list() routine call becomes redundant.
Also we don't need to check return type for mwifiex_init_lock_list()
routine. It never fails.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The commit "mwifiex: remove list traversal.."(fcf2176c87..)
wrongly modifies AMSDU aggregation check. Due to this even though
packet size for iperf traffic is already large, we unnecessarily
try to aggregate them which adds some delay. If Tx iperf is started
on UUT for 30 seconds, UUT keeps sending Tx packets for few more
seconds.
That commit is reverted to fix the problem.
Also, MIN_NUM_AMSDU check is moved inside the loop to optimize the
loop.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This was reported and tested by Martin Walter over at AVM GmbH Berlin.
This also applies to 3.0.1 so sendint to stable.
Cc: s.kirste@avm.de Cc: d.friedel@avm.de Cc: Martin Walter <m.walter@avm.de> Cc: Peter Grabienski <pgrabien@qca.qualcomm.com> Cc: stable@kernel.org Tested-by: Martin Walter <m.walter@avm.de> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: Send nullfunc frames at lower rate during connection monitor
Recently mac80211 was changed to use nullfunc instead of probe
request for connection monitoring for tx ack status reporting
hardwares. Sometimes in congested network, STA got disconnected
quickly after the association. It was observered that the rate
control was not adopted to environment due to minimal transmission.
As the nullfunc are used for monitoring purpose, these frames should
not be sacrificed for rate control updation. So it is better to send
the monitoring null func frames at minimum rate that could help to
retain the connection.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sangwook Lee [Thu, 29 Sep 2011 11:57:17 +0000 (12:57 +0100)]
net:rfkill: add a gpio setup function into GPIO rfkill
Add a gpio setup function which gives a chance to set up
platform specific configuration such as pin multiplexing,
input/output direction at the runtime or booting time.
Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Mon, 3 Oct 2011 10:44:40 +0000 (13:44 +0300)]
ath6kl: include vmalloc.h in debug.c
Fixes compilation errors when compiling for ARM:
ath6kl/debug.c:312: error: implicit declaration of function 'vmalloc'
ath6kl/debug.c:312: warning: assignment makes pointer from integer without a cast
ath6kl/debug.c:342: error: implicit declaration of function 'vfree'
ath6kl/debug.c:696: warning: assignment makes pointer from integer without a cast
ath6kl/debug.c:871: warning: assignment makes pointer from integer without a cast
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Kalle Valo [Sat, 1 Oct 2011 06:43:09 +0000 (09:43 +0300)]
ath6kl: fix size_t related warnings
My earlier debug log additions added these warnings when compiling 64 bit
kernels:
ath6kl/init.c:962: warning: format '%d' expects type 'int',
but argument 3 has type 'size_t'
ath6kl/init.c:975: warning: format '%d' expects type 'int',
but argument 3 has type 'size_t'
ath6kl/init.c:988: warning: format '%d' expects type 'int',
but argument 3 has type 'size_t'
ath6kl/init.c:1009: warning: format '%d' expects type 'int',
but argument 3 has type 'size_t'
ath6kl/init.c:1192: warning: format '%d' expects type 'int',
but argument 4 has type 'size_t'
ath6kl/init.c:1236: warning: format '%d' expects type 'int',
but argument 4 has type 'size_t'
ath6kl/init.c:1267: warning: format '%d' expects type 'int',
but argument 4 has type 'size_t'
Reported-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Johannes Berg [Thu, 29 Sep 2011 14:04:40 +0000 (16:04 +0200)]
mac80211: document client powersave
With the addition of uAPSD and driver buffering
the powersave handling has gotten quite complex.
Add a section to the documentation to explain it
for anyone wanting to implement it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>