Commit Graph

287137 Commits (3dfea27d103e9913698cf1a2c86745a74c7c556b)

Author SHA1 Message Date
Emmanuel Grumbach af634bee8c iwlwifi: kill bus_apm_config
This handler was called from the transport layer only. Merge it
to the transport's apm_init.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:37:06 -08:00
Emmanuel Grumbach cf6142975b iwlwifi: consolidate the start_device flow
Now there is only one transport function that launch a specific fw:
trans_ops->start_fw. This one replaces trans_ops->start_device and
trans_ops->kick_nic. The code that actually loads the fw to the
device has been moved to the transport specific code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:58 -08:00
Emmanuel Grumbach d48e2074e2 iwlwifi: move the RF kill logic from iwl_probe to transport
This is another clean up of the proble flow.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:51 -08:00
Emmanuel Grumbach cc56feb2eb iwlwifi: introduce trans_ops->stop_hw
This handler stops the HW and puts it in low power state.
It will allow to clean up the flows in the upper layers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:42 -08:00
Emmanuel Grumbach a6c684ee48 iwlwifi: move apm_init to start_hw
This is transport related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:36 -08:00
Emmanuel Grumbach ebb7678d00 iwlwifi: move prepare_card_hw to start_hw
Kill the trans_ops->prepare_card_hw which is now useless.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:24 -08:00
Emmanuel Grumbach 57a1dc8909 iwlwifi: rename trans_ops->request_irq to trans_ops->start_hw
This handler will become thicker, reflect its real role now.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:13 -08:00
Emmanuel Grumbach 8467ab4f42 iwlwifi: don't use the bus for ucode fw_desc any more
This is transport related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:36:06 -08:00
Emmanuel Grumbach ea4caade10 iwlwifi: remove the pointer to dev from the bus layer
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:35:53 -08:00
Emmanuel Grumbach 1042db2af1 iwlwifi: give trans to all the read / write functions
From now on, the transport layer in charge of providing access to the
device. So change all the driver to give a pointer to the transport
to all the low level functions that actually access the device.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:35:45 -08:00
Emmanuel Grumbach 0390549571 iwlwifi: the read / write register ops move to transport
Most of the accesses to the registers are done from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:35:38 -08:00
Emmanuel Grumbach a42a184458 iwlwifi: move the bus configuration to transport
All the bus configuration is now done in the transport
allocation fucntion.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:34:48 -08:00
Emmanuel Grumbach b52e7ea109 iwlwifi: allocate the transport from the bus layer
Change the way we alloc the transport on the way.
Since the transport is allocated from a bus specific area, we can
give the bus specific parameters (i.e. pci_dev for PCI) to the
transport. This will be useful when the bus layer will be killed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:18:15 -08:00
Emmanuel Grumbach e81fb554cf iwlwifi: move the shrd memory from priv
Allocating the shrd area dynamically will allow more agility
while revamping the flows.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 14:15:33 -08:00
Emmanuel Grumbach 8747bb4936 iwlwifi: separate the APM from the EEPROM
There is no link between the two. Ensure that the NIC is on outside
the code of the EEPROM handling.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 13:40:25 -08:00
Gregory Greenman a591697730 iwlwifi: Connect IDI transport to driver.
This patch connects IDI transport to driver. It does so
by using a number of ifdefs at this stage.
IDI is a new transport that is under development.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 13:40:16 -08:00
Emmanuel Grumbach ed6a380340 iwlwifi: add fw_alive to transport layer API, kill tx_start
Define a new handler in the transport layer API: fw_alive.
Move iwl_reset_ict to this new handler, and move the content
of tx_start to this handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02 13:40:07 -08:00
Wey-Yi Guy 96d28e00d5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into wireless-next 2012-02-02 13:38:27 -08:00
Chilam Ng 5fbea5dcc0 ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct for create_qos command
The nominal_phy field is uninitialized. Initialize it to min_phy_rate for
create_qos.

kvalo: simplified the equation as checkpatch complained for a too long line

Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-02 10:19:54 +02:00
Kalle Valo 1b46dc0486 ath6kl: fix compiler warning in ath6kl_init_hw_params()
Both Luis and John reported that they see a compiler warning:

drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params':
drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’
may be used uninitialized in this function

Oddly enough I have never seen it. But AFAICT the code is correct and
hw is not used uninitalized so add uninitialized_var() to inform that to
the compiler.

Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-02 10:13:06 +02:00
Masanari Iida 3c325fbd0c ath6kl: Fix typo in cfg80211.c
Correct spelling "spported" to "supported" in
drivers/net/wireless/ath/ath6kl/cfg80211.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-02 10:09:37 +02:00
Eliad Peller 07ae2dfcf4 mac80211: timeout a single frame in the rx reorder buffer
The current code checks for stored_mpdu_num > 1, causing
the reorder_timer to be triggered indefinitely, but the
frame is never timed-out (until the next packet is received)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Cc: <stable@vger.kernel.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01 15:26:00 -05:00
Emmanuel Grumbach 3d29dd9b5b iwlwifi: don't mess up QoS counters with non-QoS frames
In my AMPDU rework, I rely on the sequence numbers of frames. But
I didn't check that the frame has a valid tid before updating the
tracking counters. As a result, the Tx queues were stalled. People
who hit this bug saw that we simply didn't let any data out.

This bug was introduced in 3.3.

This patch fixes that and checks that the frame is a QoS frame before
looking at its tid and changing the counters.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01 15:26:00 -05:00
Hauke Mehrtens a6c84622b7 ssb: fix cardbus slot in hostmode
ssb supports one extra device on the cardbus. This results in two
devices in total, one beeing the host controller itself and the other
the external device connected to the hostcontroller over cardbus.

This makes the cardbus slot work on the Linksys WRT150N.

Reported-by: Aaron Z <aaronz@pls-net.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01 15:26:00 -05:00
John W. Linville 5fb8c182d2 iwlwifi: make "Tx aggregation enabled on ra =" be at DEBUG level
Average users either don't care or they think that message indicates a
problem...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01 15:26:00 -05:00
Luigi Tarenga 7fc4175564 rt2800lib: fix wrong -128dBm when signal is stronger than -12dBm
This patch correct the type of variables containing the rssi
values read from the rxwi.

In function rt2800_agc_to_rssi() 3 variables (rssi0, rssi1, rss2)
defined as int was assigned a 16bit signed values as unsigned.
From a test with a hi-gain antenna I verified that the rxwi
contains signed rssi values in the  range -13/+81 (inclusive)
with 0 as an error condition. In case of negative values a
condition is triggered and the function return -128dBm while
the signal is at its maximum. This patch correct the cast so
negative values are not treated as very high positive values
(ex. -13 does not become 243).

Signed-off-by: Luigi Tarenga <luigi.tarenga@gmail.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01 15:25:59 -05:00
Jesper Juhl f9721ed270 bcma: Fix mem leak in bcma_bus_scan()
bcma_bus_scan() leaks 'struct bcma_device' bytes if
bcma_get_next_core() returns error.

Restructure the code so we always kfree() the memory we allocate to
the variable 'core' before it goes out of scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-01 15:24:35 -05:00
John W. Linville 874239f51f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-02-01 10:48:50 -05:00
Santosh Sajjan cca4d5adcf ath6kl: Workaround to support Deep Sleep with MSM.
Set the host pm flag MMC_PM_WAKE_SDIO_IRQ to allow host
to disable the sdc2_clk and sdc2_h_clk,so that the MSM device
enter into TCXO shutdown.

Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-31 21:06:46 +02:00
Larry Finger b0302aba81 rtlwifi: Convert to asynchronous firmware load
This patch addresses a kernel bugzilla report and two recent mail threads.

The kernel bugzilla report is https://bugzilla.kernel.org/show_bug.cgi?id=42632,
which reports a udev timeout on boot.

The first mail thread, which was on LKML (http://lkml.indiana.edu/hypermail/
linux/kernel/1112.3/00965.html) was for a WARNING that occurs after a
suspend/resume cycle for rtl8192cu.

The scond mail thread (http://marc.info/?l=linux-wireless&m=132655490826766&w=2)
concerned changes in udev that break drivers that delay while firmware is loaded
on modprobe.

This patch converts all rtlwifi-based drivers to use the asynchronous firmware
loading mechanism. Drivers rtl8192ce, rtl8192cu and rtl8192de share a common
callback routine. Driver rtl8192se needs different handling of the firmware,
thus it has its own code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:50 -05:00
Sujith Manoharan feced2012e ath9k: Print the correct channel mode
channelFlags doesn't contain the operating HT mode.
Use IS_CHAN_HT40 to determine if the current channel is
in HT40 mode.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:47 -05:00
Sujith Manoharan 0ed7b93e30 ath9k_htc: Load firmware asynchronously
This patch modifies ath9k_htc to load the needed
firmware in an asynchronous manner, fixing timeouts
that were introduced with the new udev changes.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:42 -05:00
Rafał Miłecki ed072f9e80 MAINTAINERS: update b43(legacy) mailing list
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:37 -05:00
Johannes Berg 2ed81710cc iwlwifi: always restrict scan dwell in P2P
Whenever the PAN (P2P) context is active, it
has timers in the uCode that prevent sleep,
so scanning can't be out of channel for more
than the beacon interval programmed into the
device.

Before this patch, a full scan including any
passive channels when P2P was active would
stall forever because it wouldn't find time
to execute the passive requests (for default
beacon intervals of 100 TU.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:36 -05:00
Wey-Yi Guy dcc3ec04c1 iwlwifi: add option to disalbe LED
Led has no use for some platform.
Add additional module parameter option to disable LED

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:34 -05:00
Johannes Berg 2b2db58d65 iwlwifi: fix uCode event tracing
Fix multiple bugs in event tracing:

1) If you enable uCode tracing with the device down,
   it will still attempt to access the device and
   continuously log "MAC is in deep sleep!" errors.
   Fix this by only starting logging when the device
   is actually alive.

2) Now you can set the flag when the device is down,
   but logging doesn't happen when you bring it up.
   To fix that, start logging when the device comes
   alive. This means we don't log before -- we could
   do that but I don't need it right now.

3) For some reason we read the error instead of the
   event log -- use the right pointer.

4) Optimise SRAM reading of event log header.

5) Fix reading write pointer == capacity, which can
   happen due to racy SRAM access

6) Most importantly: fix an error where we would try
   to read WAY too many events (like 2^32-300) when
   we read the wrap counter before it is updated by
   the uCode -- this does happen in practice and will
   cause the driver to hang the machine.

7) Finally, change the timer to 10ms instead of 100ms
   as 100ms is too slow to capture all data with a
   normal event log and with 100ms the log will wrap
   multiple times before we have a chance to read it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:32 -05:00
Wey-Yi Guy 0a79bb57d4 iwlwifi: fix typo
Fix few places of typo

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:30 -05:00
Helmut Schaa 4f3eb0ba48 mac80211: Move num_sta_ps counter decrement after synchronize_rcu
Unted the assumption that the sta struct is still accessible before the
synchronize_rcu call we should move the num_sta_ps counter decrement
after synchronize_rcu to avoid incorrect decrements if num_sta_ps.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:28 -05:00
Simon Wunderlich 19468413e8 mac80211: add support for mcs masks
* Handle MCS masks set by the user.
* Match rates provided by the rate control algorithm to the mask set,
  also in HT mode, and switch back to legacy mode if necessary.
* add debugfs files to observate the rate selection

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:26 -05:00
Simon Wunderlich 24db78c05b nl80211: add support for mcs masks
Allow to set mcs masks through nl80211. We also allow to set MCS
rates but no legacy rates (and vice versa).

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:25 -05:00
Larry Finger d273bb20c0 rtlwifi: Move pr_fmt macros to a single location
Although the rtlwifi family of devices contains 11 copies of the pr_fmt
macro, the macro is not defined for all routines that need it. By moving
the macro to wifi.h, a single copy is available for all routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:23 -05:00
Helmut Schaa 608383bfc0 mac80211: Fix incorrect num_sta_ps decrement in ap_sta_ps_end
If the driver blocked this specific STA with the help of
ieee80211_sta_block_awake we won't clear WLAN_STA_PS_STA later but
still decrement num_sta_ps. Hence, the next data frame from this
STA will trigger ap_sta_ps_end again and also decrement num_sta_ps
again leading to an incorrect num_sta_ps counter.

This can result in problems with powersaving clients not waking up
from PS because the TIM calculation might be skipped due to the
incorrect num_sta_ps counter.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:20 -05:00
Helmut Schaa 2ab694d302 mac80211: Fix incorrect num_sta_ps decrement in __sta_info_destroy
When WLAN_STA_PS_DRIVER is set by ieee80211_sta_block_awake the
num_sta_ps counter is not incremented. Hence, we shouldn't decrement
it in __sta_info_destroy if only WLAN_STA_PS_DRIVER is set. This
could result in an incorrect num_sta_ps counter leading to strange side
effects with associated powersaving clients.

Fix this by only decrementing num_sta_ps when WLAN_STA_PS_STA was set
before.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:48:18 -05:00
Johannes Berg 83d5cc0124 mac80211: station state transition error handling
In the future, when we start notifying drivers,
state transitions could potentially fail. To make
it easier to distinguish between programming bugs
and driver failures:
 * rename sta_info_move_state() to
   sta_info_pre_move_state() which can only be
   called before the station is inserted (and
   check this with a new station flag).
 * rename sta_info_move_state_checked() to just
   plain sta_info_move_state(), as it will be
   the regular function that can fail for more
   than just one reason (bad transition or an
   error from the driver)

This makes the programming model easier -- one of
the functions can only be called before insertion
and can't fail, the other can fail.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:41:25 -05:00
John W. Linville c037b8367c Revert "mac80211: Do not scan for IBSS merge with a fixed BSSID."
This reverts commit f1e3be1561.

Johannes Berg <johannes@sipsolutions.net> thinks that this patch is
incorrect.  I'll defer to his judgment.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-30 15:28:11 -05:00
Raja Mani 3c411a4344 ath6kl: Return a proper error code when not in connected state
Error code ENOTCONN is more suitable than EINVAL to report
when the driver is not in connected state in ath6kl_wow_suspend().

I found this during code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30 21:22:55 +02:00
Raja Mani 081c7a84e9 ath6kl: Wait for host sleep mode cmd processed event during WOW suspend
For every WMI_SET_HOST_SLEEP_MODE_CMDID command (send from the host),
the firmware sends WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID as
an acknowledgement to the host.

In order to being sync with the firmware, the host has to wait for
WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENT event before going to
the suspend state. This patch ensures ath6kl_wow_suspend() waits
until it gets this event after sending set host sleep mode command.

This patch adds,
 * New command WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID in
   WMI event table.
 * New WMI function ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx()
   to process the event.
 * New flag HOST_SLEEP_MODE_CMD_PROCESSED in VIF flags to record
   the arrival of the event.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30 21:22:55 +02:00
Raja Mani d91e8eee04 ath6kl: Configure WOW patterns while going to wow_suspend
First preference is given to the user configured WOW patterns.
If the user doesn't configure any patterns (for ex, via iw command),
the default patterns will be configured based on the current mode
(vif->nw_type) while going to WOW suspend.

Summary of changes:

  * ath6kl_wow_ap() is added to configure the below default
    patterns when the system enters into WOW suspend in AP mode.
      + Unicast IP, EAPOL-like and ARP packet pattern
      + ARP packet pattern
      + mDNS/SSDP/LLMNR pattern
      + DHCP broadcast pattern

 * ath6kl_wow_sta() is added to configure the below default
   patterns when the system enters into WOW suspend in STA mode.
      + Unicast packet pattern
      + mDNS/SSDP/LLMNR pattern

  * Move the user provided WOW patterns configuration code
    from ath6kl_wow_suspend() to a separate function called
    ath6kl_wow_usr().

  * Two argument variable's ('filter' and 'mask) data type in
    ath6kl_wmi_add_wow_pattern_cmd() are changed from 'u8 *' to
    'const u8 *'. This is needed to make all pattern and mask
    arrays to be 'static const u8' in the caller function.

  * New conditional check is added to make sure user
    configured pattern count is within the limit (WOW_MAX_FILTERS_PER_LIST).

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30 21:22:55 +02:00
Raja Mani e390af779d ath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspend
Using this patch, the user can bypass existing auto
suspend mode selection logic and force ath6kl to enter
into the suspend mode what he/she wants.

If the user doesn't choose any suspend mode while doing
insmod of the driver, auto suspend mode selection logic
will kick in and choose suspend mode based on the host
SDIO controller capability.

Generic module parameter is required to specify suspend
mode including Deep Sleep and WOW while doing insmod.
Renaming existing mod param variable suspend_cutpower
would be sufficient to meet this requirement.

New module parameter suspend_mode can take any one of
the below suspend state,
   1. cut power
   2. deep sleep
   3. wow

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30 21:22:54 +02:00
Vasanthakumar Thiagarajan c86515412f ath6kl: Fix kernel panic during rx aggregation
"ath6kl: Define a structure for connection specific aggregation information"
introduces this. In aggr_conn_init(), vif->aggr_cntxt is assigned to
aggr_conn->aggr_info, but vif->aggr_cntxt is not initialized at this
point, this would end up accessing an invalid pointer in aggregation
receive path. Fix this by passing the correct aggr_info to aggr_conn_init().
The panic trace would look like.

[<ffffffff8159e02e>] panic+0xa1/0x1c6
[<ffffffff8103773d>] ? kmsg_dump+0xfd/0x160
[<ffffffff815a2f6a>] oops_end+0xea/0xf0
[<ffffffff8102b95d>] no_context+0x11d/0x2d0
[<ffffffff8102bc5d>] __bad_area_nosemaphore+0x14d/0x230
[<ffffffff815a5c4d>] ? do_page_fault+0x30d/0x520
[<ffffffff8102bd53>] bad_area_nosemaphore+0x13/0x20
[<ffffffff815a5cfd>] do_page_fault+0x3bd/0x520
[<ffffffff8108bd60>] ? __lock_acquire+0x320/0x1680
[<ffffffff812e3a9d>] ? trace_hardirqs_off_thunk+0x3a/0x3c
[<ffffffff815a2385>] page_fault+0x25/0x30
[<ffffffffa0487a5f>] ? aggr_slice_amsdu+0xdf/0x170 [ath6kl_core]
[<ffffffffa0487bac>] aggr_deque_frms+0xbc/0x190 [ath6kl_core]
[<ffffffffa0488404>] ath6kl_rx+0x3e4/0xae0 [ath6kl_core]
[<ffffffffa047ae77>] ath6kl_htc_rxmsg_pending_handler+0x8b7/0xf10 [ath6kl_core]
[<ffffffffa00c82f0>] ? mmc_do_release_host+0x70/0x90 [mmc_core]
[<ffffffffa00c833a>] ? mmc_release_host+0x2a/0x50 [mmc_core]
[<ffffffffa04865c0>] ? ath6kl_alloc_amsdu_rxbuf+0x140/0x140 [ath6kl_core]
[<ffffffffa0477772>] ath6kl_hif_intr_bh_handler+0x362/0x510 [ath6kl_core]
[<ffffffffa01f1000>] ath6kl_sdio_irq_handler+0x60/0xb0 [ath6kl_sdio]
[<ffffffffa00d30bc>] sdio_irq_thread+0xec/0x320 [mmc_core]
[<ffffffffa00d2fd0>] ? sdio_claim_irq+0x220/0x220 [mmc_core]
[<ffffffffa00d2fd0>] ? sdio_claim_irq+0x220/0x220 [mmc_core]
[<ffffffff8105b21e>] kthread+0xbe/0xd0
[<ffffffff815ab574>] kernel_thread_helper+0x4/0x10
[<ffffffff815a2174>] ? retint_restore_args+0x13/0x13
[<ffffffff8105b160>] ? __init_kthread_worker+0x70/0x70
[<ffffffff815ab570>] ? gs_change+0x13/0x13

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30 21:11:30 +02:00