mxm_wifiex: fix L6.7 kernel next tree build warnings

When build wifi driver based on L6.7 kernel next tree, will observe the
following build warnings. Part of the root cause is some functions are
only called locally and should always have been static, otherwise will
trigger the no previous prototype warnings. Part of the root cause is
some global functions are not included before the definition, so add
them in the corresponding header files, which can make sure it been
called by others files correctly, otherwise also will trigger the no
previous prototype warnings.

  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlan/mlan_txrx.o
/mwifiex/mxm_wifiex/wlan_src/mlan/mlan_txrx.c:111:6: warning: no previous prototype for ‘wlan_drv_mcast_cycle_delay_calulation’ [-Wmissing-prototypes]
  111 | void wlan_drv_mcast_cycle_delay_calulation(pmlan_adapter pmadapter,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.o
/mwifiex/mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c:258:8: warning: no previous prototype for ‘wlan_flush_ext_cmd_pending_queue’ [-Wmissing-prototypes]
  258 | t_void wlan_flush_ext_cmd_pending_queue(pmlan_adapter pmadapter)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......

For the following defined but not used warning, remove the useless
woal_cancel_chanrpt_event() function.
  CC [M]  /mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.o
/mwifiex/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c:2639:13: warning: ‘woal_cancel_chanrpt_event’ defined but not used [-Wunused-function]
 2639 | static void woal_cancel_chanrpt_event(moal_private *priv)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
Sherry Sun 2023-12-10 14:06:18 +08:00
parent 84aa9543bb
commit c3a62accda
19 changed files with 54 additions and 83 deletions

View file

@ -275,7 +275,7 @@ static t_u8 woal_get_bonded_channels(t_u8 pri_chan, t_u8 bw, t_u8 *chan_list)
*
* @return N/A
*/
t_void wlan_11h_set_chan_dfs_state(mlan_private *priv, t_u8 chan, t_u8 bw,
static t_void wlan_11h_set_chan_dfs_state(mlan_private *priv, t_u8 chan, t_u8 bw,
dfs_state_t dfs_state)
{
t_u8 n_chan;
@ -1116,7 +1116,7 @@ static t_bool wlan_11h_is_slave_active_on_dfs_chan(mlan_private *priv)
* - MTRUE if radar detection is required
* - MFALSE otherwise
*/
t_bool wlan_11h_is_radar_channel(mlan_private *priv, t_u8 channel)
static t_bool wlan_11h_is_radar_channel(mlan_private *priv, t_u8 channel)
{
t_bool required = MFALSE;

View file

@ -2204,7 +2204,7 @@ int wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rate_bitmap, int size)
*
* @return BAND_B|BAND_G|BAND_A
*/
t_u16 wlan_convert_config_bands(t_u16 config_bands)
static t_u16 wlan_convert_config_bands(t_u16 config_bands)
{
t_u16 bands = 0;
if (config_bands & BAND_B)

View file

@ -255,7 +255,7 @@ done:
*
* @return N/A
*/
t_void wlan_flush_ext_cmd_pending_queue(pmlan_adapter pmadapter)
static t_void wlan_flush_ext_cmd_pending_queue(pmlan_adapter pmadapter)
{
cmd_ctrl_node *pcmd_node = MNULL;
HostCmd_DS_COMMAND *pcmd = MNULL;
@ -2205,7 +2205,7 @@ done:
*
* @return N/A
*/
void wlan_handle_cmd_error_in_pre_aleep(mlan_adapter *pmadapter, t_u16 cmd_no)
static void wlan_handle_cmd_error_in_pre_aleep(mlan_adapter *pmadapter, t_u16 cmd_no)
{
cmd_ctrl_node *pcmd_node = MNULL;
ENTER();
@ -2981,7 +2981,7 @@ t_void wlan_cancel_pending_ioctl(pmlan_adapter pmadapter,
*
* @return N/A
*/
t_void wlan_fill_hal_wifi_rate(pmlan_private pmpriv, mlan_wifi_rate *pmlan_rate,
static t_void wlan_fill_hal_wifi_rate(pmlan_private pmpriv, mlan_wifi_rate *pmlan_rate,
wifi_rate *prate)
{
t_u8 index = 0;

View file

@ -3583,7 +3583,7 @@ mlan_status wlan_misc_multi_ap_cfg(pmlan_adapter pmadapter,
*
* @return MTRUE/MFALSE
*/
t_u8 wlan_check_beacon_prot_supported(mlan_private *pmpriv,
static t_u8 wlan_check_beacon_prot_supported(mlan_private *pmpriv,
BSSDescriptor_t *pbss_desc)
{
if (pbss_desc && pbss_desc->pext_cap) {

View file

@ -2426,7 +2426,7 @@ mlan_status wlan_get_sdio_device(pmlan_adapter pmadapter)
* @param pmadapter A pointer to mlan_adapter structure
* @return N/A
*/
void wlan_dump_mp_registers(pmlan_adapter pmadapter)
static void wlan_dump_mp_registers(pmlan_adapter pmadapter)
{
t_u32 mp_wr_bitmap;
t_bool new_mode = pmadapter->pcard_sd->supports_sdio_new_mode;

View file

@ -484,7 +484,7 @@ static mlan_status wlan_cmd_mfg_config_trigger_frame(pmlan_private pmpriv,
* @return MLAN_STATUS_SUCCESS
*/
mlan_status wlan_cmd_mfg_he_tb_tx(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
static mlan_status wlan_cmd_mfg_he_tb_tx(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
t_u16 action, t_void *pdata_buf)
{
struct mfg_Cmd_HE_TBTx_t *mcmd =
@ -2990,7 +2990,7 @@ mlan_status wlan_cmd_arb_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *cmd,
* @return N/A
*/
mlan_status wlan_cmd_ipv6_ra_offload(mlan_private *pmpriv,
static mlan_status wlan_cmd_ipv6_ra_offload(mlan_private *pmpriv,
HostCmd_DS_COMMAND *pcmd, t_u16 cmd_action,
void *pdata_buf)
{

View file

@ -2590,7 +2590,7 @@ mlan_status wlan_ret_arb_cfg(pmlan_private pmpriv, HostCmd_DS_COMMAND *resp,
*
* @return MLAN_STATUS_SUCCESS
*/
mlan_status wlan_ret_ipv6_ra_offload(pmlan_private pmpriv,
static mlan_status wlan_ret_ipv6_ra_offload(pmlan_private pmpriv,
HostCmd_DS_COMMAND *resp,
mlan_ioctl_req *pioctl_buf)
{

View file

@ -4789,7 +4789,7 @@ static mlan_status wlan_misc_ioctl_ips_cfg(pmlan_adapter pmadapter,
*
* @return MLAN_STATUS_SUCCESS or MLAN_STATUS_FAILURE
*/
mlan_status wlan_misc_ioctl_ipv6_ra_offload(pmlan_adapter pmadapter,
static mlan_status wlan_misc_ioctl_ipv6_ra_offload(pmlan_adapter pmadapter,
mlan_ioctl_req *pioctl_req)
{
pmlan_private pmpriv = pmadapter->priv[pioctl_req->bss_index];

View file

@ -108,7 +108,7 @@ t_u8 mcast_drv_update_allow_flag = MTRUE;
*
* @return Nothing
*/
void wlan_drv_mcast_cycle_delay_calulation(pmlan_adapter pmadapter,
static void wlan_drv_mcast_cycle_delay_calulation(pmlan_adapter pmadapter,
pmlan_buffer pmbuf)
{
static t_u32 prev_mcast_sec = 0;

View file

@ -206,7 +206,7 @@ void *woal_get_netdev_priv(struct net_device *dev)
*
* @return radio_type
*/
struct ieee80211_channel *woal_get_ieee80211_channel(moal_private *priv,
static struct ieee80211_channel *woal_get_ieee80211_channel(moal_private *priv,
chan_band_info *pchan_info)
{
enum ieee80211_band band = IEEE80211_BAND_2GHZ;
@ -2627,38 +2627,6 @@ void woal_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
LEAVE();
}
#ifdef UAP_CFG80211
#if KERNEL_VERSION(3, 12, 0) <= CFG80211_VERSION_CODE
/*
* @brief prepare and send WOAL_EVENT_CANCEL_CHANRPT
*
* @param priv A pointer moal_private structure
*
* @return N/A
*/
void woal_cancel_chanrpt_event(moal_private *priv)
{
struct woal_event *evt;
unsigned long flags;
moal_handle *handle = priv->phandle;
evt = kzalloc(sizeof(struct woal_event), GFP_ATOMIC);
if (!evt) {
PRINTM(MERROR, "Fail to alloc memory for deauth event\n");
LEAVE();
return;
}
evt->priv = priv;
evt->type = WOAL_EVENT_CANCEL_CHANRPT;
INIT_LIST_HEAD(&evt->link);
spin_lock_irqsave(&handle->evt_lock, flags);
list_add_tail(&evt->link, &handle->evt_queue);
spin_unlock_irqrestore(&handle->evt_lock, flags);
queue_work(handle->evt_workqueue, &handle->evt_work);
}
#endif
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
/*
* @brief check if we need set remain_on_channel
@ -2668,7 +2636,7 @@ void woal_cancel_chanrpt_event(moal_private *priv)
*
* @return MFALSE-no need set remain_on_channel
*/
t_u8 woal_check_mgmt_tx_channel(moal_private *priv,
static t_u8 woal_check_mgmt_tx_channel(moal_private *priv,
struct ieee80211_channel *chan,
unsigned int wait)
{
@ -2696,7 +2664,7 @@ t_u8 woal_check_mgmt_tx_channel(moal_private *priv,
*
* @return 0 -- success, otherwise fail
*/
int woal_mgmt_tx(moal_private *priv, const u8 *buf, size_t len,
static int woal_mgmt_tx(moal_private *priv, const u8 *buf, size_t len,
struct ieee80211_channel *chan, u64 cookie, unsigned int wait)
{
int ret = 0;

View file

@ -1142,7 +1142,7 @@ done:
*
* @return An invalid ring id for failure or valid ring id on success.
*/
int woal_get_ring_id_by_name(moal_private *priv, char *ring_name)
static int woal_get_ring_id_by_name(moal_private *priv, char *ring_name)
{
int id;
wifi_ring_buffer *ring;
@ -1172,7 +1172,7 @@ int woal_get_ring_id_by_name(moal_private *priv, char *ring_name)
*
* @return 0: success 1: fail
*/
int woal_start_logging(moal_private *priv, char *ring_name, int log_level,
static int woal_start_logging(moal_private *priv, char *ring_name, int log_level,
int flags, int time_intval, int threshold)
{
int ret = 0;
@ -1452,7 +1452,7 @@ static t_u32 woal_get_ring_next_entry(wifi_ring_buffer *ring, t_u32 offset)
*
* @return data length
*/
int woal_ring_pull_data(moal_private *priv, int ring_id, void *data,
static int woal_ring_pull_data(moal_private *priv, int ring_id, void *data,
t_s32 buf_len)
{
t_s32 r_len = 0;
@ -1499,7 +1499,7 @@ int woal_ring_pull_data(moal_private *priv, int ring_id, void *data,
*
* @return 0: success 1: fail
*/
int woal_ring_buffer_data_vendor_event(moal_private *priv, int ring_id,
static int woal_ring_buffer_data_vendor_event(moal_private *priv, int ring_id,
t_u8 *data, int len,
wifi_ring_buffer_status *ring_status)
{
@ -1588,7 +1588,7 @@ done:
*
* @return void
*/
void woal_ring_poll_worker(struct work_struct *work)
static void woal_ring_poll_worker(struct work_struct *work)
{
struct delayed_work *d_work = to_delayed_work(work);
wifi_ring_buffer *ring_info =
@ -1659,7 +1659,7 @@ exit:
*
* @return 0: success -1: fail
*/
int woal_ring_push_data(moal_private *priv, int ring_id,
static int woal_ring_push_data(moal_private *priv, int ring_id,
wifi_ring_buffer_entry *hdr, void *data)
{
unsigned long flags;
@ -2073,7 +2073,7 @@ done:
*
* @return 0: success 1: fail
*/
int woal_wake_reason_vendor_event(moal_private *priv,
static int woal_wake_reason_vendor_event(moal_private *priv,
mlan_ds_hs_wakeup_reason wake_reason)
{
struct wiphy *wiphy = NULL;
@ -2206,7 +2206,7 @@ done:
*
* @return 0: success 1: fail
*/
int woal_packet_fate_vendor_event(moal_private *priv,
static int woal_packet_fate_vendor_event(moal_private *priv,
packet_fate_packet_type pkt_type, t_u8 fate,
frame_type payload_type, t_u32 drv_ts_usec,
t_u32 fw_ts_usec, t_u8 *data, t_u32 len)
@ -2529,7 +2529,7 @@ done:
* @return non-zero if packet should be passed to AP, zero if
* packet should be dropped.
*/
int process_packet(const t_u8 *program, t_u32 program_len, const t_u8 *packet,
static int process_packet(const t_u8 *program, t_u32 program_len, const t_u8 *packet,
t_u32 packet_len, t_u32 filter_age)
{
/* Program counter */

View file

@ -413,6 +413,10 @@ int woal_do_ioctl(struct net_device *dev, struct ifreq *req, void __user *data,
#else
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
#endif
mlan_status parse_arguments(t_u8 *pos, int *data, int datalen,
int *user_data_len);
/*
* For android private commands, fixed value of ioctl is used.
* Internally commands are differentiated using strings.

View file

@ -6324,7 +6324,7 @@ int woal_close(struct net_device *dev)
*
* @return 0 --success, otherwise fail
*/
void woal_disable_ampdu(moal_private *priv)
static void woal_disable_ampdu(moal_private *priv)
{
mlan_ds_11n_aggr_prio_tbl aggr_prio_tbl;
int i;
@ -7588,7 +7588,7 @@ done:
* @param pmbuf A mlan buffer
* @return N/A
*/
void woal_send_tx_pkt_to_mon_if(moal_private *priv, pmlan_buffer pmbuf)
static void woal_send_tx_pkt_to_mon_if(moal_private *priv, pmlan_buffer pmbuf)
{
struct ieee80211_hdr *dot11_hdr = NULL;
struct radiotap_info *rt = NULL;
@ -11574,7 +11574,7 @@ t_void woal_rx_work_queue(struct work_struct *work)
*
* @return N/A
*/
void woal_pcie_rx_data_task(unsigned long data)
static void woal_pcie_rx_data_task(unsigned long data)
{
moal_handle *handle = (moal_handle *)data;
wifi_timeval start_timeval;
@ -11619,7 +11619,7 @@ void woal_pcie_rx_data_task(unsigned long data)
*
* @return N/A
*/
t_void woal_pcie_tx_complete_task(unsigned long data)
static t_void woal_pcie_tx_complete_task(unsigned long data)
{
moal_handle *handle = (moal_handle *)data;
ENTER();
@ -11775,7 +11775,7 @@ t_void woal_pcie_delayed_tx_work(struct work_struct *work)
* @return skb buffer
*/
struct sk_buff *woal_skb_dequeue_spinlock(struct sk_buff_head *list)
static struct sk_buff *woal_skb_dequeue_spinlock(struct sk_buff_head *list)
{
struct sk_buff *result;
@ -11792,7 +11792,7 @@ struct sk_buff *woal_skb_dequeue_spinlock(struct sk_buff_head *list)
*
* @return N/A
*/
t_void woal_tx_work_handler(struct work_struct *work)
static t_void woal_tx_work_handler(struct work_struct *work)
{
moal_handle *handle = container_of(work, moal_handle, tx_work);
moal_private *priv = NULL;

View file

@ -3896,9 +3896,10 @@ void woal_send_iwevcustom_event(moal_private *priv, char *str);
/** Get channel list */
mlan_status woal_get_channel_list(moal_private *priv, t_u8 wait_option,
mlan_chan_list *chanlist);
#endif
mlan_status woal_11d_check_ap_channel(moal_private *priv, t_u8 wait_option,
mlan_ssid_bssid *ssid_bssid);
#endif
/** Set/Get retry count */
mlan_status woal_set_get_retry(moal_private *priv, t_u32 action,
t_u8 wait_option, int *value);

View file

@ -26,6 +26,7 @@ Change log:
********************************************************/
#include "moal_main.h"
#include "moal_eth_ioctl.h"
#ifdef UAP_SUPPORT
#include "moal_uap.h"
#endif
@ -64,9 +65,6 @@ static char *szModes[] = {
};
#endif
mlan_status parse_arguments(t_u8 *pos, int *data, int datalen,
int *user_data_len);
/********************************************************
Global Variables
********************************************************/
@ -455,7 +453,7 @@ static int parse_cmd52_string(const char *buffer, size_t len, int *func,
}
#endif
void woal_priv_get_tx_rx_ant(struct seq_file *sfp, moal_private *priv)
static void woal_priv_get_tx_rx_ant(struct seq_file *sfp, moal_private *priv)
{
int ret = 0;
int data[4] = {0};
@ -519,7 +517,7 @@ void woal_priv_get_tx_rx_ant(struct seq_file *sfp, moal_private *priv)
return;
}
mlan_status woal_priv_set_tx_rx_ant(moal_handle *handle, char *line)
static mlan_status woal_priv_set_tx_rx_ant(moal_handle *handle, char *line)
{
moal_private *priv = NULL;
mlan_ioctl_req *req = NULL;

View file

@ -1898,7 +1898,7 @@ done:
*
* @return binded net_device pointer or NULL if not found
*/
struct net_device *moal_get_netdev_from_stalist(moal_private *priv, t_u16 aid)
static struct net_device *moal_get_netdev_from_stalist(moal_private *priv, t_u16 aid)
{
station_node *sta_node = NULL;
@ -2570,7 +2570,7 @@ static void woal_rx_mgmt_pkt_event(moal_private *priv, t_u8 *pkt, t_u16 len)
*
* @return N/A
*/
void woal_rgpower_key_mismatch_event(moal_private *priv)
static void woal_rgpower_key_mismatch_event(moal_private *priv)
{
struct woal_event *evt;
unsigned long flags;

View file

@ -25,7 +25,7 @@
#include "moal_sta_cfg80211.h"
#include "moal_eth_ioctl.h"
#ifdef UAP_SUPPORT
#include "moal_uap.h"
#include "moal_uap_cfg80211.h"
#endif
#include <linux/sort.h>
@ -283,13 +283,6 @@ static int woal_cfg80211_disassociate(struct wiphy *wiphy,
struct cfg80211_disassoc_request *req);
#endif
#ifdef UAP_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
int woal_cfg80211_set_radar_background(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef);
#endif
#endif
/** cfg80211 operations */
static struct cfg80211_ops woal_cfg80211_ops = {
.change_virtual_intf = woal_cfg80211_change_virtual_intf,
@ -2165,7 +2158,7 @@ static int woal_cfg80211_auth_scan(moal_private *priv,
* @return MLAN_STATUS_SUCCESS/MLAN_STATUS_PENDING
* -- success, otherwise fail
*/
mlan_status woal_request_set_host_mlme(moal_private *priv)
static mlan_status woal_request_set_host_mlme(moal_private *priv)
{
mlan_ioctl_req *req = NULL;
mlan_ds_bss *bss = NULL;
@ -3848,7 +3841,7 @@ static int compare(const void *lhs, const void *rhs)
*
* @return N/A
*/
t_u32 woal_get_chan_rule_flags(mlan_ds_custom_reg_domain *custom_reg,
static t_u32 woal_get_chan_rule_flags(mlan_ds_custom_reg_domain *custom_reg,
t_u8 channel)
{
t_u16 num_chan = 0;
@ -4424,7 +4417,7 @@ static t_u8 woal_is_uap_scan_result_expired(moal_private *priv)
*
* @return MTRUE/MFALSE;
*/
t_u8 wlan_check_scan_table_ageout(moal_private *priv)
static t_u8 wlan_check_scan_table_ageout(moal_private *priv)
{
mlan_scan_resp scan_resp;
wifi_timeval t;

View file

@ -2221,7 +2221,7 @@ static int woal_uap_get_dfs_chan(t_u8 pri_chan, t_u8 bw,
*
* @return N/A
*/
void woal_set_channel_dfs_state(t_u8 channel, t_u8 dfs_state)
static void woal_set_channel_dfs_state(t_u8 channel, t_u8 dfs_state)
{
int index;
mlan_ds_11h_chan_dfs_state ch_dfs_state;

View file

@ -27,4 +27,11 @@
mlan_status woal_register_uap_cfg80211(struct net_device *dev, t_u8 bss_type);
#ifdef UAP_CFG80211
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
int woal_cfg80211_set_radar_background(struct wiphy *wiphy,
struct cfg80211_chan_def *chandef);
#endif
#endif
#endif /* _MOAL_UAP_CFG80211_H_ */