mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 23:59:33 -04:00
wifi: rsi: Fix types to appease CFI
Avoids errors like:
CFI failure at kthread+0x124/0x1cc (target: rsi_coex_scheduler_thread+0x0/0x1b4 [redpine_91x]; expected type: 0x89fb613d)
As seen in the aforementioned error this was tested using the downstream
redpine_91x driver found in the Librem 5's downstream source tree.
However, it appears that this driver is a modified version of the rsi
driver found in mainline Linux and as such I decided to port the changes
here too.
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Link: https://patch.msgid.link/20260804-rsi-cfi-fix-v2-1-59679a520240@postmarketos.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
4d8cfff012
commit
da308f6e47
@@ -50,8 +50,9 @@ static void rsi_coex_sched_tx_pkts(struct rsi_coex_ctrl_block *coex_cb)
|
||||
} while (coex_q != RSI_COEX_Q_INVALID);
|
||||
}
|
||||
|
||||
static void rsi_coex_scheduler_thread(struct rsi_common *common)
|
||||
static int rsi_coex_scheduler_thread(void *data)
|
||||
{
|
||||
struct rsi_common *common = data;
|
||||
struct rsi_coex_ctrl_block *coex_cb = common->coex_cb;
|
||||
u32 timeout = EVENT_WAIT_FOREVER;
|
||||
|
||||
|
||||
@@ -246,12 +246,13 @@ EXPORT_SYMBOL_GPL(rsi_read_pkt);
|
||||
/**
|
||||
* rsi_tx_scheduler_thread() - This function is a kernel thread to send the
|
||||
* packets to the device.
|
||||
* @common: Pointer to the driver private structure.
|
||||
* @data: Pointer to the driver private structure.
|
||||
*
|
||||
* Return: None.
|
||||
* Return: 0.
|
||||
*/
|
||||
static void rsi_tx_scheduler_thread(struct rsi_common *common)
|
||||
static int rsi_tx_scheduler_thread(void *data)
|
||||
{
|
||||
struct rsi_common *common = data;
|
||||
struct rsi_hw *adapter = common->priv;
|
||||
u32 timeout = EVENT_WAIT_FOREVER;
|
||||
|
||||
|
||||
@@ -62,8 +62,9 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter, u16 ms_word)
|
||||
|
||||
static void rsi_rx_handler(struct rsi_hw *adapter);
|
||||
|
||||
void rsi_sdio_rx_thread(struct rsi_common *common)
|
||||
int rsi_sdio_rx_thread(void *data)
|
||||
{
|
||||
struct rsi_common *common = data;
|
||||
struct rsi_hw *adapter = common->priv;
|
||||
struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
|
||||
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
/**
|
||||
* rsi_usb_rx_thread() - This is a kernel thread to receive the packets from
|
||||
* the USB device.
|
||||
* @common: Pointer to the driver private structure.
|
||||
* @data: Pointer to the driver private structure.
|
||||
*
|
||||
* Return: None.
|
||||
* Return: 0.
|
||||
*/
|
||||
void rsi_usb_rx_thread(struct rsi_common *common)
|
||||
int rsi_usb_rx_thread(void *data)
|
||||
{
|
||||
struct rsi_common *common = data;
|
||||
struct rsi_hw *adapter = common->priv;
|
||||
struct rsi_91x_usbdev *dev = adapter->rsi_dev;
|
||||
int status;
|
||||
|
||||
@@ -58,7 +58,7 @@ static inline void rsi_reset_event(struct rsi_event *event)
|
||||
|
||||
static inline int rsi_create_kthread(struct rsi_common *common,
|
||||
struct rsi_thread *thread,
|
||||
void *func_ptr,
|
||||
int (*func_ptr)(void *data),
|
||||
u8 *name)
|
||||
{
|
||||
init_completion(&thread->completion);
|
||||
|
||||
@@ -134,5 +134,5 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter, u16 ms_word);
|
||||
void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit);
|
||||
int rsi_sdio_determine_event_timeout(struct rsi_hw *adapter);
|
||||
int rsi_sdio_check_buffer_status(struct rsi_hw *adapter, u8 q_num);
|
||||
void rsi_sdio_rx_thread(struct rsi_common *common);
|
||||
int rsi_sdio_rx_thread(void *data);
|
||||
#endif
|
||||
|
||||
@@ -81,5 +81,5 @@ static inline int rsi_usb_event_timeout(struct rsi_hw *adapter)
|
||||
return EVENT_WAIT_FOREVER;
|
||||
}
|
||||
|
||||
void rsi_usb_rx_thread(struct rsi_common *common);
|
||||
int rsi_usb_rx_thread(void *data);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user