| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Move wl12xx and wl1251 modules into a new drivers/net/wireless/ti
directory. Add a TI WLAN Kconfig option and Makefile to support this
change.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Cc: John W. Linville <linville@tuxdriver.com>
|
|
|
|
|
|
|
|
|
|
| |
On the PandaBoard (omap_hsmmc + wl12xx_sdio) with DMA_API_DEBUG:
WARNING: at lib/dma-debug.c:930 check_for_stack.part.8+0x7c/0xe0()
omap_hsmmc omap_hsmmc.4: DMA-API: device driver maps memory fromstack
Signed-off-by: Mircea Gherzan <mgherzan@gmail.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Track freed FW blocks during Tx. If no blocks were freed during a
predefined timeout, initiate a HW recovery. This helps in situations
when the FW watchdog fails.
Don't trigger recovery during activities that can temporarily stop
Tx. This includes:
- scanning
- buffering packets for sleeping stations (AP role)
- ROC on any role
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
The sesssion_counter has to be incremented each time
the dev is started (similar to sta role).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, the link was first freed (invalidating it in the map), and later
on vif removal, all valid wlvif-related links were reset. Since these
links were already invalid, we failed to reset them.
The bug was made worse by op_stop, which set the tx_queue_count to 0
arbitrarily. This resulted in a negative tx_queue_count in some scenarios.
Fix this by resetting the Tx-queues of a link when freeing it. Add a
WARN_ON and reset all link Tx-queues in op_stop, to avoid a negative
tx_queue_count.
[changed WARN_ON to WARN_ON_ONCE -- Luca]
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
These bits are used in op_tx to determine if a packet should be dropped.
As such we should use the spin lock to sync the state.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When configuring the arp response template,
and encryption is enabled, we should add some
space and set the protected flag bit in the fc.
In order to track the encryption type, set
wlvif->encryption_type when setting an encryption key,
and reconfigure the arp response. Clear this field on
wl1271_join, as keys have to be re-configured
anyway after a join command.
Similarly, track whether QoS is configured.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FW now supports dynamic PS so we don't need to use mac80211 support.
FW will go to PSM after a specified timeout with no Rx/Tx traffic.
- Changed FW API to include new PS mode (AUTO_MODE) and including timeout parameter
- The default PS mode would be dynamic PS
- Default timeout is 100ms (same as it used to be in mac80211)
- Avoid using mac80211 APIs to disable/enable dynamic PS as we're not
using mac80211 PS control anymore.
- COEX is handled by the FW while in dynamic PS so removed
handling of SOFT_GEMINI
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
Update enums/structs to the new fw api.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use device role for scans when the sta is not
associated.
sched_scan is used only when the sta is
not associated, and thus should use
the dev role (instead of sta role).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The set_template commands now takes the role_id as
parameter.
Usually, we'll use the vif's main role_id.
However, sometimes we'll want to use
wlvif->dev_role_id instead of wlvif->role_id,
so pass the wanted role_id as param.
Update WL127X_FW_NAME/WL128X_FW_NAME.
(This commit starts a series of fw update patches,
and changes the start() callback to return an error
in order to prevent the use of the driver during the
transition. This change will be reverted in the
last patch of series)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
During sta disconnection, a deauth packet is being queued to
the dev role queue. However, the dev role is being stopped
before the packet was sent.
Flush the tx queue before stopping the dev role.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
Check for out of bound FEM index to prevent reading beyond ini
memory end.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: stable@kernel.org
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Device role is always started along with ROC.
Couple them together by introducing new wl12xx_start_dev
and wl12xx_stop_dev functions.
By using these functions, we solve a bug that occured during
channel switch - we started the dev role on one channel, and
ROCed on a different one.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Separate the debugging macros and other definitions to a new debug.h
file. This is be needed because the sdio and spi modules don't need
to depend on the wl12xx module anymore, but still need to include
wl12xx.h. Currently they do depend on it, because of the debugging
global that wl12xx exports. A future patch will remove this
dependency.
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wl->vif is appropriate only when a single vif is being used.
Instead, pass wlvif as parameter or iterate through all
the vifs (e.g. when a global configuration was changed)
Leave wl->vif only to determine whether a vif was already
added (this check will be removed as well after both the
driver and fw will support multiple vifs)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add channel into the per-interface data.
mac80211 configures some values (e.g. band, channel)
globally, while we configure them per-interface.
In order to make it easier to keep track of the
configured value for each value while keeping sync
with mac80211, save these values both globally
and per-vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add band field into the per-interface data.
mac80211 configures some values (e.g. band, channel)
globally, while we configure them per-interface.
In order to make it easier to keep track of the
configured value for each value while keeping sync
with mac80211, save these values both globally
and per-vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move bitrate_masks into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add wlvif->links_map bitmap to represent all the links
allocated for this vif.
AP vif also has a sta_hlid_map bitmap, which represents
the links stations connected to it (sta_hlid_bitmap is
a subset of wlvif->links_map, which itself is a subset
of the global wl->links_map)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move beacon_int into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move dev_hlid into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move session_counter into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move ap_global_hlid and ap_bcast_hlid into the per-interface
data, rather than being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move sta_hlid into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move dev_role_id into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move role_id into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move ssid and ssid_len into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move bss_type into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
| |
Use the per-interface vif->bss_conf instead of the global wl->bssid.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move basic_rate into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
move rate_set into the per-interface data, rather than
being global.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a per-vif data struct.
This struct holds all the vif-specifc data, which is
currently being hold by the global wl struct.
Start by moving the basic_rate_set field into it.
NOTE: in order to make the patches a bit smaller, start by
using wl->vif in some functions, instead of changing all
the function prototypes at once. finally, wl->vif will be
removed altogether.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mac address of the interface already exists in vif->addr.
Use it instead of wl->mac_addr.
It seems that due to some fw bug, we still need to set nvs->mac
to the actual mac addresss, otherwise the fw doesn't function
well (e.g. can't get dhcp address).
Thus, use wl->mac_addr for this purpose, and don't delete it yet.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The current wl12xx fw (7.3.0.0.77) supports both STA and AP mode, and
we no longer use AP-mode-specific quirks.
WL12XX_QUIRK_END_OF_TRANSACTION is still used for certain HWs, while
WL12XX_QUIRK_LPD_MODE is not used anymore.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The wl12xx FW supports HW channel switch. If we don't use it,
sometimes the firmware gets confused when recalibrating to the new
channel, causing RX problems. This commit adds HW channel switch
support by implementing the channell_switch op.
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
[added one comment, remove the tx_flush and rephrased the commit message]
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
Save the configured bitrate, and use the min allowed rate
as the basic rate (e.g. when scanning).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If a hidden SSID is requested, generate a probe response template
containing the real SSID.
Depends on the patch "mac80211: add ssid config to bss information
in AP-mode".
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
Declare support for uapsd when working as AP, and
set psd_type and sp_len whan a station is being added.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
| |
Add id param to the acx debug print (on wl1271_cmd_configure)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
Sometimes the fw doesn't send the DISCONNECT_EVENT_COMPLETE_ID
on station role stop, so don't wait for it.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
| |
When a new STA joins the BSS, configure the HT rates it supports to the
FW.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add wl12xx_cmd_role_start_ibss() implementation and defintion.
This function is used in order to start the IBSS role.
Stopping the IBSS is done by using the same api as stop STA,
so there is no need for a separate function.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
| |
If hlid was already removed, there is no need to remove
its key (it might cause a fw crash, as the key is invalid).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
After adding a station, call wl12xx_cmd_set_peer_state().
This is required for 11n support.
Change wl12xx_cmd_set_peer_state() prototype to get hlid
as param.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Using hlid=0 in AP mode is a bug. Dynamically allocate HLIDs.
Set the "first sta hlid" as 3. This will have to be changed
when multiple vifs will be supported.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
| |
Increment the session counter on every
wl12xx_cmd_role_start_sta() command.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ROC command asks the fw stay on the channel of the given
hlid. it currently has 2 primary functions:
1. Allow tx/rx from the device role.
In order to tx/rx packets while the stations is not associated
(e.g. auth req/resp), the device role has to be used, along
with ROC on its link.
Keep the logic similiar to the one used in dummy_join. However,
since we can't scan while we ROC, we add CROC before starting
a scan, and ROC again (if needed) on scan complete.
2. Keeping the antenna for a specific link.
We ROC until the connection was completed (after EAPOLs exchange)
in order to prevent BT coex operations from taking the antenna
and failing the connection (after this stage, psm can be used).
During association, we ROC on the station role, and then CROC
the device role, thus assuring being ROC during all the connection
process.
Delete the WL1271_FLAG_JOINED flag, and use a roc bitmap
to indicate what roles are currently ROCed.
Add wl12xx_roc/croc functions in order to wrap the roc/croc
commands while taking care of the roc bitmap.
The current ROC/CROC state-machine is a bit complicated. In
the future we'll probably want to use wpa_supplicant to control
the ROC during connection.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
| |
Add structs and functions to support the ROC/CROC commands.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The device role is a special role used for rx and tx frames
prior to association (as the STA role can get packets only
from its associated bssid)
Since this role is required for the sta association process,
we enable it when a new sta interface is created.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
|