History log of /linux-master/drivers/net/wireless/ti/wlcore/event.c
Revision Date Author Comments
# 04ada859 30-Jan-2024 Aditya Kumar Singh <quic_adisi@quicinc.com>

wifi: mac80211: add support to call csa_finish on a link

Currently ieee80211_csa_finish() function finalizes CSA by scheduling a
finalizing worker using the deflink. With MLO, there is a need to do it
on a given link basis.

Pass link ID of the link on which CSA needs to be finalized.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Link: https://msgid.link/20240130140918.1172387-6-quic_adisi@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# a469a593 28-Aug-2023 Emmanuel Grumbach <emmanuel.grumbach@intel.com>

wifi: mac80211: add support for mld in ieee80211_chswitch_done

This allows to finalize the CSA per link.
In case the switch didn't work, tear down the MLD connection.
Also pass the ieee80211_bss_conf to post_channel_switch to let the
driver know which link completed the switch.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230828130311.3d3eacc88436.Ic2d14e2285aa1646216a56806cfd4a8d0054437c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 01de6fe4 02-Jun-2021 Russell King <rmk+kernel@armlinux.org.uk>

wlcore: fix read pointer update

When reading the fw_log structure from the device's memory, we could
race with the firmware updating the actual_buff_size and buff_write_ptr
members of this structure. This would lead to bytes being dropped from
the log.

Fix this by writing back the actual - now fixed - clear_ptr which
reflects where we read up to in the buffer.

This also means that we must not check that the clear_ptr matches the
current write pointer, so remove that check.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/E1lolvi-0003Ri-39@rmk-PC.armlinux.org.uk


# 87ab9cba 02-Jun-2021 Russell King <rmk+kernel@armlinux.org.uk>

wlcore: fix bug reading fwlog

With logging enabled, it has been observed that the driver spews
messages such as:

wlcore: ERROR Calculate of clear addr Clear = 204025b0, write = 204015b0

The problem occurs because 204025b0 is the end of the buffer, and
204015b0 is the beginning, and the calculation for "clear"ing the
buffer does not take into account that if we read to the very end
of the ring buffer, we are actually at the beginning of the buffer.

Fix this.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/E1lolvc-0003RM-VE@rmk-PC.armlinux.org.uk


# 98e94771 02-Jun-2021 Russell King <rmk+kernel@armlinux.org.uk>

wlcore: make some of the fwlog calculations more obvious

Make some of the fwlog calculations more obvious by calculating bits
that get used and documenting what they are. Validate the read pointer
while we're at it to ensure we do not overflow the data block we have
allocated and read.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/E1lolvX-0003R3-RE@rmk-PC.armlinux.org.uk


# 91311239 02-Jun-2021 Russell King <rmk+kernel@armlinux.org.uk>

wlcore: tidy up use of fw_log.actual_buff_size

Tidy up the use of fw_log.actual_buff_size - rather than reading it
multiple times and applying the endian conversion, read it once into
actual_len and use that instead.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/E1lolvS-0003Ql-NJ@rmk-PC.armlinux.org.uk


# 2b27bdcc 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 51 franklin st fifth floor boston ma 02110
1301 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 246 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 769f07d8 24-Jan-2017 Andrzej Zaborowski <andrew.zaborowski@intel.com>

mac80211: Pass new RSSI level in CQM RSSI notification

Extend ieee80211_cqm_rssi_notify with a rssi_level parameter so that
this information can be passed to netlink clients in the next patch, if
available. Most drivers will have this value at hand. wl1251 receives
events from the firmware that only tell it whether latest measurement
is above or below threshold so we don't pass any value at this time
(parameter is 0).

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 68f37e5d 07-Jan-2016 Andrzej Hajda <a.hajda@samsung.com>

wlcore: fix error handling in wlcore_event_fw_logger

wlcore_read/wlcore_write can return negative values so it should
be assigned to signed variable.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2120705

Fixes: 3719c17e1816 ("wlcore/wl18xx: fw logger over sdio")
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 3719c17e 22-Dec-2015 Shahar Patury <shaharp@ti.com>

wlcore/wl18xx: fw logger over sdio

Enable the FW Logger to work over the SDIO interface in addition to over UART
interface. In the new design we use fw internal memory instead of packet ram
that was used in older (wl12xx) design. This change reduces the impact on TP
and stability.

A new event was added to notify fw logger is ready for reading. Dynamic
configuration to debugfs was added as well.

Signed-off-by: Shahar Patury <shaharp@ti.com>
Signed-off-by: Guy Mishol <guym@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 830513ab 28-Dec-2014 Eliad Peller <eliad@wizery.com>

wlcore: add dfs master restart calls

call wlcore_cmd_dfs_master_restart when starting
the ap on a new channel (after csa is done).

Add a new WLVIF_FLAG_BEACON_DISABLED flag to
indicate that dfs_master_restart command
is required.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 534719f4 28-Dec-2014 Eliad Peller <eliad@wizery.com>

wlcore: add support for ap csa

Support ap csa support by implementing the channel_switch_beacon()
mac80211 op.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 98f03342 25-Nov-2014 Johannes Berg <johannes.berg@intel.com>

cfg80211: clean up beacon loss CQM event

Having it as a sub-event for RSSI thresholds is very ugly,
but luckily no userspace actually uses the events yet.

Move the event to its own function call internally and to
its own event attribute in nl80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 69aa1675 10-Apr-2014 Luciano Coelho <luca@coelho.fi>

wlcore: ignore dummy packet events in PLT mode

Sometimes the firmware sends a dummy packet event while we are in PLT
mode. This doesn't make sense, it's a firmware bug. Fix this by
ignoring dummy packet events when we're PLT mode.

Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# da08fdfa 10-Feb-2014 Eliad Peller <eliad@wizery.com>

wlcore/wl12xx/wl18xx: configure num_links per-hw

Upcoming fw versions will have different max links support
(according to the hw). Get ready for it by configuring
wl->num_links per-hw, instead of using the const WL12XX_MAX_LINKS.

However, continue using WLCORE_MAX_LINKS in order to simplify
structs declarations (we use it in multiple bitmaps, and converting
them to dynamic arrays is just cumbersome).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 71e996be 08-Sep-2013 Eliad Peller <eliad@wizery.com>

wlcore: add ap_event_mask

Add new ap_event_mask field, to indicate events that
should be unmasked only when there's an ap interface.

This is done in order to avoid spurious wakeups
when we don't care about the incoming event anyway.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>


# c0ad2f2e 12-Mar-2013 Eyal Shapira <eyal@wizery.com>

wlcore: don't attempt to roam in case of p2p

For STA we report beacon loss to higher levels so that wpa_s
can attempt to roam without disconnecting. In case of P2P CLI
we don't want to attempt roaming and instead disconnect immediately
upon beacon loss.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 0b70078c 28-Nov-2012 Eyal Shapira <eyal@wizery.com>

wlcore: support scan reports during periodic scan

FW API changed and now PERIODIC_SCAN_REPORT_EVENT is sent
in case results were found at the end of each sched scan
cycle. Previous FW was missing that and broke sched scan.

This API change is available from 18xx FW 8.5.0.0.27

[Arik - move changes to 18xx specific files, align FW structures to
latest for scan command]

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 9ae5d8d4 28-Nov-2012 Arik Nemtsov <arik@wizery.com>

wlcore: consolidate Rx BA bitmap management to links struct

Remove the STA specific ba_rx_bitmap field and use the common links
structure. This simplifies code setting/checking the BA bitmap.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 10199756 22-Nov-2012 Eliad Peller <eliad@wizery.com>

wlcore: call ieee80211_sched_scan_stopped on interface removal

The interface might go down before we got the SCHED_STOPPED
event, so make sure to call ieee80211_sched_scan_stopped()
if the scanned interface is removed.

Replace sched_scanning with sched_vif in order to save
the scanned interface.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# c50a2825 22-Nov-2012 Eliad Peller <eliad@wizery.com>

wlcore: update events enum/struct to new fw api

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>


# 78e28062 22-Nov-2012 Eliad Peller <eliad@wizery.com>

wlcore: split 18xx and 12xx scan mechanism

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>


# dabf37db 20-Nov-2012 Eliad Peller <eliad@wizery.com>

wlcore: implement .remain_on_channel() callback

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>


# b0f0ad39 19-Jun-2012 Ido Yariv <ido@wizery.com>

wlcore: Propagate errors from wl1271_raw_write32

Propagate errors from wl1271_raw_write32 and request for recovery when
appropriate.
Also rename prefixes of wlcore functions which their prototypes had to
be changed.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# eb96f841 18-Jun-2012 Ido Yariv <ido@wizery.com>

wlcore: Propagate errors from wl1271_write

Propagate errors from wl1271_write and request for recovery when
appropriate.
Also rename prefixes of wlcore functions which their prototypes had to
be changed.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 045b9b5f 17-Jun-2012 Ido Yariv <ido@wizery.com>

wlcore: Propagate errors from wl1271_read

Propagate errors from wl1271_read and request for recovery when
appropriate.
Also rename prefixes of wlcore functions which their prototypes had to
be changed.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 9f5b424d 15-May-2012 Eliad Peller <eliad@wizery.com>

wl12xx: send beacon loss events to userspace

Send beacon loss events to userspace, so it will be
able to initiate roaming before disconnection

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 6b8bf5bc 15-May-2012 Arik Nemtsov <arik@wizery.com>

wlcore: fixes for connection_loss_work

We can't use cancel_delayed_work_sync() from functions that take the
wl->mutex, since connection_loss_work also takes the mutex. This might
result in a deadlock. Restructure the code so the work is synchronously
canceled before taking the mutex.
Avoid a bug where we would indefinitely delay the connection loss
indication by re-queuing the connection loss work on consecutive beacon
loss events.

Cc: bartosz.markowski <bartosz.markowski@tieto.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 5f561f68 26-Apr-2012 Bartosz.Markowski@tieto.com <Bartosz.Markowski@tieto.com>

wlcore/wl12xx: implement better beacon loss handling

Make use of REGAINED_BSS_EVENT and instead of reporting connection
loss immediately on each BEACON_LOSE event, try if not regained
in reasonable period of time.

Signed-off-by: bartosz.markowski <bartosz.markowski@tieto.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>


# 4263c5f2 30-Nov-2011 Luciano Coelho <coelho@ti.com>

wlcore: remove some unnecessary event mailbox address reads

We were reading the even mailbox address three times, which was
completely unnecessary and complicated things regarding partition
selection. Remove the unnecessry reads and set the address for
mailbox 1 and 2 after the first read.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# f16ff758 11-Apr-2012 Luciano Coelho <coelho@ti.com>

wlcore/wl12xx: add command trigger and event ack operations

Different chips may use different bits in the interrupt trigger
register. Add operations to handle these differences.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# 00782136 29-Nov-2011 Luciano Coelho <coelho@ti.com>

wlcore/wl12xx: implement chip-specific register tables

Add register tables support in wlcore, add some new IO functions to
read and write to chip-specific register and data addresses. Move
some common register values from wl12xx to wlcore and add the
registers table to wl12xx.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# c31be25a 21-Nov-2011 Luciano Coelho <coelho@ti.com>

wl12xx/wlcore: move wl1271 struct to wlcore and add ops

In order to add chip-specific operations and prepare for future
elements that need to be set by the lower driver, move the wl1271
structure to the wlcore.h file and add an empty placeholder for the
operations structure.

Signed-off-by: Luciano Coelho <coelho@ti.com>


# 7b3115f2 02-Dec-2011 Luciano Coelho <coelho@ti.com>

wl12xx/wlcore: rename wl12xx to wlcore

Rename the wl12xx driver directory to wlcore as an initial step
towards the split of the driver into wlcore and wl12xx. We just
rename the directory first to keep git blame happy.

Signed-off-by: Luciano Coelho <coelho@ti.com>