Age | Commit message (Collapse) | Author | Files | Lines |
|
As hw cycle counters in QCA4019 wraparound independantly in QCA4019
it is possible cycle counter and rx clear counter would wraparound
at the same time. Current logic assumes only one of the counters
would wraparound at anytime. Fix this by moving 'else' part to
another 'if'.
Fixes: 8e100354a98 ("ath10k: fix cycle counter wraparound handling for QCA4019")
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
Reviewed-by: Julian Calaby <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Sometimes the firmware sends a HAL_DEL_BA_IND, the prima driver silently
ignore this message so let's do the same to silence the error message.
Cc: Nicolas Dechesne <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This patch fixes some issues with interface reconfiguration. It could
for example happen that an AP interface in beacon slot 0 was removed
leaving an IBSS station in one of the other slots. When this happens
the driver never sends out the beacon as it only tries to send a beacon
from slot 0.
Appart from that the tracking of required changes to the beacon config is
relatively complicated and prone to errors.
The approach taken here is to solve reconfiguration issues is to
reconfigure the beacons when any interface changes. This means that
the complexity of deciding whether an interface change may modify the
beacon configuration is gone. It also means that the beacon config will
be reliably updated when an interface is removed.
The issue that a single non-AP interface might not be in beacon
slot 0 and wouldn't be send out is solved by moving it into the
first slot. The TSF value in hardware is adjusted accordingly so
that the timestamp of the beacons stay consistent.
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The removed ATH9K_SLOT_TIME_X constants simply map the value in microseconds
to the same integer. These constants were not used consistently, so fix the
inconsistency issue by replacing all occurances with the integer equivalent.
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The ath9k driver modifies the TSF for VIFs for the purpose of sending
beacons in a staggered fashion. This patch exposes this VIF specific
adjustment of the TSF value to mac80211. Without the change the TSF
routines handle the hardware TSF value instead of the actual TSF value as
seen on the air.
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
These changes make ath9k_hw_reset more consistent with other places that
handle the TSF value by using the same helper routine.
A slight improvement is to not assume that a fixed time of 1.5ms has
passed for the initval writes when compared to the first write attempt.
Instead the TSF value is re-calculated which will yield a higher accuracy
of the restored TSF timer.
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The ath9k TSF handling routines need to be aware of the channel context that
is being modified. With this change the TSF related values that are stored
in each channel context will be correctly tracked and the harware will only
be updated if the modified context is currently the active one.
Without this change the TSF modifications done using these routines would
for example be lost during a hardware reset as done by ath_complete_reset.
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Beacons were not send out at (timestamp % beacon_time == 0) for interfaces
other than the primary one. To send out beacons with the correct timestamp
according to 10.1.3.2 of the 802.11 standard the tsf_adjustment has to be
set to the negative time difference instead of positive. This way the
later beacons get corrected to have a lower (and similar) timestamp with
regard to the beacon from slot 0.
I am not aware about any issues that have been caused by this.
Signed-off-by: Benjamin Berg <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
No functional changes, this simply makes the code easier to understand
because all initialization based on ath9k_platform_data is now within
one function.
Signed-off-by: Martin Blumenstingl <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
ath9k_hw_init_macaddr unconditionally returns 0 in all cases, making the
return value unnecessary.
Signed-off-by: Martin Blumenstingl <[email protected]>
Reviewed-by: Julian Calaby <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Currently setting the MAC address via ath9k_platform_data works only due
to the order in which init.c sets common->macaddr, which is done after
ath9k_hw_init_macaddr was executed. It would be better if the latter
was independent of the order in which it's being called.
Signed-off-by: Martin Blumenstingl <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
No functional changes - this only removes a variable which is set but
never read.
Signed-off-by: Martin Blumenstingl <[email protected]>
Reviewed-by: Julian Calaby <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Some devices running OpenWrt need this and it makes sense to add this
to ath9k_platform_data as the next patches will add a devicetree
(boolean) property for it as well.
Suggested-by: Vittorio Gambaletta <[email protected]>
Signed-off-by: Martin Blumenstingl <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Fix up the wcn36xx_smd_update_scan_params() to work with non-ancient
versions of the firmware and support actually specifying the list of
channels.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The CCU block in WCNSS is configured for appropriate routing of
interrupts from the DXE to the application cpu, this is not dependant on
the iris version (wcn3660 vs wcn3680), but rather if the SoC has a riva
or pronto built in.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Split the wcnss mmio space into explicit regions for ccu and dxe and
acquire these from the node referenced by the qcom,mmio phandle.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
In preparation for handling incoming messages from IRQ context, change
the indication list lock to a spinlock
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Merge the two allocation instead of separately allocating room for the
indication payload.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This driver contains some complicated if ... else if ... else constructions.
These are replaced by switch statements to improve readability.
Signed-off-by: Larry Finger <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8192DE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8821AE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8723BE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8723AE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8192EE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8188EE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8192CU chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The driver for RTL8192CE chips is converted to use the common routine
for getting the hardware information.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
All of the rtlwifi family of drivers have a similar routine that acquires
the hardware info from efuse and initializes a number of variables in the
driver's private area. A common routine is created for all drivers to use.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
As interrupt is read in interrupt handler as well as interrupt processing
thread, we observed a corner case issue for MSI in which interrupt gets
processed twice.
This patch moves interrupt reading code for MSI mode from
mwifiex_interrupt_status() to mwifiex_pcie_process_int() to avoid the
issue.
Signed-off-by: Shengzhen Li <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The PCIe driver didn't mask the host interrupts before trying to tear
down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
since the MSI handler gets confused and locks up the system.
Also tested on 8897, which does not support MSI-X (and wasn't
experiencing this same bug). No regressions seen there.
Signed-off-by: Brian Norris <[email protected]>
Tested-by: Douglas Anderson <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
PCIe-USB8997 variant is being used in the product. Let's change default
firmware from PCIe-UART to PCIe-USB. So by default PCIe-USB firmware would
be downloaded if version register doesn't give any information.
Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The two members min_scan_time and max_scan_time of structure
"mwifiex_ie_types_btcoex_scan_time" are of two bytes each. The values
are assigned directtly from firmware without endian conversion handling.
So, wrong datas will get saved in big-endian systems.
This patch converts the values into cpu's byte order before assigning them
into the local members.
Signed-off-by: Prasun Maiti <[email protected]>
Acked-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
New firmwares (e.g. 10.10.69.36 for BCM4366) support "interface_remove"
for removing interfaces. Try to use this method on cfg80211 request. In
case of older firmwares (e.g. 7.35.177.56 for BCM43602 as I tested) this
will just result in firmware rejecting command and this won't change any
behavior.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
So far when receiving event about in-firmware-interface removal our
event worker was notifying listener and afterwards it was removing Linux
interface.
First of all it was resulting in slightly unexpected order. The listener
(del_virtual_intf callback) was (usually) returning with success before
we even called unregister_netdev(ice).
Please note this couldn't be simply fixed by changing order of calls in
brcmf_fweh_handle_if_event as unregistering interface earlier could free
struct brcmf_if.
Another problem of current implementation are possible lockups. Focus on
the time slot between calling event handler and removing Linux
interface. During that time original caller may leave (unlocking rtnl
semaphore) *and* another call to the same code may be done (locking it
again). If that happens our event handler will stuck at removing Linux
interface, it won't handle another event and will block process holding
rtnl lock.
This can be simply solved by unregistering interface in a proper
callback, right after receiving confirmation event from firmware. This
only required modifying worker to don't unregister on its own if there
is someone waiting for the event.
Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
scan_block flag is used to block scan operation when 4 way handshake
is in progress. Sometimes it doesn't get cleared due to incomplete
association. An example is assoc request/response is done, but add key
operation get canceled in some corner cases. As a result, further
association/scan operations are blocked.
This patch fixes the problem by clearing scan_block flag.
Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This patch fix spelling typos found in drivers/net/wireless/realtek.
Signed-off-by: Masanari Iida <[email protected]>
Reviewed-by: Julian Calaby <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This allows the user to specify DMA aggregation timout and block
count. Blocks are presumably always 512 bytes, so the minimum block
count is 6 for 802.11 packets.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
gen2 chips as well as 8188eu seems to use this register for setting
DMA timeout threshold values, however the 8192cu is using
REG_USB_DMA_AGG_TO. Set both to be on the safe side.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Let the default to off until we have more data on the right default
tuning values.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This enables aggregation on rtl8192cu and derivative parts. This uses
the same parameters as for rtl8723au.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Implement rtl8xxxu_gen1_init_aggregation(). Aggregation should be the
same for all gen1 parts. We may want to allow for tuning parameters in
the fileopes struct. For now this is based allocating 16KB RX buffers,
leaving 16000 bytes for actual packets, and the rest for the skb
overhead.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
The old allocation didn't leave space for phystats in the buffer,
allowing the packet to be rejected if a frame size of size
IEEE80211_MAX_FRAME_LEN was received.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This adds support for allocating larger skbs for devices which
indicate they support it.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This implements support for demuxing aggregated RX packets on gen1
devices, using the rxdesc16 format.
So far this has only been tested with rtl8723au devices.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This corrects the definition of rxdesc16 to correctly specify pkt_cnt
for aggregated packets. This is based on the code of the vendor
rtl8723au driver, as opposed to the struct definitions they use.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
When handling aggregated packets, we'll get a new ieee80211_rx_status
for each cloned skb, so passing in the pointer from the outside
doesn't make sense.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This is another prepatory patch to be able to handle aggregated RX
packets.
In order to avoid adding a prototype, this also moves the
rtl8723bu_handle_c2h() function.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This needs to be handled locally in the parse_rx_desc() function in
order to be able to handle aggregated packets in the future.
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
Changed the configuration to support 64bit instead of 32bit
this in order to offload the driver from handling a wraparound.
Signed-off-by: Yaniv Machani <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|
|
This patch fixes below NULL pointer dereference observed in suspend
stress test. When scan is cancelled during system suspend, we may end
up aceesing "priv->scan_request" in corner case.
[ 3035.304682] BUG: KASAN: null-ptr-deref on address 0000000000000008
[ 3035.304704] Read of size 4 by task ksdioirqd/mmc2/1183
[ 3035.304744] CPU: 0 PID: 1183 Comm: ksdioirqd/mmc2 Tainted: G W 3.18.0 #1169
[ 3035.304772] Call trace:
[ 3035.304825] [<ffffffc00020a520>] dump_backtrace+0x0/0x190
[ 3035.304864] [<ffffffc00020a6cc>] show_stack+0x1c/0x28
[ 3035.304901] [<ffffffc000b36db8>] dump_stack+0xa0/0xf8
[ 3035.304940] [<ffffffc00039c494>] kasan_report+0x120/0x4fc
[ 3035.304975] [<ffffffc00039b6b4>] __asan_load4+0x20/0x80
[ 3035.305546] [<ffffffbffc1f5aec>] mwifiex_check_next_scan_command+0x1a4/0x588 [mwifiex]
[ 3035.306091] [<ffffffbffc1f7aec>] mwifiex_handle_event_ext_scan_report+0x304/0x370 [mwifiex]
[ 3035.306735] [<ffffffbffc206bb8>] mwifiex_process_sta_event+0x6c0/0xf10 [mwifiex]
[ 3035.307200] [<ffffffbffc1e609c>] mwifiex_process_event+0x2f4/0x358 [mwifiex]
[ 3035.307612] [<ffffffbffc1e25c8>] mwifiex_main_process+0x3cc/0x80c [mwifiex]
[ 3035.307737] [<ffffffbffc2523a0>] mwifiex_sdio_interrupt+0x198/0x1c0 [mwifiex_sdio]
[ 3035.307785] [<ffffffc0008d9250>] process_sdio_pending_irqs+0x15c/0x1d4
[ 3035.307826] [<ffffffc0008d93f0>] sdio_irq_thread+0xd8/0x288
Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
|