Arik Nemtsov [Thu, 13 Mar 2014 10:21:50 +0000 (12:21 +0200)]
iwlwifi: mvm: reconfigure qos seq on D0i3 exit
In order to restore the qos seq number on d0i3 exit,
we need to read it from the wowlan status.
However, in order to make sure we use correct seq num
for tx frames, we need to defer any outgoing frames,
and re-enqueue them only after the seq num is configured
correctly.
Sync new Tx aggregations with D0i3 so that the correct
seq num is used for them. Wait synchronously for D0i3
exit before starting a new Tx agg.
Enable beacon filter only if at least one beacon from candidate
AP is received before or after association. Check this condition before
enabling BF upon secured association completion. Add BF enablement to
mac80211 event that indicates beacon is received after association.
Too early beacon filtering enablement can lead to disconnection due to
missing AP's beacon after association.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: mvm: don't fail completely if led mode is not supported
Blink led mode is not supported by iwlmvm. This doesn't mean
that we should prevent any operation if it is selected by
the user.
Instead of failing without any notice to the user, fallback
to the default mode (RF mode) if the blink mode
is selected and print an error to inform the user.
Reported-by: Steven Haigh <netwiz@crc.id.au> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 13 Mar 2014 11:53:00 +0000 (13:53 +0200)]
iwlwifi: mvm: don't enable protection for all AMPDUs
Currently RTS protection was done whenever trasnmitting an AMPDU.
This limits throughput in cases where there's no need for protection.
Disable this too inclusive protection for now.
Eyal Shapira [Sun, 16 Mar 2014 03:23:21 +0000 (05:23 +0200)]
iwlwifi: mvm: rs: fix search cycle rules
We should explore all possible columns when searching to be
as resilient as possible to changing conditions. This fixes
for example a scenario where even after a sudden creation of
rssi difference between the 2 antennas we would keep doing MIMO
at a low rate instead of switching to SISO at a higher rate using
the better antenna which was the optimal configuration.
We can now define the priority against BT per AC. This is
possible with a newer firmware that allows to define the
priority with 2 bits.
Note that this change is compatible with older firmware
since older firmware will simply ignore the new bit (11),
and we still set the old bit (12) in the same cases as
before.
This code is really related to BT Coex - move it to the coex
file.
Also - prepare for a FW API change that will happen soon:
Bits 11 and 12 will be allocated for BT priority. Today, we
only have bit 12.
iwlwifi: mvm: BT Coex add support for Co-running block
7265 features a new calibration which is called antenna
coupling. The purpose of this calibration (which isn't
really a calibration), is to measure the isolation between
the antennas and that can give us useful information for
the Coex modules.
With this information, we can tune the LookUpTables (LUTs)
that define the BT / WiFi contention policy.
The LUTs currently contain dummy values - but they will be
updated soon.
While at it, change the current code to stop duplicate the
host command while sending. This was needed back then, when
the command was short enough to be allocated on the stack.
Since then, the command grew a lot and is now allocated on
the heap - hence we can use the NOCOPY option instead.
Arik Nemtsov [Mon, 10 Feb 2014 10:49:39 +0000 (12:49 +0200)]
iwlwifi: mvm: abort scan on sched_scan request
A scheduled scan is a more persistent setting and should take priority
over temporary regular scans. Abort the regular when a sched_scan
request arrives and then request the sched_scan.
The kernel API allows sending a sched_scan without canceling a regular
scan in progress, so this is our way to abstract the FW's limitations.
Make the scan-cancel Rx handler async and flush after invocation to
ensure new scans can't creep in before it.
Arik Nemtsov [Mon, 10 Feb 2014 13:34:29 +0000 (15:34 +0200)]
iwlwifi: mvm: wait for stop sched-scan completion
cfg80211 assumes a scheduled scan is stopped synchronously. Wait for the
FW before returning to caller.
Don't do anything in the async handler in the stop-from-above flow.
There's no need to call the mac80211 sched-scan completion as the
cleanup will be automatic. Make sure the async handler is called before
the next incoming scan changes the scan_status by flushing the async
handlers after all invocations.
BGN SKU won't scan on 5.2GHz obviously, but the firmware
still expects the driver to reserve space for the the probe
request for the 5.2GHz band.
Fix this by allocating space and leave it empty.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=69541
Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 25 Feb 2014 19:50:53 +0000 (20:50 +0100)]
iwlwifi: return whether to stop from rfkill method
When indicating RF-kill toggle to the higher layer, that
may in turn call back to the transport (for MVM at least)
to turn off the device quickly. Instead of that, allow it
to return whether or not the device should be turned off,
this gets rid of the call indirection and will help make
the API more consistent when we go back to non-threaded
interrupts again for PCIe.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Alexander Bondar [Tue, 18 Feb 2014 15:45:00 +0000 (16:45 +0100)]
iwlwifi: pcie: enable LP XTAL to reduce power consumption
1. Enable LP XTAL to avoid HW bug where device may consume much
power if FW is not loaded after device reset. LP XTAL is
disabled by default after device HW reset. Configure device's
"persistence" mode to avoid resetting XTAL again when SHRD_HW_RST
occurs in S3.
2. Add methods to access SHR (shared block memory space) directly from PCI
bus w/o need to power up MAC HW.
Shared internal registers (e.g. SHR_APMG_GP1, SHR_APMG_XTAL_CFG)can be
accessed directly from PCI bus through SHR arbiter even when MAC HW is
powered down. This is possible due to indirect read/write via
HEEP_CTRL_WRD_PCIEX_CTRL (0xEC) and HEEP_CTRL_WRD_PCIEX_DATA (0xF4)
registers.
Use iwl_write32()/iwl_read32() family to access these registers. The MAC HW
need not be powered up so no "grab inc access" is required.
For example, to read from SHR_APMG_GP1 register (0x1DC),
first, write to the control register:
HEEP_CTRL_WRD_PCIEX_CTRL[15:0] = 0x1DC (offset of the SHR_APMG_GP1 register)
HEEP_CTRL_WRD_PCIEX_CTRL[29:28] = 2 (read access)
second, read from the data register HEEP_CTRL_WRD_PCIEX_DATA[31:0].
To write the register, first, write to the data register
HEEP_CTRL_WRD_PCIEX_DATA[31:0] and then:
HEEP_CTRL_WRD_PCIEX_CTRL[15:0] = 0x1DC (offset of the SHR_APMG_GP1 register)
HEEP_CTRL_WRD_PCIEX_CTRL[29:28] = 3 (write access)
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avri Altman [Thu, 20 Feb 2014 11:28:57 +0000 (13:28 +0200)]
iwlwifi: mvm: disable power on P2P client when BSS is added
When power update is initiated on BSS STA while P2P client
exists, the power command will be sent only on BSS STA vif
ignoring P2P client.
Since the firmware has symmetric constraints on the power
save enablement we can simplify the code a bit.
The current firmware doesn't know how to enable power
management on P2P client. Even BSS power management must
be disabled when a P2P client is added.
Future firmware will support power save on BSS and P2P client
as long as they are on different channels.
This was buggy since we didn't disable power management on
P2P client interface if BSS added on the same channel.
New firmware enforce valid values for the quota in D3.
The values given to the firmware when suspending and using
WoWLAN where dummy - change them to realistics values.
Arend van Spriel [Tue, 25 Feb 2014 19:30:38 +0000 (20:30 +0100)]
brcmfmac: reset suspend flag upon sdio suspend failure
The suspend callback first sets the suspend flag used in the driver
but after that the actual suspend is done, which may fail. Reset the
flag upon suspend failure.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:18 +0000 (19:35 -0800)]
mwifiex: update MCS information as per antenna settings
Even if the device is changed to 1X1 mode, data is sent with
higher MCS rates after association.
This patch fixes the problem by updating MCS information field
in HT capability when antenna setting changes so that correct
information will be advertised in association and probe request.
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>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:17 +0000 (19:35 -0800)]
mwifiex: replace num_cmd_timeout with is_cmd_timedout
Command timeout happens when firmware goes into bad state.
There is no chance that next command will be successful after
this. Hence we will maintain a flag instead of count.
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>
Arend van Spriel [Thu, 27 Feb 2014 18:25:00 +0000 (19:25 +0100)]
brcmfmac: use pre-allocated scatter-gather table for txglomming
Instead of allocating a scatter-gather table for every transmit
reuse a pre-allocated table. The transmit path will be faster by
taking out this allocation.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Kim [Tue, 25 Feb 2014 19:30:36 +0000 (20:30 +0100)]
brcmfmac: Correct mcs index report
There is a mismatch between the mcs index(0-7) reported to cfg80211
and the actual mcs index(0-15) in use. This patch resolves the mismatch
by setting mcs info with the number of chains read from FW.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Daniel Kim <dekim@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:17 +0000 (19:35 -0800)]
mwifiex: stop AP at shutdown time
Deauth is sent to AP when the device is acting as station at
shutdown time. Similarly we should stop AP operation also.
mwifiex_deauthenticate() takes care closing the connection
based on provided interface type.
Add a new function to simplify the code.
Reported-by: Avery Pennarun <apenwarr@gmail.com> 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>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:16 +0000 (19:35 -0800)]
mwifiex: skipping pending commands after unload
We skip downloading other commands after FUNC_SHUTDOWN is queued
during driver unload. Main thread should be woken up each time
after freeing skipped command so that FUNC_SHUTDOWN gets served
in case if there are other pending commands before FUNC_SHUTDOWN.
Also, call mwifiex_complete_cmd() only for synchronous commands.
Reported-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Maithili Hinge <maithili@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:15 +0000 (19:35 -0800)]
mwifiex: abort scan while cancelling pending command
mwifiex_cancel_pending_ioctl() and
mwifiex_cancel_all_pending_cmd() are called in command timeout
and driver unload paths respectively.
If scan operation is in progress, we should abort it smoothly.
Reported-by: Tim Shepard <shep@alum.mit.edu> 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>
Amitkumar Karwar [Fri, 28 Feb 2014 03:35:13 +0000 (19:35 -0800)]
mwifiex: change transmit buffer size for 8897
Currently default Tx buffer size configured to firmware is 2K
for all chipsets. This patch changes it to 4K for SD/PCIe/USB
8897 chipsets as per firmware requirements.
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>
Bing Zhao [Fri, 28 Feb 2014 03:35:12 +0000 (19:35 -0800)]
mwifiex: remove global variable cmd_wait_q_required
There is a race condition while queuing synchronous command and
asynchronous command requested from different threads, because
the wait_q_enabled flag is set based on a global variable
cmd_wait_q_required.
The issue is fixed by removing this global variable and using a
unified function with an argument 'sync' passed into the
function.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Need to fill translation table before calling WMI with WMI_VRING_CFG_CMDID
since firmware may generate events during this call; and events need translation
table filled to be properly dispatched
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
When FW notifies about BACK status change, it provides ring ID.
Process BA status for requested connection only. As for now, FW
don't report Rx BACK status, it reports Tx one instead.
As per current algorithm used in the firmware, imply Rx BACK
state is in sync with Tx one
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hardware do not support "real" broadcast on the air.
Use method similar to the Directed Multicast Service (DMS) as
described in the 10.23.15.2 "DMS procedures"
This service copies frame and delivers unicast for each associated peer
Do the following: send original frame to 1-st Tx vring, and send copies
to all other active vrings.
As currently hardware/firmware don't support A-MSDU, convert broadcast
frame to unicast instead of wrapping it in A-MSDU
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Enable multiple (up to 8 - HW/FW limitation) simultaneous connections.
Each connection has its own CID (connection ID) that describes chip's
beam-forming entity. Tx Vring should refer to correct CID for frame to reach
its destination.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Print '_' for the 'idle' descriptors - this makes vring representation more visible.
Also, for the Tx side, differentiate descriptors having associated skb's - print ones
with skb as 'H' and without as 'h'. Good to represent scattered frames.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
wil6210: [DEBUG] allow to query Rx and all Tx VRING descriptors
Expand debug capabilities to query all Tx/Rx descriptors. Usefull to analyse
various hardware/software stall situations. Printed is whole descriptor content
and the frame itself.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Wed, 26 Feb 2014 12:32:32 +0000 (13:32 +0100)]
brcmfmac: Use atomic functions for intstatus update.
The intstatus in sdio code can be updated from different
threads. To protect intstatus access, atomic functions are
used. The loop was replaced using atomic_set_mask().
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Paul Stewart [Wed, 26 Feb 2014 00:31:37 +0000 (16:31 -0800)]
mwifiex: Track BA sequence number reset
Some stations reset the sequence number for traffic-ids (TIDs)
as they initiate a block-ACK session. In order to detect such
behavior, mwifiex must note the starting sequence number given
during the ADDBA request. If the first received sequence number
after the ADDBA falls outside the receive window for this TID but
after the the ADDBA starting sequence number, we can assume that
this AP has reset its sequence number during the ADDBA. In this
case we must adjust the input window backward to incorporate this
received sequence number instead of ignoring it. Otherwise, we
could fail to successfully retrieve an arbitrarily large number
of downstream frames at the beginning of the block-ACK session.
Signed-off-by: Paul Stewart <pstew@chromium.org> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:33 +0000 (20:30 +0100)]
brcmfmac: Small cleanup of redundant code.
In time some of the code got redundant, without being noticed.
This patch does not change any functionality, just removes
redundant code.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:32 +0000 (20:30 +0100)]
brcmfmac: Remove immediate sleep support from SDIO.
Immediate sleep support is an aggressive power saving option
that has not been enabled in brcmfmac and is removed to
simplify code.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:31 +0000 (20:30 +0100)]
brcmfmac: Minimize SDIO dpc scheduling.
SDIO dpc scheduling is done (repeated) when counter is set. This
counter gets decreased when dpc is finished. It is more efficient
to set counter to 0 before the dpc is actullay run. This will
minimize the frequency with which dpc is executed.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:30 +0000 (20:30 +0100)]
brcmfmac: de-init driver layers in correct order.
First clean up fw signalling, before cleaning up the bus and
proto layer. Old order can cause oops in some circumstances.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:29 +0000 (20:30 +0100)]
brcmfmac: Correct header debug dump for sdio tx hdrs.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Tue, 25 Feb 2014 19:30:28 +0000 (20:30 +0100)]
brcmfmac: remove unused variable data_len from brcmf_sdio_bus_txdata()
The local variable data_len is assigned but never used so get rid
of it.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Tue, 25 Feb 2014 19:30:27 +0000 (20:30 +0100)]
brcmfmac: fix use of skb control buffer in SDIO driver part
The SDIO driver has a 16-bit field defined in the skbuff control buffer.
However, it is accessed as a u32 overwriting other control info. Another
issue is that the field is not initialized for networking packets, but
the control buffer content is unspecified as other networking layers can
use it.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Tue, 25 Feb 2014 19:30:26 +0000 (20:30 +0100)]
brcmfmac: Make firmeware roaming a module param.
Internal firmware roaming is enabled by default. This patch
makes it possible to disable internal firmware roaming by
specifying roamoff=1 as module param.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwl8k: Adding support to gather survey per channel
Survey stats such as channel busy time, rx busy time
and noise are collected when sw_scan starts for every
switched new channel. This happens till sw_scan stops.
All the collected stats are shared up when get_survey()
is called.
This implements support for ACS feature from Hostapd.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhao, Gang [Tue, 18 Feb 2014 13:36:01 +0000 (21:36 +0800)]
zd1201: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}
Replace ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} with more
generic ieee80211_{channel_to_frequency, frequency_to_channel}.
Function ieee80211_frequency_to_channel() will return 0 if frequency
is not correctly provided, so no need to set channel to 0 explicitly.
Include <net/cfg80211.h> for the defination of IEEE80211_BAND_2GHZ.
Because <net/cfg80211.h> includes <linux/ieee80211.h>, so we can
replace <linux/ieee80211.h> with <net/cfg80211.h>.
This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhao, Gang [Tue, 18 Feb 2014 13:35:59 +0000 (21:35 +0800)]
wl3501_cs: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}
Replace ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} with more
generic ieee80211_{channel_to_frequency, frequency_to_channel}.
Include <net/cfg80211.h> for the defination of IEEE80211_BAND_2GHZ.
Because <net/cfg80211.h> includes <linux/ieee80211.h>, so we can
replace <linux/ieee80211.h> with <net/cfg80211.h>.
This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhao, Gang [Tue, 18 Feb 2014 13:35:58 +0000 (21:35 +0800)]
atmel: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}
Replace ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} with more
generic ieee80211_{channel_to_frequency, frequency_to_channel}.
Include <net/cfg80211.h> for the defination of IEEE80211_BAND_2GHZ.
Because <net/cfg80211.h> includes <linux/ieee80211.h>, so we can
replace <linux/ieee80211.h> with <net/cfg80211.h>.
This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.
Cc: Simon Kelley <simon@thekelleys.org.uk> Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhao, Gang [Tue, 18 Feb 2014 13:35:57 +0000 (21:35 +0800)]
airo: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}
Replace ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} with more
generic ieee80211_{channel_to_frequency, frequency_to_channel}.
Include <net/cfg80211.h> for the defination of IEEE80211_BAND_2GHZ.
Because <net/cfg80211.h> includes <linux/ieee80211.h>, so we can
replace <linux/ieee80211.h> with <net/cfg80211.h>.
This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Tue, 18 Feb 2014 01:10:44 +0000 (02:10 +0100)]
rtl818x: add comments to explain few not obvious HW configs.
Certain HW options (TX packet retry count, CW configuration and
TX power configuration) can be specified in both the TX packet
descriptor and also into HW "global" registers.
The HW is thus configured to honour the global register or the
TX descriptor field depending by the case.
This patch adds few comments that hopefully clarify in which cases
the driver uses one method and in which cases it uses the other.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Tue, 18 Feb 2014 01:10:43 +0000 (02:10 +0100)]
rtl818x: make dev_alloc_skb() null pointer check to really work
During driver initialization, some skbs are preallocated for RX.
Currenly if the allocation fails, the driver's allocation routine
exits immediatly but it will return zero (success) anyway.
In this way the driver will continue initialization with buggy
pointers around.
This patch makes the driver's allocation routine to return
an error value and to print a complaint message when skb allocation
fails.
In this way its caller will not go further, avoinding the driver to
successfully load, and preventing dereferencing buggy pointers.
An hint is thus printed about why the driver failed.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Sat, 22 Feb 2014 16:57:23 +0000 (17:57 +0100)]
rtl818x: check for pci_map_single() success when initializing RX ring
During initialization a number of RX skbs are allocated and mapped
for DMA.
Currently if pci_map_single() fails, it will result in passing to the
HW a wrong DMA address (to write to!).
This patch adds check for this condition and eventually causes the
driver not to initialize, avoiding at least dangerous DMAs.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Tue, 18 Feb 2014 01:10:41 +0000 (02:10 +0100)]
rtl818x: pci_iomap() should pair with pci_iounmap()
Currently the driver uses pci_iomap() but iounmap() is called in
the error path
Change to use pci_iounmap() instead.
Reported-by: Huqiu Liu <liuhq11@mails.tsinghua.edu.cn> Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
andrea merello [Tue, 18 Feb 2014 01:10:40 +0000 (02:10 +0100)]
rtl818x: Explicitly enable contetion window
Currently the contention window enable/disable HW flag is not
touched by the driver.
This patch explicitly set it to the correct value to make sure
contention window is enabled (AFAIK contention window must be
enabled in most (if not all) cases.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Move the power GPIO handling from the board code into
the driver. This is a dependency for device tree support.
Signed-off-by: Sebastian Reichel <sre@debian.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 14 Feb 2014 23:05:52 +0000 (00:05 +0100)]
wl1251: split wl251 platform data to a separate structure
Move the wl1251 part of the wl12xx platform data structure into a new
structure specifically for wl1251. Change the platform data built-in
block and board files accordingly.
Signed-off-by: Luciano Coelho <coelho@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Reviewed-by: Sebastian Reichel <sre@debian.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 22 Feb 2014 13:52:49 +0000 (14:52 +0100)]
ath9k: make some hardware reset log messages debug-only
On some chips, baseband watchdog hangs are more common than others, and
the driver has support for handling them.
Interrupts even after a watchdog hang are also quite common, so there's
not much point in spamming the user's logfiles.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 22 Feb 2014 13:52:48 +0000 (14:52 +0100)]
ath9k: do not set half/quarter channel flags in AR_PHY_MODE
5/10 MHz channel bandwidth is configured via the PLL clock, instead of
the AR_PHY_MODE register. Using that register is AR93xx specific, and
makes the mode incompatible with earlier chipsets.
In some early versions, these flags were apparently applied at the wrong
point in time and thus did not cause connectivity issues, however now
they are causing problems, as pointed out in this OpenWrt ticket:
https://dev.openwrt.org/ticket/14916
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>