summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/traces.h
AgeCommit message (Collapse)AuthorFilesLines
2022-04-06wfx: get out from the staging areaJérôme Pouiller1-496/+0
The wfx driver is now mature enough to leave the staging area. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Signed-off-by: Kalle Valo <kvalo@kernel.org>
2022-01-25staging: wfx: reformat comments on 100 columnsJérôme Pouiller1-5/+4
Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write code on 100 columns. This patch just unify the code to use 100 columns in every comments. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-22-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: wfx: reformat code on 100 columnsJérôme Pouiller1-9/+5
Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write code on 100 columns. This patch just unify the code to use 100 columns. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-21-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-25staging: wfx: prefix structs hif_* with wfx_Jérôme Pouiller1-5/+5
All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-19-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-14staging: wfx: avoid c99 commentsJérôme Pouiller1-1/+1
The wfx driver is a network driver. C99 comments are prohibited in this part of the kernel. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20210913130203.1903622-28-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10Revert "staging: wfx: remove unused included header files"Greg Kroah-Hartman1-0/+3
This reverts commit 314fd52f01ead9528a5cda5a868425bb736d93a2. It turns .h files into non-stand-alone when building, which might cause problems in the long-run. Reported-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Cc: Muhammad Usama Anjum <musamaanjum@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-12staging: wfx: remove unused included header filesMuhammad Usama Anjum1-3/+0
Many header files have been included, but never used. Those header files have been removed. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Link: https://lore.kernel.org/r/20210211143637.GA177425@LEGION Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: update copyrights datesJérôme Pouiller1-1/+1
Most of the files have been modified in 2020, so update the copyright notices. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-03staging: wfx: add tracepoint "queues_stats"Jérôme Pouiller1-0/+51
It is useful to check which queue the driver choose to send to the hardware. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200701150707.222985-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-19staging: wfx: Typo fixMohamed Dawod1-3/+3
Fixing some typo errors in traces.h file Signed-off-by: Mohamed Dawod <mhm.dawod@gmail.com> Link: https://lore.kernel.org/r/20200518062445.GA13044@dinux Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13staging: wfx: fix endianness of the field 'status'Jérôme Pouiller1-1/+1
The field 'status' appears in most of structs returned by the hardware. This field is encoded as little endian. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/data_rx.c:53:16: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_rx.c:84:16: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:526:24: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:569:23: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:128:33: warning: restricted __le32 degrades to integer drivers/staging/wfx/./traces.h:401:1: warning: restricted __le32 degrades to integer drivers/staging/wfx/./traces.h:401:1: warning: restricted __le32 degrades to integer In most of cases, this field is only compared with HIF_STATUS values. Finally, it is more convenient to solve the problem by defining the HIF_STATUS values directly in little endian. It is also the right time to make some clean up in the HIF_STATUS names. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13staging: wfx: fix access to le32 attribute 'len'Jérôme Pouiller1-1/+1
Sparse complains about the accesses to the field 'len' from struct hif_msg: drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:93:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:93:32: warning: cast to restricted __le16 drivers/staging/wfx/bh.c:93:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:121:25: warning: incorrect type in argument 2 (different base types) drivers/staging/wfx/bh.c:121:25: expected unsigned int len drivers/staging/wfx/bh.c:121:25: got restricted __le16 [usertype] len drivers/staging/wfx/hif_rx.c:27:22: warning: restricted __le16 degrades to integer drivers/staging/wfx/hif_rx.c:347:39: warning: incorrect type in argument 7 (different base types) drivers/staging/wfx/hif_rx.c:347:39: expected unsigned int [usertype] len drivers/staging/wfx/hif_rx.c:347:39: got restricted __le16 const [usertype] len drivers/staging/wfx/hif_rx.c:365:39: warning: incorrect type in argument 7 (different base types) drivers/staging/wfx/hif_rx.c:365:39: expected unsigned int [usertype] len drivers/staging/wfx/hif_rx.c:365:39: got restricted __le16 const [usertype] len drivers/staging/wfx/./traces.h:195:1: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:195:1: expected int msg_len drivers/staging/wfx/./traces.h:195:1: got restricted __le16 const [usertype] len drivers/staging/wfx/./traces.h:195:1: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:195:1: expected int msg_len drivers/staging/wfx/./traces.h:195:1: got restricted __le16 const [usertype] len drivers/staging/wfx/debug.c:319:20: warning: restricted __le16 degrades to integer drivers/staging/wfx/secure_link.c:85:27: warning: restricted __le16 degrades to integer drivers/staging/wfx/secure_link.c:85:27: warning: restricted __le16 degrades to integer Indeed, the attribute len is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13staging: wfx: fix endianness of fields media_delay and tx_queue_delayJérôme Pouiller1-2/+2
The struct hif_cnf_tx contains only little endian values. Thus, it is necessary to fix byte ordering before to use them. Especially, sparse detected wrong access to fields media_delay and tx_queue_delay. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13staging: wfx: fix cast operatorJérôme Pouiller1-1/+1
Sparse detects that le16_to_cpup() expects a __le16 * as argument. Change the cast operator to be compliant with sparse. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-28staging: wfx: fix messages names in tracepointsJérôme Pouiller1-1/+1
The names of the hardware interface messages are not displayed correctly in tracepoints. Thus, REQ_JOIN is displayed JOIN_REQ. Fix that in order to get the names as defined in headers of HIF API. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200427134031.323403-16-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-28staging: wfx: update list of known messages in tracepointsJérôme Pouiller1-4/+9
Some messages are missing from the list of symbolic messages defined in traces.h. Add them. Also sort the list in order to simplify next changes. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200427134031.323403-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-18staging: wfx: ensure that traces never modify argumentsJérôme Pouiller1-6/+8
There is no reason for a trace to change any bit of the argument. So, let's make sure that is the case by declaring the arguments constant. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-22-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-14staging: align to fix warnings of line over 80 charactersJules Irenge1-9/+18
Align to fix multiple warnings of line over 80 characters. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191113110052.14855-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: wfx: allow to send 802.11 framesJérôme Pouiller1-0/+74
Three things make this task more complex than it should: - Chip necessitate to associate a link-id to each station. It is same thing than association ID but, using 8 bits only. - Rate policy is sent separately from Tx frames - Driver try to handle itself power saving of stations and multicast data Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20190919142527.31797-17-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: wfx: add tracepoints for HIFJérôme Pouiller1-0/+211
These tracepoints decode HIF headers and provide more human readable results. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20190919142527.31797-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: wfx: add tracepoints for I/O accessJérôme Pouiller1-0/+149
Some tracepoints are useful for debugging. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20190919142527.31797-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>