From 37151b636dcc070ac615b7b42c1596dd628ed204 Mon Sep 17 00:00:00 2001 From: Robbin Van Damme Date: Fri, 10 Oct 2025 13:41:17 +0000 Subject: [PATCH] fixes to get cc33xx to build Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Robbin Van Damme --- drivers/net/wireless/ti/cc33xx/debugfs.c | 6 +++--- drivers/net/wireless/ti/cc33xx/debugfs.h | 1 + drivers/net/wireless/ti/cc33xx/spi.c | 4 ++-- drivers/net/wireless/ti/wlcore/tx.c | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ti/cc33xx/debugfs.c b/drivers/net/wireless/ti/cc33xx/debugfs.c index a250e91532ec..d475ac369ad4 100644 --- a/drivers/net/wireless/ti/cc33xx/debugfs.c +++ b/drivers/net/wireless/ti/cc33xx/debugfs.c @@ -251,12 +251,12 @@ static const struct file_operations radar_debug_mode_ops = { .llseek = default_llseek, }; -static void cc33xx_debugfs_add_files_helper(struct dentry *moddir) +void cc33xx_debugfs_add_files_helper(struct cc33xx *wl, struct dentry *moddir) { DEBUGFS_ADD(radar_debug_mode, moddir); } #else -static void cc33xx_debugfs_add_files_helper(struct dentry *moddir) {} +static void cc33xx_debugfs_add_files_helper(struct cc33xx *wl, struct dentry *moddir) {} #endif /* CFG80211_CERTIFICATION_ONUS */ @@ -1998,7 +1998,7 @@ static int cc33xx_debugfs_add_files(struct cc33xx *wl, DEBUGFS_ADD(conf, moddir); DEBUGFS_ADD(radar_detection, moddir); - cc33xx_debugfs_add_files_helper(moddir); + cc33xx_debugfs_add_files_helper(wl, moddir); DEBUGFS_ADD(dynamic_fw_traces, moddir); return 0; diff --git a/drivers/net/wireless/ti/cc33xx/debugfs.h b/drivers/net/wireless/ti/cc33xx/debugfs.h index fb413a260922..0242c770707d 100644 --- a/drivers/net/wireless/ti/cc33xx/debugfs.h +++ b/drivers/net/wireless/ti/cc33xx/debugfs.h @@ -19,6 +19,7 @@ int cc33xx_debugfs_init(struct cc33xx *wl); void cc33xx_debugfs_exit(struct cc33xx *wl); void cc33xx_debugfs_reset(struct cc33xx *wl); void cc33xx_debugfs_update_stats(struct cc33xx *wl); +void cc33xx_debugfs_add_files_helper(struct cc33xx *wl, struct dentry *moddir); #define DEBUGFS_FORMAT_BUFFER_SIZE 256 diff --git a/drivers/net/wireless/ti/cc33xx/spi.c b/drivers/net/wireless/ti/cc33xx/spi.c index 691970355df7..9e46feeeaad7 100644 --- a/drivers/net/wireless/ti/cc33xx/spi.c +++ b/drivers/net/wireless/ti/cc33xx/spi.c @@ -74,7 +74,7 @@ static void __cc33xx_spi_lock(struct cc33xx_spi_glue *glue) { if (glue->locking_pid != current->pid) { - spi_bus_lock(to_spi_device(glue->dev)->master); + spi_bus_lock(to_spi_device(glue->dev)->controller); glue->locking_pid = current->pid; glue->lock_count = 1; } else { @@ -90,7 +90,7 @@ static void __cc33xx_spi_unlock(struct cc33xx_spi_glue *glue) glue->lock_count--; if (!glue->lock_count){ glue->locking_pid = 0; - spi_bus_unlock(to_spi_device(glue->dev)->master); + spi_bus_unlock(to_spi_device(glue->dev)->controller); } } diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 464587d16ab2..21714121de64 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -173,7 +173,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, return wlvif->sta.hlid; } -unsigned int wlcore_calc_packet_alignment(struct wl1271 *wl, +unsigned int cc33xx_calc_packet_alignment(struct wl1271 *wl, unsigned int packet_length) { if ((wl->quirks & WLCORE_QUIRK_TX_PAD_LAST_FRAME) || @@ -182,7 +182,7 @@ unsigned int wlcore_calc_packet_alignment(struct wl1271 *wl, else return ALIGN(packet_length, WL12XX_BUS_BLOCK_SIZE); } -EXPORT_SYMBOL(wlcore_calc_packet_alignment); +EXPORT_SYMBOL(cc33xx_calc_packet_alignment); static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct sk_buff *skb, u32 extra, u32 buf_offset, @@ -421,7 +421,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif, * In special cases, we want to align to a specific block size * (eg. for wl128x with SDIO we align to 256). */ - total_len = wlcore_calc_packet_alignment(wl, skb->len); + total_len = cc33xx_calc_packet_alignment(wl, skb->len); memcpy(wl->aggr_buf + buf_offset, skb->data, skb->len); memset(wl->aggr_buf + buf_offset + skb->len, 0, total_len - skb->len); -- 2.43.0