This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#18: FILE: hal/odm_types.h:18:
+typedef enum _HAL_STATUS {
WARNING: do not add new typedefs
#33: FILE: hal/odm_types.h:33:
+typedef enum _RT_SPINLOCK_TYPE {
WARNING: do not add new typedefs
#77: FILE: hal/odm_types.h:77:
+ typedef struct timer_list RT_TIMER, *PRT_TIMER;
WARNING: do not add new typedefs
#78: FILE: hal/odm_types.h:78:
+ typedef void *RT_TIMER_CALL_BACK;
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-10-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#33: FILE: hal/odm_HWConfig.h:33:
+typedef struct _Phy_Rx_AGC_Info {
WARNING: do not add new typedefs
#41: FILE: hal/odm_HWConfig.h:41:
+typedef struct _Phy_Status_Rpt_8192cd {
WARNING: do not add new typedefs
#80: FILE: hal/odm_HWConfig.h:80:
+typedef struct _Phy_Status_Rpt_8812 {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-9-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#95: FILE: hal/odm.h:95:
+typedef struct _Rate_Adaptive_Table_ {
WARNING: do not add new typedefs
#99: FILE: hal/odm.h:99:
+typedef struct _RX_High_Power_ {
WARNING: do not add new typedefs
#129: FILE: hal/odm.h:129:
+typedef struct _SW_Antenna_Switch_ {
WARNING: do not add new typedefs
#181: FILE: hal/odm.h:181:
+typedef struct _ODM_RATE_ADAPTIVE {
WARNING: do not add new typedefs
#280: FILE: hal/odm.h:280:
+typedef enum tag_Dynamic_ODM_Support_Ability_Type {
WARNING: do not add new typedefs
#300: FILE: hal/odm.h:300:
+typedef struct _ODM_STA_INFO {
WARNING: do not add new typedefs
#328: FILE: hal/odm.h:328:
+typedef enum _ODM_Common_Info_Definition {
WARNING: do not add new typedefs
#418: FILE: hal/odm.h:418:
+typedef enum _ODM_Support_Ability_Definition {
WARNING: do not add new typedefs
#449: FILE: hal/odm.h:449:
+typedef enum tag_ODM_Support_Interface_Definition {
WARNING: do not add new typedefs
#455: FILE: hal/odm.h:455:
+typedef enum tag_ODM_Support_IC_Type_Definition {
WARNING: do not add new typedefs
#460: FILE: hal/odm.h:460:
+typedef enum tag_ODM_Cut_Version_Definition {
WARNING: do not add new typedefs
#475: FILE: hal/odm.h:475:
+typedef enum tag_ODM_Fab_Version_Definition {
WARNING: do not add new typedefs
#484: FILE: hal/odm.h:484:
+typedef enum tag_ODM_RF_Path_Bit_Definition {
WARNING: do not add new typedefs
#495: FILE: hal/odm.h:495:
+typedef enum tag_ODM_RF_Type_Definition {
WARNING: do not add new typedefs
#516: FILE: hal/odm.h:516:
+typedef enum tag_ODM_MAC_PHY_Mode_Definition {
WARNING: do not add new typedefs
#522: FILE: hal/odm.h:522:
+typedef enum tag_BT_Coexist_Definition {
WARNING: do not add new typedefs
#530: FILE: hal/odm.h:530:
+typedef enum tag_Operation_Mode_Definition {
WARNING: do not add new typedefs
#543: FILE: hal/odm.h:543:
+typedef enum tag_Wireless_Mode_Definition {
WARNING: do not add new typedefs
#555: FILE: hal/odm.h:555:
+typedef enum tag_Band_Type_Definition {
WARNING: do not add new typedefs
#563: FILE: hal/odm.h:563:
+typedef enum tag_Secondary_Channel_Offset_Definition {
WARNING: do not add new typedefs
#570: FILE: hal/odm.h:570:
+typedef enum tag_Security_Definition {
WARNING: do not add new typedefs
#582: FILE: hal/odm.h:582:
+typedef enum tag_Bandwidth_Definition {
WARNING: do not add new typedefs
#593: FILE: hal/odm.h:593:
+typedef enum tag_Board_Definition {
WARNING: do not add new typedefs
#605: FILE: hal/odm.h:605:
+typedef enum tag_ODM_Package_Definition {
WARNING: do not add new typedefs
#612: FILE: hal/odm.h:612:
+typedef enum tag_ODM_TYPE_GPA_Definition {
WARNING: do not add new typedefs
#617: FILE: hal/odm.h:617:
+typedef enum tag_ODM_TYPE_APA_Definition {
WARNING: do not add new typedefs
#622: FILE: hal/odm.h:622:
+typedef enum tag_ODM_TYPE_GLNA_Definition {
WARNING: do not add new typedefs
#629: FILE: hal/odm.h:629:
+typedef enum tag_ODM_TYPE_ALNA_Definition {
WARNING: do not add new typedefs
#637: FILE: hal/odm.h:637:
+typedef enum tag_CCA_Path {
WARNING: do not add new typedefs
#643: FILE: hal/odm.h:643:
+typedef struct _ODM_RA_Info_ {
WARNING: do not add new typedefs
#675: FILE: hal/odm.h:675:
+typedef struct _IQK_MATRIX_REGS_SETTING {
WARNING: do not add new typedefs
#683: FILE: hal/odm.h:683:
+typedef struct ODM_RF_Calibration_Structure {
WARNING: do not add new typedefs
#788: FILE: hal/odm.h:788:
+typedef struct _FAST_ANTENNA_TRAINNING_ {
WARNING: do not add new typedefs
#828: FILE: hal/odm.h:828:
+typedef enum _FAT_STATE {
WARNING: do not add new typedefs
#833: FILE: hal/odm.h:833:
+typedef enum _ANT_DIV_TYPE {
WARNING: do not add new typedefs
#843: FILE: hal/odm.h:843:
+typedef struct _ODM_PATH_DIVERSITY_ {
WARNING: do not add new typedefs
#852: FILE: hal/odm.h:852:
+typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE {
WARNING: do not add new typedefs
#860: FILE: hal/odm.h:860:
+typedef struct _ANT_DETECTED_INFO {
WARNING: do not add new typedefs
#870: FILE: hal/odm.h:870:
+typedef struct DM_Out_Source_Dynamic_Mechanism_Structure {
WARNING: do not add new typedefs
#1229: FILE: hal/odm.h:1229:
+ typedef enum _ODM_RF_CONTENT {
WARNING: do not add new typedefs
#1236: FILE: hal/odm.h:1236:
+typedef enum _ODM_BB_Config_Type {
WARNING: do not add new typedefs
#1246: FILE: hal/odm.h:1246:
+typedef enum _ODM_RF_Config_Type {
WARNING: do not add new typedefs
#1251: FILE: hal/odm.h:1251:
+typedef enum _ODM_FW_Config_Type {
WARNING: do not add new typedefs
#1262: FILE: hal/odm.h:1262:
+typedef enum _RT_STATUS {
WARNING: do not add new typedefs
#1319: FILE: hal/odm.h:1319:
+typedef enum tag_1R_CCA_Type_Definition {
WARNING: do not add new typedefs
#1325: FILE: hal/odm.h:1325:
+typedef enum tag_RF_Type_Definition {
WARNING: do not add new typedefs
#1334: FILE: hal/odm.h:1334:
+typedef enum tag_SW_Antenna_Switch_Definition {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-4-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#47: FILE: hal/HalBtcOutSrc.h:47:
+typedef enum _BTC_POWERSAVE_TYPE {
WARNING: do not add new typedefs
#54: FILE: hal/HalBtcOutSrc.h:54:
+typedef enum _BTC_BT_REG_TYPE {
WARNING: do not add new typedefs
#63: FILE: hal/HalBtcOutSrc.h:63:
+typedef enum _BTC_CHIP_INTERFACE {
WARNING: do not add new typedefs
#71: FILE: hal/HalBtcOutSrc.h:71:
+typedef enum _BTC_CHIP_TYPE {
WARNING: do not add new typedefs
#81: FILE: hal/HalBtcOutSrc.h:81:
+typedef enum _BTC_MSG_TYPE {
WARNING: do not add new typedefs
#167: FILE: hal/HalBtcOutSrc.h:167:
+typedef struct _BTC_BOARD_INFO {
WARNING: do not add new typedefs
#177: FILE: hal/HalBtcOutSrc.h:177:
+typedef enum _BTC_DBG_OPCODE {
WARNING: do not add new typedefs
#187: FILE: hal/HalBtcOutSrc.h:187:
+typedef enum _BTC_RSSI_STATE {
WARNING: do not add new typedefs
#200: FILE: hal/HalBtcOutSrc.h:200:
+typedef enum _BTC_WIFI_ROLE {
WARNING: do not add new typedefs
#208: FILE: hal/HalBtcOutSrc.h:208:
+typedef enum _BTC_WIFI_BW_MODE {
WARNING: do not add new typedefs
#215: FILE: hal/HalBtcOutSrc.h:215:
+typedef enum _BTC_WIFI_TRAFFIC_DIR {
WARNING: do not add new typedefs
#221: FILE: hal/HalBtcOutSrc.h:221:
+typedef enum _BTC_WIFI_PNP {
WARNING: do not add new typedefs
#228: FILE: hal/HalBtcOutSrc.h:228:
+typedef enum _BT_WIFI_COEX_STATE {
WARNING: do not add new typedefs
#239: FILE: hal/HalBtcOutSrc.h:239:
+typedef enum _BTC_GET_TYPE {
WARNING: do not add new typedefs
#281: FILE: hal/HalBtcOutSrc.h:281:
+typedef enum _BTC_SET_TYPE {
WARNING: do not add new typedefs
#321: FILE: hal/HalBtcOutSrc.h:321:
+typedef enum _BTC_DBG_DISP_TYPE {
WARNING: do not add new typedefs
#328: FILE: hal/HalBtcOutSrc.h:328:
+typedef enum _BTC_NOTIFY_TYPE_IPS {
WARNING: do not add new typedefs
#334: FILE: hal/HalBtcOutSrc.h:334:
+typedef enum _BTC_NOTIFY_TYPE_LPS {
WARNING: do not add new typedefs
#340: FILE: hal/HalBtcOutSrc.h:340:
+typedef enum _BTC_NOTIFY_TYPE_SCAN {
WARNING: do not add new typedefs
#346: FILE: hal/HalBtcOutSrc.h:346:
+typedef enum _BTC_NOTIFY_TYPE_ASSOCIATE {
WARNING: do not add new typedefs
#352: FILE: hal/HalBtcOutSrc.h:352:
+typedef enum _BTC_NOTIFY_TYPE_MEDIA_STATUS {
WARNING: do not add new typedefs
#358: FILE: hal/HalBtcOutSrc.h:358:
+typedef enum _BTC_NOTIFY_TYPE_SPECIAL_PACKET {
WARNING: do not add new typedefs
#366: FILE: hal/HalBtcOutSrc.h:366:
+typedef enum _BTC_NOTIFY_TYPE_STACK_OPERATION {
WARNING: do not add new typedefs
#374: FILE: hal/HalBtcOutSrc.h:374:
+typedef enum _BTC_ANTENNA_POS {
WARNING: do not add new typedefs
#412: FILE: hal/HalBtcOutSrc.h:412:
+typedef struct _BTC_BT_INFO {
WARNING: do not add new typedefs
#440: FILE: hal/HalBtcOutSrc.h:440:
+typedef struct _BTC_STACK_INFO {
WARNING: do not add new typedefs
#455: FILE: hal/HalBtcOutSrc.h:455:
+typedef struct _BTC_BT_LINK_INFO {
WARNING: do not add new typedefs
#468: FILE: hal/HalBtcOutSrc.h:468:
+typedef struct _BTC_STATISTICS {
WARNING: do not add new typedefs
#487: FILE: hal/HalBtcOutSrc.h:487:
+typedef struct _BTC_COEXIST {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-2-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#24: FILE: hal/HalBtc8723b1Ant.h:24:
+typedef enum _BT_INFO_SRC_8723B_1ANT {
WARNING: do not add new typedefs
#31: FILE: hal/HalBtc8723b1Ant.h:31:
+typedef enum _BT_8723B_1ANT_BT_STATUS {
WARNING: do not add new typedefs
#41: FILE: hal/HalBtc8723b1Ant.h:41:
+typedef enum _BT_8723B_1ANT_WIFI_STATUS {
WARNING: do not add new typedefs
#51: FILE: hal/HalBtc8723b1Ant.h:51:
+typedef enum _BT_8723B_1ANT_COEX_ALGO {
WARNING: do not add new typedefs
#66: FILE: hal/HalBtc8723b1Ant.h:66:
+typedef struct _COEX_DM_8723B_1ANT {
WARNING: do not add new typedefs
#121: FILE: hal/HalBtc8723b1Ant.h:121:
+typedef struct _COEX_STA_8723B_1ANT {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210305100146.30687-1-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#19: FILE: hal/HalBtc8723b2Ant.h:19:
+typedef enum _BT_INFO_SRC_8723B_2ANT {
WARNING: do not add new typedefs
#26: FILE: hal/HalBtc8723b2Ant.h:26:
+typedef enum _BT_8723B_2ANT_BT_STATUS {
WARNING: do not add new typedefs
#36: FILE: hal/HalBtc8723b2Ant.h:36:
+typedef enum _BT_8723B_2ANT_COEX_ALGO {
WARNING: do not add new typedefs
#51: FILE: hal/HalBtc8723b2Ant.h:51:
+typedef struct _COEX_DM_8723B_2ANT {
WARNING: do not add new typedefs
#104: FILE: hal/HalBtc8723b2Ant.h:104:
+typedef struct _COEX_STA_8723B_2ANT {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210305101151.13137-1-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit fixes the following checkpatch.pl warnings:
WARNING: do not add new typedefs
#11: FILE: hal/HalPhyRf.h:11:
+typedef enum _SPUR_CAL_METHOD {
WARNING: do not add new typedefs
#16: FILE: hal/HalPhyRf.h:16:
+typedef enum _PWRTRACK_CONTROL_METHOD {
WARNING: do not add new typedefs
#27: FILE: hal/HalPhyRf.h:27:
+typedef struct _TXPWRTRACK_CFG {
Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210305144906.18850-1-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix some "incorrect type in assignment" warnings reported by sparse in fw.c
sparse warnings:
wimax/i2400m/fw.c:266:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:266:25: warning: incorrect type in assignment (different base types)
wimax/i2400m/fw.c:267:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:267:25: warning: incorrect type in assignment (different base types)
wimax/i2400m/fw.c:268:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:268:25: warning: incorrect type in assignment (different base types)
wimax/i2400m/fw.c:269:27: warning: cast to restricted __le32
wimax/i2400m/fw.c:269:25: warning: incorrect type in assignment (different base types)
Signed-off-by: Darryl T. Agostinelli <dagostinelli@gmail.com>
Link: https://lore.kernel.org/r/20210308144839.2364329-1-dagostinelli@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In function rtl92e_start_adapter() automatic variable 'i' referenced only
within certain loops, used as iteration counter. Control flow can't get
into such loop w/o 'i = 0' assignment.
It's redundant to shadow this variable by creating scope around loop.
This patch fixes the following sparse warning:
warning: symbol 'i' shadows an earlier one
Signed-off-by: Nikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210302133217.145994-1-knv418@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When the Comedi "detach" handler is called, it is possible that an extra
A/D conversion (triggered during termination of a Comedi asynchronous
command) is still in progress. In that case, the FINISH bit in the
Status register will eventually get set and there will be stale data
waiting to be read from the A/D Data register. The interrupt handler
will also be called if still connected at the time. That should all be
mostly harmless, but it would be better to wait for any such conversion
to complete and clear any stale data during the "detach". Add a custom
"detach" handler `dt2814_detach()` to do that if an interrupt handler
has been set up. (There is no need to do it if no interrupt handler was
set up because Comedi asynchronous command support is disabled in that
case.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-7-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The `ntrig` member of the `struct dt2814_private` pointed to by
`dev->private` is no longer used as a counter to determine the end of
acquisition for a Comedi asynchronous command. The other member
`curadscan` is also unused. Remove the allocation of the private data
during initialization and remove the definition of `struct
dt2814_private` since they are no longer needed.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-6-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The support for asynchronous commands in this driver is currently
broken. If interrupts are enabled, the interrupt handler is called at
the end of every A/D conversion. A/D conversions could be due to
software-triggered conversions resulting from Comedi `INSN_READ`
instruction handling, or due to timer-trigger conversions enabled when
a Comedi asynchronous command is set up. We only want the interrupt
handler to read a sample from the A/D Data register for timer-triggered
conversions, but currently it always reads the A/D Data register. Since
the A/D Data register is read twice (to read a 12-bit value from an
8-bit register), that probably interferes with the reading for
software-triggered conversions.
The interrupt handler does not currently do anything with the data, it
just ignores it. It should be written to the Comedi buffer if handling
an asynchronous command.
Other problems are that the driver has no Comedi `cancel` handler to
call when the asynchronous command is being stopped manually, and it
does not handle "infinite" acquisitions (when the command's `stop_src ==
TRIG_NONE`) properly.
Change the interrupt handler to check the timer enable (ENB) bit to
check the asynchronous command is active and return early if not
enabled. Also check the error (ERR) and "conversion complete" (FINISH)
bits, and return early if neither is set. Then the sample can be read
from the A/D Data register to clear the ERR and FINISH bits. If the ERR
bit was set, terminate the acquisition with an error, otherwise write
the data to the Comedi buffer and check for end of acquisition. Replace
the current check for end of acquisition, using the count of completed
scans in `scans_done` (updated by calls to `comedi_buf_write_samples()`)
when `stop_src == TRIG_COUNT`) and allowing "infinite" acquisitions when
`stop_src == TRIG_NONE`.
Add a `cancel` handler function `dt2814_ai_cancel()` that will be called
when the end of acquisition event is processed and when the acquisition
is stopped manually. It turns off the timer enable (ENB) bit in the
Control register, leaving the current channel selected.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-5-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The Comedi "attach" handler `dt2814_attach()` writes to the Control
register to turn off the timer enable 'ENB' bit, which triggers a
conversion. It then sleeps awhile and checks the Status register,
returning an error if the ERR bit is set. However, the ERR bit could
have been set due to the conversion being triggered while the A/D
converter was busy (unlikely) or due to the conversion being triggered
before some previous sample had been read from the A/D Data register.
Replace the existing code with a call to `dt2814_ai_clear()` which waits
for any conversion to finish and then clears any unread data or error
condition. A non-zero return value from `dt2814_ai_clear()` indicates a
time-out while waiting for the A/D converter to become non-busy. Return
an error in that case.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210301165757.243065-4-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>