On some BCM5301x ARM devices, user space still needs to control some
system GPIO pins for which no driver exists. This is a lot easier to do
with a predictable GPIO base.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
With PCIE it is possible to support multiple devices with the
same device type. They all load the same nvram file. In order to
support this the nvram can specify which part of the nvram is
for which pcie device. This patch adds support for these new
types of nvram files.
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: Kalle Valo <kvalo@codeaurora.org>
This patch adds support for the BCM4358 2x2 11ac device.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
commit 330b4e4be9 ("brcmfmac: Add wowl support for SDIO devices.")
changed the behaviour by removing the MMC_PM_KEEP_POWER flag for
non-wowl scenario, which needs to be restored. Another necessary
change is to mark the card as being non-removable. With this in place
the suspend resume test passes successfully doing:
# echo devices > /sys/power/pm_test
# echo mem > /sys/power/state
Note that power may still be switched off when system is going
in S3 state.
Reported-by: Fu, Zhonghui <<zhonghui.fu@linux.intel.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
When the sdio bus state is not ready to process we abort the
interrupt service routine. This is not wanted as it keeps the
interrupt source active. Better clear the interrupt source.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This patch adds support for the BCM4324 B5 revision. This device
is similar to BCM43241 from driver and firmware perspective. It
is known to be used in Lenovo Thinkpad Tablet devices.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
The scheduled scan support depends on firmware supporting the PNO
feature. This feature is optional so add a feature flag for this
in the driver and announce scheduled scan support accordingly.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Some feature flags were not described in the header file. Adding
the description.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
When change the country code the available channels may change. So
the wiphy bands should be updated accordingly.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
The driver was constructing a list of channels per wiphy band
by querying the device. This list is not what the hardware is
able to do as it is already filtered by the country setting in
the device. As user-space may change the country this would
require updating the channel list which is not recommended [1].
This patch introduces a superset of channels. The individual
channels are disabled appropriately by querying the device.
[1] http://mid.gmane.org/1426706320.3001.21.camel@sipsolutions.net
Reviewed-by: Hante Meuleman <meuleman@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: Kalle Valo <kvalo@codeaurora.org>
This patch fixes an issue where it was discovered that driver is setting
invalid HT IEs to FW. This was happening because bug in parsing HT IE.
Driver would incorrectly point to start of HT IE while FW only needs actual
HT configuration - excluding EID and length.
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This patch reverts 'commit c5534844cd ("mwifiex:
enable aggregation for TID 6 and 7 streams")'.
TID6 & TID7 is voice traffic which is quite time sensitive.
Do not enable any type of aggregation on these TIDs.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* some work on the thermal code (Chaya Rachel)
* some work on the firwmare debugging infrastructure
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJVRnawAAoJEC0Llv5uNjIBVmAP/2kfyy1LSs9kPlCItYpCAb82
xZvLkdK+2lEuDgmui2sDvkLhvINRMwLUUilQaVIpCavsp2OS6cgikO8sPaEDUiHs
nC8/tU/PUTisKm+ZfedDeMDjIXkVKLT8tmSk4P0M7byfVTvrUUCPADW9bGQxJ5k7
BOrR2ArFhtuGulBaSAAXlZd5KqmGEyxiF2DtdrSRS+FCkMTwyQSSvUOpDynjmfFl
t3g36cp7yivX34q3rbw9i86YgEtzz/EU6FvPcOTMDK4yIpPLy2LYGmiGlc+tBiCu
M+YZjx85yZhxRqp7nA+qIXPDCw6yCBGLQKi/6AoKRnl0yzyzHo5H9rIM5LaXGPJ7
3niCtn33UATNNNsL6bQx21AvIK7NfB8P4ozm1MVgRu6d0Oxh3vsgZut+5WNUyv4m
ucT9Khjx3ffYw1/Ko6GcU8oHI7EccGG3okfm9z74xE5vjb9fI4qRpmgo52GpIqFH
EMYEPJzBHwIIkCk1fAGryzgBc4KSi48sCikLaZxhrInsIwTYBosrSv+4XLjbTztm
eneP3YB1LWEbm+qJNFxhqn8EbYUKsxdM5CARNUsCOOHbeg8Zpo056szmKb8KKwVM
f+Jf3XYSAk1hD2CYJJVP6Cn5EtGq6MpV2ml0kOCbJptAOtaRKuzgqwR9NHnZAMU2
qgiZSrEHOYzet+xkyv0h
=c7VM
-----END PGP SIGNATURE-----
Merge tag 'iwlwifi-next-for-kalle-2015-05-03' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
* major rework of the scan code (Luca)
* some work on the thermal code (Chaya Rachel)
* some work on the firwmare debugging infrastructure
Fix a copy paste bug that didn't copy wildcard SSIDs to
scan requests. This bug causes scan with only wildcard
SSID to be passive, and scans with more than one SSID to
send only the direct probes.
Fixes: 2a28ac14c518 ("iwlwifi: mvm: add common scan params to thw iwl_mvm_scan_params struct")
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Some more tidbits left over from the legacy scan removal.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The thermal throttling parameters were constant and hardcoded, not allowing
changes for different NIC families.
Change this so that the values are part of the NIC family configuration and
are not constant (so they can be changed dynamically in the future).
Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
When a firmware restart is done, don't try to reprogram the keys to new
slots but rather just keep the old key index, while skipping keys that
weren't programmed before.
Not only does this restore the state more faithfully, but it will also
allow using the HW key index for internal purposes as an array index.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The generic scan command functions are now irrelevant, since both
sched and regular scans are in the same code. So rename this
functions to dwell and isolate all the dwell-related setting to them.
Keeping the dwell code separate makes it easier to compare the LMAC
and UMAC versions.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Having an LMAC counterpart for the existing UMAC flags function makes
things more consistent and easy to compare and spot the differences.
The flags are the same, but are in different bits, so unfortunately we
can't use a single function for both APIs.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Clean the code a little by moving all the flags into the right
function. Additionally, rename the function, since "common" is now
irrelevant.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
When we use an external buffer, it is allocated from the
t DRAM and can be as big as 64MB. This buffer is huge and
might not be needed for the specific issue being chased.
Especially if lots of dumps are going to be created.
Allow to limit the size of the buffer in the configuration.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
qos_seq points (to a struct) inside the command response data.
Make sure to free the response only after qos_seq is not
needed anymore.
type=bugfix
bug=not-tracked
fixes=I78c07110b59dcd389207bd2b168b0a2760839fe0
Change-Id: I619ce2c17e064dc98c7be9abc1e23175fdc8fb9a
Reported-by: Heng Luo <heng.luo@intel.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-on: https://gerrit.rds.intel.com/r/55381
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: IWL Jenkins
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
With just a few differences left in the UMAC scan functions now, we
can merge them into one, taking care of the small difference according
to the total number of iterations required.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
In theory, LMAC scans can handle a 32-bit delay, but since waiting for
over 18 hours to start the scan is a bit silly and to keep it aligned
with UMAC scans (which only support 16-bit delays), trim it down to
16-bits.
This makes the LMAC vs. UMAC and the UMAC reg scan vs. UMAC sched scan
code more similar.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The last remaining difference between the regular scan and scheduled
scan flows for LMAC is the FW capabilities check for EBS scans.
Merge these checks into a new function and then combine the LMAC scan
functions into a single one.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
As another step towards combining the scan and sched scan functions,
add parameters that tell the scan function how many iterations we want
(i.e. 1 for normal scan, more for scheduled scan) and that set the
full scan multiplier (only meaningful for LMAC).
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The probe request to be added to both LMAC and UMAC scan commands are
identical, so move the generation out of the LMAC/UMAC-specific code.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To make things clearer, rename the iwl_mvm_scan_calc_params() function
to iwl_mvm_calc_dwell() and make it calculate and fill in only
dwell-related parameters.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Now that both scheduled scan and regular scan SSID populating
functions do the same thing, they can be combined into a single
function.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The firmware inverts the order of the SSIDs sent out in probe requests
(for some reason). For regular scans, we've been passing the SSIDs in
the opposite order so they go out in the order we want. With
scheduled scans, we were not doing that, so they were sent out in
reverse order of priority. Fix that by using the reverse order when
populating the SSIDs array for scheduled scans as well.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
The only difference in the ssid_bitmap between LMAC and UMAC scans is
that in LMAC bits 1 to 20 are used, while in UMAC bits 0 to 19 are
used (*sigh*). So we can combine the bitmap creation into a single
function and simply shift left if LMAC is used.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Many parameters are common for all scans. Instead of parsing the
cfg80211 scan and sched scan requests differently in each flow, move
the parsing outside of the API/scan-type specific functions. In this
way, we only need to differentiate between scan types once.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Similarly to the regular scan patch, a lot of the UMAC and LMAC sched
scan code is also almost identical. Grab the low hanging fruits by
combining the obvious parts.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
A lot of the UMAC and LMAC scan code is almost identical. Grab the
low hanging fruits by combining the obvious parts.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Usually during HW recovery the state of all active interfaces is cleaned
up during drv_start(). There's a special case where a HW restart is
requested when an interface is going down. In this case the iface-iterator
won't see this interface and we won't clean it. This has bad consequences
once the interface is legitimately brought up again.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Instead of repeating the same code in 4 different places, combine the
comparisons into a new function. Additionally, this change fixes UMAC
scans where the RRM IEs were not taken into consideration when
calculating the IE length.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
We have a function (iwl_mvm_scan_size()) that can calculate the scan
size for both UMAC and LMAC scans. Use that function instead of
calculating manually for LMAC scan and sched scan.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
We don't support -9.ucode so, all the released firmwares
support scheduled scan properly.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Remove unused struct iwl_scan_offload_req and enum
iwl_scan_offload_flags which are not used anymore. Rename
iwl_scan_offload_schedule to iwl_scan_schedule_lmac to make it clear
that this is for LMAC only. And fix a small typo.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Previously there was a check that compared window->average_tpt
to some value, and if it was different - it set it to that
value. However, this value was already calculated and set in
_rs_collect_tx_data(), so the entire check is unneeded.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This adds support for configuring and retrieving the FW
monitor in MARBH mode.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Net-detect scans were using the same type as sched scan, which was
causing the driver to return -EBUSY and prevent the system from
suspending if there was an ongoing scheduled scan. To avoid this, add
a new type for net-detect and don't stop anything when it is
requested, so that the existing scheduled scan will be resumed when
the system wakes up.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Move all the scan code that was in mac80211.c to scan.c where it
belongs, leaving only the parts that are specific to mac80211 ops.
Change some function definitions slightly to improve consistency.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
All scans are using the unified APIs now, so using "unified" in the
symbols is useless and just make them much longer and the main
difference between scans now is LMAC vs. UMAC. Remove "unified" from
all relevant symbols.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Instead of hardcoding the differences between UMAC scans and LMAC
scans (which in this case is the number of simultaneous scans that can
run), introduce a max_scans variable and stop scans of the other type
(i.e. stop sched scan if regular scan is being attempted and
vice-versa) if the number of running scans reached the maximum.
Add a function that checks if the maximum number of scans was reached
and stops the appropriate scan to make room for the new scan.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
If a new scan cannot be run for some reason, we shouldn't cancel other
ongoing scans. Move the checks to before the code that cancels other
scans.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>