Commit Graph

262040 Commits

Author SHA1 Message Date
Eliad Peller baf6277ae9 wl12xx: move some functions from remove_interface() to stop()
Leave only vif-specific deinit stuff in remove_interface().
Move the global deinit (including power_off) to stop().

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-11 15:04:22 +03:00
Eliad Peller d6a3cc2ef9 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.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-11 15:04:22 +03:00
Eliad Peller 4438aca9e1 wl12xx: move last_tx_hlid into wlvif
move last_tx_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>
2011-10-11 15:04:21 +03:00
Eliad Peller 1d095475f5 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()

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-11 15:04:21 +03:00
Eliad Peller 170d0e6732 wl12xx: move recorded_ap_keys into wlvif
move recorded_ap_keys 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>
2011-10-07 08:33:50 +03:00
Eliad Peller c7ffb902cc 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>
2011-10-07 08:33:46 +03:00
Eliad Peller d0802abdf9 wl12xx: move ba fields into wlvif
move ba_fields 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>
2011-10-07 08:32:54 +03:00
Eliad Peller 04324d9981 wl12xx: move rssi_thold and last_rssi_event into wlvif
move rssi_thold and last_rssi_event 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>
2011-10-07 08:32:53 +03:00
Eliad Peller 74ec839557 wl12xx: move ps_poll_failures and psm_entry_retry into wlvif
move ps_poll_failures and psm_entry_retries 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>
2011-10-07 08:32:52 +03:00
Eliad Peller 6ec45dc282 wl12xx: move ps_compl into wlvif
move ps_compl 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>
2011-10-07 08:32:51 +03:00
Eliad Peller 252efa4f97 wl12xx: move pspoll_work into wlvif
move pspoll_work 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>
2011-10-07 08:32:50 +03:00
Eliad Peller f75c753f3c wl12xx: move default_key into wlvif
move default_key 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>
2011-10-07 08:32:49 +03:00
Eliad Peller 6a89979643 wl12xx: move beacon_int into wlvif
move beacon_int 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>
2011-10-07 08:32:48 +03:00
Eliad Peller afaf8bdb2b wl12xx: move dev_hlid into wlvif
move dev_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>
2011-10-07 08:32:47 +03:00
Eliad Peller e936bbe0dc wl12xx: move some logic into wl12xx_init_vif_data
Initialize the vif data according to the vif type

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:47 +03:00
Eliad Peller 98b8625301 wl12xx: move session_counter into wlvif
move session_counter 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>
2011-10-07 08:32:46 +03:00
Eliad Peller a8ab39a4b5 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>
2011-10-07 08:32:45 +03:00
Eliad Peller 154da67c7d 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>
2011-10-07 08:32:44 +03:00
Eliad Peller 7edebf56ca 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>
2011-10-07 08:32:43 +03:00
Eliad Peller 0603d891c5 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>
2011-10-07 08:32:42 +03:00
Eliad Peller 6840e37aec wl12xx: move aid into wlvif
move aid 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>
2011-10-07 08:32:41 +03:00
Eliad Peller bddb29b83a wl12xx: move probereq into wlvif
move probereq 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>
2011-10-07 08:32:40 +03:00
Eliad Peller 1fe9f1616e wl12xx: move ssid and ssid_len into wlvif
move ssid and ssid_len 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>
2011-10-07 08:32:39 +03:00
Eliad Peller fb0e707c83 wl12xx: move p2p into wlvif
move p2p field 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>
2011-10-07 08:32:38 +03:00
Eliad Peller 10bcf745ae wl12xx: remove set_bss_type field
set_bss_type is no longer evaluated, so delete it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:37 +03:00
Eliad Peller 536129c8ad wl12xx: move bss_type into wlvif
move bss_type 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>
2011-10-07 08:32:37 +03:00
Eliad Peller cdf0949558 wl12xx: replace wl->bssid with vif->bss_conf.bssid
Use the per-interface vif->bss_conf instead of the global wl->bssid.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:36 +03:00
Eliad Peller d2d66c56cf 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>
2011-10-07 08:32:35 +03:00
Eliad Peller 30d0c8fd5b wl12xx: move rate_set into wlvif
move rate_set 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>
2011-10-07 08:32:34 +03:00
Eliad Peller 87fbcb0f8c 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>
2011-10-07 08:32:33 +03:00
Eliad Peller 92c77c734f wl12xx: start reworking the init sequence
Split the init sequence into common commands (non role-specific)
and role-specific commands.

We still need to call the common commands only on add_interface()
(rather than on start()) as the fw must get the mac address
when uploading the nvs.

Future patches will refactor the init sequence further more.

Signed-off-by: Eliad Peller <eliad@wizery.com>
[fixed a couple of sparse warnings]
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:32 +03:00
Eliad Peller 784f694d0f 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>
2011-10-07 08:32:31 +03:00
Eliad Peller 694440d93b wl12xx: disable AP-mode-specific quirks
The current wl12xx fw (7.3.0.0.77) supports both STA and AP mode, and
we no longer use AP-mode-specific quirks.

WL12XX_QUIRK_END_OF_TRANSACTION is still used for certain HWs, while
WL12XX_QUIRK_LPD_MODE is not used anymore.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:30 +03:00
Shahar Levi 6d158ff38d 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>
2011-10-07 08:32:27 +03:00
Luciano Coelho c9e79a4714 wl12xx: set max_sched_scan_ie_len correctly
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.

Fix this by setting the attribute properly.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:31:44 +03:00
Eliad Peller 4b29886feb 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.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:31:43 +03:00
John W. Linville d6222fb0d6 Merge branch 'master' of git://github.com/padovan/bluetooth-next 2011-10-04 14:06:47 -04:00
Mohammed Shafi Shajakhan 76ed94be65 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>
2011-10-03 15:22:42 -04:00
Mohammed Shafi Shajakhan 6321eb0977 ath9k_hw: Fix number of GPIO pins for AR9287/9300
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>
2011-10-03 15:22:42 -04:00
Daniel Drake 8f641d93c3 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>
2011-10-03 15:22:41 -04:00
Eliad Peller 8a3a3c85e4 mac80211: pass vif param to conf_tx() callback
tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
	ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
	conf_tx_op (
-		struct ieee80211_hw *hw,
+		struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		u16 queue,
		const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:41 -04:00
Don Fry 3c607d27c8 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>
2011-10-03 15:22:38 -04:00
Mohammed Shafi Shajakhan 28d8c1df03 ath9k_hw: extend GPIO pin select mask for rfkill
this extends the bits for rf kill GPIO selection to [7:2] from [4:2] as
we use GPIO pin 11 as rfkill for AR9480 and also remove few unused
macros

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: "Hu, Russell" <rhu@qca.qualcomm.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:36 -04:00
Amitkumar Karwar 44b815c6b0 mwifiex: handle an error path correctly
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>
2011-10-03 15:22:36 -04:00
Amitkumar Karwar d85c5fe462 mwifiex: correct AMSDU aggregation check
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>
2011-10-03 15:22:35 -04:00
Luis R. Rodriguez 8c34559b4a ath9k_htc: add AVM FRITZ!WLAN 11N v2 support
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>
2011-10-03 15:22:35 -04:00
Rajkumar Manoharan b6f35301ef 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>
2011-10-03 15:22:32 -04:00
Sangwook Lee e209c5a7ed 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>
2011-10-03 15:19:19 -04:00
Helmut Schaa 893d73f4a1 mac80211: Allow noack flag overwrite for injected frames
Allow injected unicast frames to be sent without having to wait
for an ACK.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:19:17 -04:00
John W. Linville a5abbcb220 Merge branch 'for-linville' of git://github.com/kvalo/ath6kl 2011-10-03 14:59:35 -04:00