History log of /linux-master/drivers/net/wireless/ath/ath6kl/htc.h
Revision Date Author Comments
# e3128a9d 08-Dec-2021 Kees Cook <keescook@chromium.org>

ath6kl: Use struct_group() to avoid size-mismatched casting

In builds with -Warray-bounds, casts from smaller objects to larger
objects will produce warnings. These can be overly conservative, but since
-Warray-bounds has been finding legitimate bugs, it is desirable to turn
it on globally. Instead of casting a u32 to a larger object, redefine
the u32 portion of the header to a separate struct that can be used for
both u32 operations and the distinct header fields. Silences this warning:

drivers/net/wireless/ath/ath6kl/htc_mbox.c: In function 'htc_wait_for_ctrl_msg':
drivers/net/wireless/ath/ath6kl/htc_mbox.c:2275:20: error: array subscript 'struct htc_frame_hdr[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Werror=array-bounds]
2275 | if (htc_hdr->eid != ENDPOINT_0)
| ^~
drivers/net/wireless/ath/ath6kl/htc_mbox.c:2264:13: note: while referencing 'look_ahead'
2264 | u32 look_ahead;
| ^~~~~~~~~~

This change results in no executable instruction differences.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211207063538.2767954-1-keescook@chromium.org


# a0d61f5f 29-Jun-2015 Nik Nyby <nikolas@gnu.org>

ath6kl: spell "distribution" correctly in a comment.

This fixes two misspellings of "distribution" in a comment.

Signed-off-by: Nik Nyby <nikolas@gnu.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# a07b5b84 29-Sep-2013 Vladimir Murzin <murzin.v@gmail.com>

ath6kl: fix compilation warning in ath6kl_htc_pipe_conn_service

Fix the warning

drivers/net/wireless/ath/ath6kl/htc_pipe.c: In function
'ath6kl_htc_pipe_conn_service':
drivers/net/wireless/ath/ath6kl/htc_pipe.c:1293:26: warning: integer overflow
in expression [-Woverflow]

by giving a hint to compiler about unsigned nature of
HTC_CONN_FLGS_SET_RECV_ALLOC_MASK

Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 636f8288 25-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: Add HTC pipe implementation

This is needed for USB.

Based on code by Kevin Fang.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e76ac2bf 25-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add htc ops

In preparation for adding HTC pipe implementation add htc-ops.h to make
it possible dynamically choose which HTC type is used.

Needed for full USB support.

Based on the code by Ray Chen <raychen@qca.qualcomm.com>.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Ray Chen <raychen@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 048f24f6 25-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: remove void pointer from ath6kl_credit_setup()

Void pointers are bad.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# cfc10f24 25-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add pointer to the skb in htc_packet

Needed by the USB code.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 900d6b3f 25-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: add tx_comp_multi() to struct htc_ep_callbacks

It's also needed by the USB code.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 63de1112 25-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: Add tx_complete() to struct htc_ep_callbacks

This is needed by the USB code. Also while at it replace one void pointer
with a properly typed pointer.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 12eb9444 07-Mar-2012 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: document all spinlocks

Also fixes quite a few checkpatch warnings like this:

ath6kl/hif.h:226: CHECK: spinlock_t definition without comment

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 0ea10f2b 09-Feb-2012 Chilam Ng <chilamng@qca.qualcomm.com>

ath6kl: assign Tx packet drop threshold per endpoint based on AC priority

Tx packets will begin to drop when there are multiple traffic priorities
and the current traffic is not the highest priority and the remaining
cookies drop below a certain number, which is fixed for all AC. It is
possilbe that lower priority AC have more traffic which will consume
more cookies and lock out higher priority AC from having any. Assign
each endpoint (AC) with a different Tx-packet-drop threshold so lower
priority AC is more likely to drop packets and the cookies become more
available to higher priority AC.

Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# b29072cc 07-Feb-2012 Chilam Ng <chilamng@qca.qualcomm.com>

ath6kl: prioritize Tx bundling based on AC priorities

Tx bundling is the more efficient use of SDIO bus and allows more packet
transfers with fewer bus transactions, and is a way to improve overall
throughput. However, Tx bundling has only 4 scatter request resources available.
When there are multiple traffic streams of different priorities, it's possible
that lower priority traffic may hog all the scatter requests and lock out the
higher prioirty traffic from bundling.
Tx bundling is now enabled per AC. When an AC do a scatter request and
the remaining scatter request resources is lower than a configurable
threshold, it will disable Tx bundling for all AC's of lower priorities.
When an AC has Tx bundling disabled and has no Tx bundles sent in a
consecutive and configurable number of packets, Tx bundling will be re-enabled
for that AC.

Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 1b2df407 06-Feb-2012 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Update license header

Update license header with the copyright to Qualcomm Atheros, Inc.
for the year 2011-2012.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# cb64a610 23-Oct-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: use ath6kl_credit prefix consistently

Not all credit functions used that prefix, fix that.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# f2f92195 23-Oct-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: move all credit distribution code to htc.c

As htc is the only user there's no reason to keep it in main.c.

No functional changes.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 3c370398 23-Oct-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: rename struct htc_credit_state_info to ath6kl_htc_credit_info

Also rename cred_dist_cntxt to credit_info in struct htc_target.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# e8c39790 23-Oct-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: rename struct htc_endpoint_credit_dist.htc_rsvd to htc_ep

No need to use void pointer here.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 4533d901 03-Oct-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Minor cleanup in msg_look_ahead parameter in ath6kl_htc_rxmsg_pending_handler()

It is just a four byte information of the received message
from ath6kl_htc_rxmsg_pending_handler(). Remove unnecessary
array representaion.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# ad226ec2 10-Aug-2011 Kalle Valo <kvalo@qca.qualcomm.com>

ath6kl: fix function name conflicts with ath9k

Stephen reported that compilation fails if both ath6kl and ath9k are
compiled in:

drivers/net/wireless/ath/ath6kl/built-in.o: In function `htc_start':
(.opd+0x600): multiple definition of `htc_start'
drivers/net/wireless/ath/ath9k/built-in.o:(.opd+0x3e40): first defined here
drivers/net/wireless/ath/ath6kl/built-in.o: In function `.htc_stop':
(.text+0x7b40): multiple definition of `.htc_stop'
drivers/net/wireless/ath/ath9k/built-in.o:(.text+0x67b34): first defined he=
re
drivers/net/wireless/ath/ath6kl/built-in.o: In function `.htc_start':
(.text+0x7d18): multiple definition of `.htc_start'
drivers/net/wireless/ath/ath9k/built-in.o:(.text+0x67ba0): first defined he=
re
drivers/net/wireless/ath/ath6kl/built-in.o: In function `htc_stop':
(.opd+0x5e8): multiple definition of `htc_stop'
drivers/net/wireless/ath/ath9k/built-in.o:(.opd+0x3e28): first defined here

To fix this add ath6kl prefix to all public functions in htc.c.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# fcb82058 18-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move chk_irq_status_cnt from ath6kl_device to htc_target

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 50745af7 18-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move scatter information from ath6kl_device to htc_target

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 5be8824f 18-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move block_sz and block_mask from ath6kl_device to htc_target

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 3b2f5e51 18-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Move bundle size from ath6kl_device to htc_target

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# df45f7f9 18-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Remove callback msg_pending() and used the function directly

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 7c565b6f 16-Jul-2011 Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

ath6kl: Remove useless flags in hif_scatter_req

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# bdcd8170 17-Jul-2011 Kalle Valo <kvalo@qca.qualcomm.com>

Add ath6kl cleaned up driver

Last May we started working on cleaning up ath6kl driver which is
currently in staging. The work has happened in a separate
ath6kl-cleanup tree:

http://git.kernel.org/?p=linux/kernel/git/kvalo/ath6kl-cleanup.git;a=summary

After over 1100 (!) patches we have now reached a state where I would
like to start discussing about pushing the driver to the wireless
trees and replacing the staging driver.

The driver is now a lot smaller and looks like a proper Linux driver.
The size of the driver (measured with simple wc -l) dropped from 49
kLOC to 18 kLOC and the number of the .c and .h files dropped from 107
to 22. Most importantly the number of subdirectories reduced from 26
to zero :)

There are two remaining checkpatch warnings in the driver which we
decided to omit for now:

drivers/net/wireless/ath/ath6kl/debug.c:31:
WARNING: printk() should include KERN_ facility level
drivers/net/wireless/ath/ath6kl/sdio.c:527:
WARNING: msleep < 20ms can sleep for up to 20ms;
see Documentation/timers/timers-howto.txt

The driver has endian annotations for all the hardware specific
structures and there are no sparse errors. Unfortunately I don't have
any big endian hardware to test that right now.

We have been testing the driver both on x86 and arm platforms. The
code is also compiled with sparc and parisc cross compilers.

Notable missing features compared to the current staging driver are:

o HCI over SDIO support
o nl80211 testmode
o firmware logging
o suspend support

Testmode, firmware logging and suspend support will be added soon. HCI
over SDIO support will be more difficult as the HCI driver needs to
share code with the wifi driver. This is something we need to research
more.

Also I want to point out the changes I did for signed endian support.
As I wasn't able to find any support for signed endian annotations I
decided to follow what NTFS has done and added my own. Grep for sle16
and sle32, especially from wmi.h.

Various people have been working on the cleanup, the hall of
fame based on number of patches is:

543 Vasanthakumar Thiagarajan
403 Raja Mani
252 Kalle Valo
16 Vivek Natarajan
12 Suraj Sumangala
3 Joe Perches
2 Jouni Malinen

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Suraj Sumangala <surajs@qca.qualcomm.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>