Age | Commit message (Collapse) | Author | Files | Lines |
|
In 18xx the calibration process of the PHY Cortex domain
requires to perform an active calibration of the channel
before it can be used for transmission. To fulfill world
wide regulatory restrictions, fw should be always
synchronized/updated with current CRDA configuration.
Add a new "CMD_DFS_CHANNEL_CONFIG" command to update the
fw with current reg-domain, this command passes a bit map
of channels that are allowed to be used for transmission.
The driver shall update the fw during initialization and
after each change in the current reg-domain
configuration. The driver will save the channel number of
incoming beacons during the scan process, as they might
be a result of the passive scan on
"IEEE80211_CHAN_PASSIVE_SCAN" channel and will update the
fw accordingly once the scan is finished, the purpose of
this is to be ready in case of the authentication request
on one of these disabled (uncalibrated) channels.
The new command requires to wait for the fw completion
event "DFS_CHANNELS_CONFIG_COMPLETE_EVENT".
No scan commands (including the sched scan) can be
executed concurrently with the "CMD_DFS_CHANNEL_CONFIG",
wl->mutex ensures that.
[Arik - move reset of reg_ch_conf_last to safe place inside
op_stop_locked]
[Eliad - adjust to new event waiting api]
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
A new session_id is generated on link allocation.
it is saved in a global array and used later, on tx.
The new fw api adds new bcast/global_session_id
fields to start_role(ap) command, and a new session_id
field to add_peer command. align the driver with it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
New fields were added to start_role(ap) and
set_peer_state commands, so the fw will be
able to know whether the sta/ap supports
wmm (the fw uses it in order to choose the
AC for some of its internally-generated frames)
For sta, take this value right from bss_conf->qos.
For ap, check for wmm support by looking for the
WMM IE in the configured beacon.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
The event mailbox in wl18xx has a different
(non-compatible) structure.
Create common functions in wlcore to handle the
events, and call them from the chip-specific
event mailbox parsers.
This way, each driver (wl12xx/wl18xx) extracts
the event mailbox by itself according to its
own structure, and then calls the common
wlcore functions to handle it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Some fields were added to the channel_switch and
stop_channel_switch commands. Unfortunately,
the new 18xx channel_switch struct is not backward
compatible with the 12xx channel switch struct.
Add a new channel_switch op to wlcore, and update
the driver accordingly.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
update the acx enum to the new fw api.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Some regdomains have more than 23 valid 5ghz channels,
so 18xx's MAX_CHANNELS_5GHZ was increased to 32.
Since now we have different max 5ghz channels values
for wl12xx and wl18xx, add a new wl->max_channels_5ghz
field, and use it for scan channels configuration.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
The scan APIs of 12xx and 18xx are totally different.
Use some common functions as much as possible (e.g.
for setting scan channels), but split scan.c into
chip-specific scan.c files, each implementing its
own scan mechanism.
(in other words - move most of the current wlcore's
scan.c into wl12xx, and implement a similar mechanism
in 18xx, according to the new api)
New wlcore ops are introduced in order to call the
chip-specific scan functions.
The template indices used for each scan (regular/scheduled)
are also different between the chips, so set the correct
indices used for each scan type after identifying the chip.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Align the commands enum with the new fw api (8.4.0.0.19)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
The new fw (8.5.0.0.28) is not backward compatible
with older drivers.
Use a new fw name (along with bumping the min
fw version), and add some code to fail
any boot attempt during the fw api alignment
patches (as the driver is not functional in
these transitional patches).
This code will be removed after the api alignment
will be done.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
18xx and 12xx have different scan APIs. In 18xx,
the scan and the sched scan use the same struct.
Prepare the scan configuration functions to it, by taking
more generic params (e.g. ieee80211_channel) instead of
specific structs/requests.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
When we stop sched scan during connection, we shouldn't
call ieee80211_sched_scan_stopped directly, but do it
in the normal flow, as part of the SCHED_SCAN_COMPLETED
event handling.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Some if statements had unnecessary parentheses. Remove them for
consistency.
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Remove goto and label in the code where a simple if can be used. If
nothing else, this is at least confusing git diff, which shows the
label name as the name of the function.
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
free it on wlcore_free_hw()
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
In multi-vif setup it's useful to know the role_id
being configured.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
With the new connection flow, start_sta is called before
the remote rates where updated. Use our own supported rates
instead to make sure we don't disable any potential rate
(the rate policies will be updated later, but there is
currently no way to update the remote rates)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Pass a variable indicating whether HT is enabled,
instead of duplicating the function call with
different arguments.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
When first configuring the rate policy, before auth,
we still don't have the correct rates that were
agreed during association.
Reconfigure the rate policy on association in order
to update them.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
The supported_rates field should contain all our supported
rates, even if the remote peer doesn't support them.
(rename CONF_TX_AP_ENABLED_RATES to CONF_TX_ENABLED_RATES,
as we now use it for both ap and sta)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
The default ps mode of the fw is auto, while the default
ps mode of mac80211 is active (ps off).
In order to sync them, configure active ps on association.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Use the sta_state notifications to ROC when a station
is about to connect, and CROC respectively on
authorization (success) / deletion (failure).
Change the wl12xx_update_sta_state() flow to bail out
only on error, so multiple code blocks could refer
to the same state.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Add some basic chanctx implementation - debug prints,
and save the vif's channel/band/type.
After that, we no longer need to handle channel change
notifications on op_config.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
We care only about the operational channel, not
about the temporal hw channel (which won't have
any real meaning in multi-channel env anyway)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
implement the reamin_on_channel() callback by starting
a dev role (already associated with the current vif)
on the requested channel/band.
This channel is usually different from the channel
of the sta role, so pass it to wl12xx_roc() as well,
and notify mac80211 (async) when the fw is ready
on the new channel.
Now, in case of offchannel tx, we should use the dev
role hlid, instead of the sta hlid.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
for some reason, the wl12xx fw is not able to rx/tx
on the first start_sta cmd.
Workaround it by issuing a dummy start_sta + stop_sta
before starting the sta for the final time.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
Make the connection flow simpler by starting
sta role on bssid change.
Currently, we start dev role when going idle-off,
and start the sta role only after association
indication. This complicates the connection
flow with some possible intermediate states.
Make it simpler by starting sta role on bssid change,
which now happens *before* auth req get sent.
Update the handling of mac80211's notifications
and change wl1271_join/unjoin accordingly -
* Split wl1271_join() into wlcore_join (tuning on
a channel/bssid) and wlcore_set_assoc (configure
sta after association).
* Rename wl1271_unjoin() to wlcore_unset_assoc(), as
it is no longer the inversion of wl1271_join()
(now it's only used to disconnect associated sta /
joined ibss, without stopping the role).
* Set ssid before starting station role (needed for
start_role(sta)
While on it, split wl1271_bss_info_changed_sta() into
some sub-functions.
since we no longer use dev role in the connection flow,
we now always use the hlid of the sta role.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
No need to check whether unsigned variable is less than 0.
CC: Luciano Coelho <coelho@ti.com>
CC: linux-wireless@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
The return value of wait_for_completion_timeout() is always
>= 0 with unsigned int type.
So the condition "ret < 0" or "ret >= 0" is pointless.
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
In corner case for wl12xx_spi_raw_write() when
len == SPI_AGGR_BUFFER_SIZE
we don't setup correctly spi transfer_list.
Next we will have garbage and strange errors
reported by SPI framework (eg. wrong speed_hz,
failed to transfer one message from queue)
when iterate transfer_list.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.
CC: Luciano Coelho <coelho@ti.com>
CC: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
platform_device_unregister() only calls platform_device_del() and
platform_device_put(), thus use platform_device_unregister() to
simplify the code.
Also the documents in platform.c shows that platform_device_del
and platform_device_put must _only_ be externally called in error
cases. All other usage is a bug.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
platform_device_unregister() only calls platform_device_del() and
platform_device_put(), thus use platform_device_unregister() to
simplify the code.
Also the documents in platform.c shows that platform_device_del
and platform_device_put must _only_ be externally called in error
cases. All other usage is a bug.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
The function wl12xx_set_power_on is only called twice, once in
wl12xx_chip_wakeup and once in wl12xx_get_hw_info. On the failure of the
call in wl12xx_chip_wakeup, the containing function just returns, but on
the failure of the call in wl12xx_get_hw_info, the containing function
calls wl1271_power_off. This does not seem necessary, because if
wl12xx_set_power_on has set the power on and then fails, it has already
turned the power off.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier f,free,a;
parameter list[n] ps;
type T;
expression e;
@@
f(ps,T a,...) {
... when any
when != a = e
if(...) { ... free(a); ... return ...; }
... when any
}
@@
identifier r.f,r.free;
expression x,a;
expression list[r.n] xs;
@@
* x = f(xs,a,...);
if (...) { ... free(a); ... return ...; }
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
|
|
Set tx packet timestamp to 0 in following scenarios:-
- All packets in STA mode
- Mgmt packets in AP mode
- Eapol packets in AP mode
In STA mode, this field is unused in the firmware. In AP
mode, we should not be expiring mgmt and eapol frames.
Setting timestamp to 0 will ensure that.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This can cause issues when clients try to connect when the
traffic is heavy
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
We should unmap the DMA address in the error path, else it
causes resource leaks. Fix this.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
We have 6.5 Mbps is minimum rate of the link
as the criterion for creation of BA.
Although we check this before creating the BA
stream, by the time amdpu_action is called from
the workqueue, the link can get affected in the
meantime.
Hence, add an additional check in amdpu_action.
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>
|
|
AP mode support upto 8 interfaces.
Defining it using iface_combinations
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
ksdioirqd has higher priority than kworker. Process RX packets
in SDIO IRQ thread (ksdioirqd/mmcX) directly instead of deferring
the work to kworker to avoid the extra latency.
This improves TCP throughput 15~20% on an ARM platform with SDIO
2.0 controller.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Firmware events are passed to wl_cfg80211 module associated with
the primary net device. With virtual interface support events can
be received for different interfaces, ie. struct brcmf_if instances.
Pass it in the event to determine appropriate net device associated
with the event.
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: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Add USB log level and update and add log messages in usb module.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
brcmf_netdev_stop shall first check bus_if status before bringing
down cfg80211. brcmf_detach shall first check if driver is
allocated.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
brcmf_netdev_start_xmit and brcmf_fil_cmd_data are checking
bus state for down. These functions should check for data
state.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
when brcmf_cfg80211_del_key was called with out of range key index
then firmware would return error. Checking was added to
brcmf_cfg80211_del_key to immediately return error.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
This fixes a build regression for x86_64 target that showed up
in 3.7-rc1 due to:
commit 1a87334239757b69eb9885979c32bbf871b3ec88
Author: Hante Meuleman <meuleman@broadcom.com>
Date: Thu Sep 27 14:17:54 2012 +0200
brcmfmac: add hostap supoort.
Reported-by: Yuanhan Liu <yuanhan.liu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Use int instead of bool as the return type of function
brcmf_sdio_hdparser to explicitly describe error returns.
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
brcmf_sdbrcm_wait_for_event is now a one line function and only
used by brcmf_sdbrcm_bus_txctl. Intergrate the function call
wait_event_interruptible_timeout into brcmf_sdbrcm_bus_txctl.
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Semaphore sdsem is used to protect consecutive memory access
through SDIO bus. Same functionality is provided by sdio_claim_host/
sdio_release_host interface as well. Replace sdsem with
sdio_claim_host.
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
Semaphore sdsem which protects consecutive SDIO bus access is used
to lock down unnecessary wide range. Decrease the locking range
provides the capability of parallel processing.
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|