[PATCH 14/31] staging: wfx: prefix functions from hif_*.h with wfx_
From: Jerome Pouiller
Date: Thu Jan 13 2022 - 03:56:43 EST
From: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>
All the functions related to a driver should use the same prefix.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>
---
drivers/staging/wfx/data_tx.c | 2 +-
drivers/staging/wfx/debug.c | 2 +-
drivers/staging/wfx/hif_rx.c | 103 +++++++++---------
drivers/staging/wfx/hif_tx.c | 48 +++++----
drivers/staging/wfx/hif_tx.h | 48 ++++-----
drivers/staging/wfx/hif_tx_mib.c | 177 ++++++++++++++++---------------
drivers/staging/wfx/hif_tx_mib.h | 67 ++++++------
drivers/staging/wfx/key.c | 4 +-
drivers/staging/wfx/main.c | 12 +--
drivers/staging/wfx/scan.c | 10 +-
drivers/staging/wfx/sta.c | 92 ++++++++--------
11 files changed, 291 insertions(+), 274 deletions(-)
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c
index 9ff9cca5eb66..54ff9bca78d6 100644
--- a/drivers/staging/wfx/data_tx.c
+++ b/drivers/staging/wfx/data_tx.c
@@ -173,7 +173,7 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif)
policies[i].uploaded = true;
memcpy(tmp_rates, policies[i].rates, sizeof(tmp_rates));
spin_unlock_bh(&wvif->tx_policy_cache.lock);
- hif_set_tx_rate_retry_policy(wvif, i, tmp_rates);
+ wfx_hif_set_tx_rate_retry_policy(wvif, i, tmp_rates);
} else {
spin_unlock_bh(&wvif->tx_policy_cache.lock);
}
diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c
index 9f93268a3202..e5f940f19bbe 100644
--- a/drivers/staging/wfx/debug.c
+++ b/drivers/staging/wfx/debug.c
@@ -66,7 +66,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v)
struct hif_mib_extended_count_table counters[3];
for (i = 0; i < ARRAY_SIZE(counters); i++) {
- ret = hif_get_counters_table(wdev, i, counters + i);
+ ret = wfx_hif_get_counters_table(wdev, i, counters + i);
if (ret < 0)
return ret;
if (ret > 0)
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
index ea6d192ce28c..7a2a32e3ceb9 100644
--- a/drivers/staging/wfx/hif_rx.c
+++ b/drivers/staging/wfx/hif_rx.c
@@ -16,8 +16,8 @@
#include "data_rx.h"
#include "hif_api_cmd.h"
-static int hif_generic_confirm(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_generic_confirm(struct wfx_dev *wdev,
+ const struct hif_msg *hif, const void *buf)
{
/* All confirm messages start with status */
int status = le32_to_cpup((__le32 *)buf);
@@ -50,8 +50,8 @@ static int hif_generic_confirm(struct wfx_dev *wdev,
return status;
}
-static int hif_tx_confirm(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_tx_confirm(struct wfx_dev *wdev,
+ const struct hif_msg *hif, const void *buf)
{
const struct hif_cnf_tx *body = buf;
@@ -59,8 +59,8 @@ static int hif_tx_confirm(struct wfx_dev *wdev,
return 0;
}
-static int hif_multi_tx_confirm(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_multi_tx_confirm(struct wfx_dev *wdev,
+ const struct hif_msg *hif, const void *buf)
{
const struct hif_cnf_multi_transmit *body = buf;
int i;
@@ -71,8 +71,9 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev,
return 0;
}
-static int hif_startup_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_startup_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
const struct hif_ind_startup *body = buf;
@@ -85,8 +86,8 @@ static int hif_startup_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_wakeup_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_wakeup_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif, const void *buf)
{
if (!wdev->pdata.gpio_wakeup ||
gpiod_get_value(wdev->pdata.gpio_wakeup) == 0) {
@@ -96,9 +97,9 @@ static int hif_wakeup_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_receive_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif,
- const void *buf, struct sk_buff *skb)
+static int wfx_hif_receive_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf, struct sk_buff *skb)
{
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
const struct hif_ind_rx *body = buf;
@@ -114,8 +115,8 @@ static int hif_receive_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_event_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_event_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif, const void *buf)
{
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
const struct hif_ind_event *body = buf;
@@ -149,9 +150,9 @@ static int hif_event_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_pm_mode_complete_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif,
- const void *buf)
+static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
@@ -164,9 +165,9 @@ static int hif_pm_mode_complete_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_scan_complete_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif,
- const void *buf)
+static int wfx_hif_scan_complete_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
const struct hif_ind_scan_cmpl *body = buf;
@@ -181,9 +182,9 @@ static int hif_scan_complete_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_join_complete_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif,
- const void *buf)
+static int wfx_hif_join_complete_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
@@ -196,9 +197,9 @@ static int hif_join_complete_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_suspend_resume_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif,
- const void *buf)
+static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
const struct hif_ind_suspend_resume_tx *body = buf;
struct wfx_vif *wvif;
@@ -225,8 +226,9 @@ static int hif_suspend_resume_indication(struct wfx_dev *wdev,
return 0;
}
-static int hif_generic_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_generic_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
const struct hif_ind_generic *body = buf;
int type = le32_to_cpu(body->type);
@@ -305,8 +307,8 @@ static const struct {
"secure link params (nonce or tag) mismatch" },
};
-static int hif_error_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_error_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif, const void *buf)
{
const struct hif_ind_error *body = buf;
int type = le32_to_cpu(body->type);
@@ -332,8 +334,9 @@ static int hif_error_indication(struct wfx_dev *wdev,
return 0;
};
-static int hif_exception_indication(struct wfx_dev *wdev,
- const struct hif_msg *hif, const void *buf)
+static int wfx_hif_exception_indication(struct wfx_dev *wdev,
+ const struct hif_msg *hif,
+ const void *buf)
{
const struct hif_ind_exception *body = buf;
int type = le32_to_cpu(body->type);
@@ -356,21 +359,21 @@ static const struct {
const struct hif_msg *hif, const void *buf);
} hif_handlers[] = {
/* Confirmations */
- { HIF_CNF_ID_TX, hif_tx_confirm },
- { HIF_CNF_ID_MULTI_TRANSMIT, hif_multi_tx_confirm },
+ { HIF_CNF_ID_TX, wfx_hif_tx_confirm },
+ { HIF_CNF_ID_MULTI_TRANSMIT, wfx_hif_multi_tx_confirm },
/* Indications */
- { HIF_IND_ID_STARTUP, hif_startup_indication },
- { HIF_IND_ID_WAKEUP, hif_wakeup_indication },
- { HIF_IND_ID_JOIN_COMPLETE, hif_join_complete_indication },
- { HIF_IND_ID_SET_PM_MODE_CMPL, hif_pm_mode_complete_indication },
- { HIF_IND_ID_SCAN_CMPL, hif_scan_complete_indication },
- { HIF_IND_ID_SUSPEND_RESUME_TX, hif_suspend_resume_indication },
- { HIF_IND_ID_EVENT, hif_event_indication },
- { HIF_IND_ID_GENERIC, hif_generic_indication },
- { HIF_IND_ID_ERROR, hif_error_indication },
- { HIF_IND_ID_EXCEPTION, hif_exception_indication },
- /* FIXME: allocate skb_p from hif_receive_indication and make it generic */
- //{ HIF_IND_ID_RX, hif_receive_indication },
+ { HIF_IND_ID_STARTUP, wfx_hif_startup_indication },
+ { HIF_IND_ID_WAKEUP, wfx_hif_wakeup_indication },
+ { HIF_IND_ID_JOIN_COMPLETE, wfx_hif_join_complete_indication },
+ { HIF_IND_ID_SET_PM_MODE_CMPL, wfx_hif_pm_mode_complete_indication },
+ { HIF_IND_ID_SCAN_CMPL, wfx_hif_scan_complete_indication },
+ { HIF_IND_ID_SUSPEND_RESUME_TX, wfx_hif_suspend_resume_indication },
+ { HIF_IND_ID_EVENT, wfx_hif_event_indication },
+ { HIF_IND_ID_GENERIC, wfx_hif_generic_indication },
+ { HIF_IND_ID_ERROR, wfx_hif_error_indication },
+ { HIF_IND_ID_EXCEPTION, wfx_hif_exception_indication },
+ /* FIXME: allocate skb_p from wfx_hif_receive_indication and make it generic */
+ //{ HIF_IND_ID_RX, wfx_hif_receive_indication },
};
void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb)
@@ -380,8 +383,8 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb)
int hif_id = hif->id;
if (hif_id == HIF_IND_ID_RX) {
- /* hif_receive_indication take care of skb lifetime */
- hif_receive_indication(wdev, hif, hif->body, skb);
+ /* wfx_hif_receive_indication take care of skb lifetime */
+ wfx_hif_receive_indication(wdev, hif, hif->body, skb);
return;
}
/* Note: mutex_is_lock cause an implicit memory barrier that protect
@@ -390,7 +393,7 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb)
if (mutex_is_locked(&wdev->hif_cmd.lock) &&
wdev->hif_cmd.buf_send &&
wdev->hif_cmd.buf_send->id == hif_id) {
- hif_generic_confirm(wdev, hif, hif->body);
+ wfx_hif_generic_confirm(wdev, hif, hif->body);
goto free;
}
for (i = 0; i < ARRAY_SIZE(hif_handlers); i++) {
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 2fd8bbd36e25..7c9d3d86c22e 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -122,7 +122,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request,
/* This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any
* request anymore. Obviously, only call this function during device unregister.
*/
-int hif_shutdown(struct wfx_dev *wdev)
+int wfx_hif_shutdown(struct wfx_dev *wdev)
{
int ret;
struct hif_msg *hif;
@@ -140,7 +140,7 @@ int hif_shutdown(struct wfx_dev *wdev)
return ret;
}
-int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len)
+int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len)
{
int ret;
size_t buf_len = sizeof(struct hif_req_configuration) + len;
@@ -157,7 +157,7 @@ int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len)
return ret;
}
-int hif_reset(struct wfx_vif *wvif, bool reset_stat)
+int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat)
{
int ret;
struct hif_msg *hif;
@@ -172,8 +172,8 @@ int hif_reset(struct wfx_vif *wvif, bool reset_stat)
return ret;
}
-int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
- void *val, size_t val_len)
+int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
+ void *val, size_t val_len)
{
int ret;
struct hif_msg *hif;
@@ -208,8 +208,8 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
return ret;
}
-int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
- void *val, size_t val_len)
+int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
+ void *val, size_t val_len)
{
int ret;
struct hif_msg *hif;
@@ -227,8 +227,8 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
return ret;
}
-int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
- int chan_start_idx, int chan_num)
+int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
+ int chan_start_idx, int chan_num)
{
int ret, i;
struct hif_msg *hif;
@@ -276,7 +276,7 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
return ret;
}
-int hif_stop_scan(struct wfx_vif *wvif)
+int wfx_hif_stop_scan(struct wfx_vif *wvif)
{
int ret;
struct hif_msg *hif;
@@ -291,8 +291,8 @@ int hif_stop_scan(struct wfx_vif *wvif)
return ret;
}
-int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
- struct ieee80211_channel *channel, const u8 *ssid, int ssidlen)
+int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
+ struct ieee80211_channel *channel, const u8 *ssid, int ssidlen)
{
int ret;
struct hif_msg *hif;
@@ -322,7 +322,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
return ret;
}
-int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count)
+int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count)
{
int ret;
struct hif_msg *hif;
@@ -340,7 +340,7 @@ int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count)
return ret;
}
-int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg)
+int wfx_hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg)
{
int ret;
struct hif_msg *hif;
@@ -364,7 +364,7 @@ int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg)
return ret;
}
-int hif_remove_key(struct wfx_dev *wdev, int idx)
+int wfx_hif_remove_key(struct wfx_dev *wdev, int idx)
{
int ret;
struct hif_msg *hif;
@@ -379,8 +379,8 @@ int hif_remove_key(struct wfx_dev *wdev, int idx)
return ret;
}
-int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
- const struct ieee80211_tx_queue_params *arg)
+int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
+ const struct ieee80211_tx_queue_params *arg)
{
int ret;
struct hif_msg *hif;
@@ -410,7 +410,7 @@ int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
return ret;
}
-int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout)
+int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout)
{
int ret;
struct hif_msg *hif;
@@ -434,8 +434,8 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout)
return ret;
}
-int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
- const struct ieee80211_channel *channel)
+int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
+ const struct ieee80211_channel *channel)
{
int ret;
struct hif_msg *hif;
@@ -458,7 +458,7 @@ int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
return ret;
}
-int hif_beacon_transmit(struct wfx_vif *wvif, bool enable)
+int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable)
{
int ret;
struct hif_msg *hif;
@@ -475,7 +475,8 @@ int hif_beacon_transmit(struct wfx_vif *wvif, bool enable)
return ret;
}
-int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp)
+int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id,
+ bool mfp)
{
int ret;
struct hif_msg *hif;
@@ -494,7 +495,8 @@ int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, boo
return ret;
}
-int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len)
+int wfx_hif_update_ie_beacon(struct wfx_vif *wvif,
+ const u8 *ies, size_t ies_len)
{
int ret;
struct hif_msg *hif;
diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h
index f7895845686f..b28a2ee5350a 100644
--- a/drivers/staging/wfx/hif_tx.h
+++ b/drivers/staging/wfx/hif_tx.h
@@ -36,29 +36,29 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd);
int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request,
void *reply, size_t reply_len, bool async);
-int hif_shutdown(struct wfx_dev *wdev);
-int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len);
-int hif_reset(struct wfx_vif *wvif, bool reset_stat);
-int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
- void *buf, size_t buf_size);
-int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
- void *buf, size_t buf_size);
-int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211,
- int chan_start, int chan_num);
-int hif_stop_scan(struct wfx_vif *wvif);
-int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
- struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
-int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout);
-int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count);
-int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg);
-int hif_remove_key(struct wfx_dev *wdev, int idx);
-int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
- const struct ieee80211_tx_queue_params *arg);
-int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
- const struct ieee80211_channel *channel);
-int hif_beacon_transmit(struct wfx_vif *wvif, bool enable);
-int hif_map_link(struct wfx_vif *wvif,
- bool unmap, u8 *mac_addr, int sta_id, bool mfp);
-int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len);
+int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
+ void *buf, size_t buf_size);
+int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
+ void *buf, size_t buf_size);
+int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
+ const struct ieee80211_channel *channel);
+int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat);
+int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
+ struct ieee80211_channel *channel, const u8 *ssid, int ssidlen);
+int wfx_hif_map_link(struct wfx_vif *wvif,
+ bool unmap, u8 *mac_addr, int sta_id, bool mfp);
+int wfx_hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg);
+int wfx_hif_remove_key(struct wfx_dev *wdev, int idx);
+int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout);
+int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count);
+int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
+ const struct ieee80211_tx_queue_params *arg);
+int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable);
+int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len);
+int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211,
+ int chan_start, int chan_num);
+int wfx_hif_stop_scan(struct wfx_vif *wvif);
+int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len);
+int wfx_hif_shutdown(struct wfx_dev *wdev);
#endif
diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c
index 97e961e6bcf6..b79ffdf6fcd2 100644
--- a/drivers/staging/wfx/hif_tx_mib.c
+++ b/drivers/staging/wfx/hif_tx_mib.c
@@ -14,20 +14,20 @@
#include "hif_tx_mib.h"
#include "hif_api_mib.h"
-int hif_set_output_power(struct wfx_vif *wvif, int val)
+int wfx_hif_set_output_power(struct wfx_vif *wvif, int val)
{
struct hif_mib_current_tx_power_level arg = {
.power_level = cpu_to_le32(val * 10),
};
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_CURRENT_TX_POWER_LEVEL,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_CURRENT_TX_POWER_LEVEL,
+ &arg, sizeof(arg));
}
-int hif_set_beacon_wakeup_period(struct wfx_vif *wvif,
- unsigned int dtim_interval,
- unsigned int listen_interval)
+int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif,
+ unsigned int dtim_interval,
+ unsigned int listen_interval)
{
struct hif_mib_beacon_wake_up_period arg = {
.wakeup_period_min = dtim_interval,
@@ -37,13 +37,13 @@ int hif_set_beacon_wakeup_period(struct wfx_vif *wvif,
if (dtim_interval > 0xFF || listen_interval > 0xFFFF)
return -EINVAL;
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_BEACON_WAKEUP_PERIOD,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_BEACON_WAKEUP_PERIOD,
+ &arg, sizeof(arg));
}
-int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif,
- int rssi_thold, int rssi_hyst)
+int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif,
+ int rssi_thold, int rssi_hyst)
{
struct hif_mib_rcpi_rssi_threshold arg = {
.rolling_average_count = 8,
@@ -60,37 +60,39 @@ int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif,
arg.lower_threshold = (arg.lower_threshold + 110) * 2;
}
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_RCPI_RSSI_THRESHOLD, &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_RCPI_RSSI_THRESHOLD,
+ &arg, sizeof(arg));
}
-int hif_get_counters_table(struct wfx_dev *wdev, int vif_id,
- struct hif_mib_extended_count_table *arg)
+int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id,
+ struct hif_mib_extended_count_table *arg)
{
if (wfx_api_older_than(wdev, 1, 3)) {
/* extended_count_table is wider than count_table */
memset(arg, 0xFF, sizeof(*arg));
- return hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE,
+ return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE,
arg, sizeof(struct hif_mib_count_table));
} else {
- return hif_read_mib(wdev, vif_id,
+ return wfx_hif_read_mib(wdev, vif_id,
HIF_MIB_ID_EXTENDED_COUNTERS_TABLE, arg,
sizeof(struct hif_mib_extended_count_table));
}
}
-int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac)
+int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac)
{
struct hif_mib_mac_address arg = { };
if (mac)
ether_addr_copy(arg.mac_addr, mac);
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_MAC_ADDRESS,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_DOT11_MAC_ADDRESS,
+ &arg, sizeof(arg));
}
-int hif_set_rx_filter(struct wfx_vif *wvif,
- bool filter_bssid, bool filter_prbreq)
+int wfx_hif_set_rx_filter(struct wfx_vif *wvif,
+ bool filter_bssid, bool filter_prbreq)
{
struct hif_mib_rx_filter arg = { };
@@ -98,12 +100,12 @@ int hif_set_rx_filter(struct wfx_vif *wvif,
arg.bssid_filter = 1;
if (!filter_prbreq)
arg.fwd_probe_req = 1;
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER,
+ &arg, sizeof(arg));
}
-int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
- const struct hif_ie_table_entry *tbl)
+int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
+ const struct hif_ie_table_entry *tbl)
{
int ret;
struct hif_mib_bcn_filter_table *arg;
@@ -114,37 +116,38 @@ int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
return -ENOMEM;
arg->num_of_info_elmts = cpu_to_le32(tbl_len);
memcpy(arg->ie_table, tbl, flex_array_size(arg, ie_table, tbl_len));
- ret = hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len);
+ ret = wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len);
kfree(arg);
return ret;
}
-int hif_beacon_filter_control(struct wfx_vif *wvif,
- int enable, int beacon_count)
+int wfx_hif_beacon_filter_control(struct wfx_vif *wvif,
+ int enable, int beacon_count)
{
struct hif_mib_bcn_filter_enable arg = {
.enable = cpu_to_le32(enable),
.bcn_count = cpu_to_le32(beacon_count),
};
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_BEACON_FILTER_ENABLE,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_BEACON_FILTER_ENABLE,
+ &arg, sizeof(arg));
}
-int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode)
+int wfx_hif_set_operational_mode(struct wfx_dev *wdev,
+ enum hif_op_power_mode mode)
{
struct hif_mib_gl_operational_power_mode arg = {
.power_mode = mode,
.wup_ind_activation = 1,
};
- return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE,
+ &arg, sizeof(arg));
}
-int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb,
- u8 frame_type, int init_rate)
+int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb,
+ u8 frame_type, int init_rate)
{
struct hif_mib_template_frame *arg;
@@ -155,11 +158,11 @@ int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb,
arg->init_rate = init_rate;
arg->frame_type = frame_type;
arg->frame_length = cpu_to_le16(skb->len);
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_TEMPLATE_FRAME,
- arg, sizeof(*arg) + skb->len);
+ return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_TEMPLATE_FRAME,
+ arg, sizeof(*arg) + skb->len);
}
-int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required)
+int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required)
{
struct hif_mib_protected_mgmt_policy arg = { };
@@ -170,25 +173,26 @@ int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required)
}
if (!required)
arg.unpmf_allowed = 1;
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_PROTECTED_MGMT_POLICY,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_PROTECTED_MGMT_POLICY,
+ &arg, sizeof(arg));
}
-int hif_set_block_ack_policy(struct wfx_vif *wvif,
- u8 tx_tid_policy, u8 rx_tid_policy)
+int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif,
+ u8 tx_tid_policy, u8 rx_tid_policy)
{
struct hif_mib_block_ack_policy arg = {
.block_ack_tx_tid_policy = tx_tid_policy,
.block_ack_rx_tid_policy = rx_tid_policy,
};
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BLOCK_ACK_POLICY,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_BLOCK_ACK_POLICY,
+ &arg, sizeof(arg));
}
-int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density,
- bool greenfield, bool short_preamble)
+int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density,
+ bool greenfield, bool short_preamble)
{
struct hif_mib_set_association_mode arg = {
.preambtype_use = 1,
@@ -199,12 +203,13 @@ int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density,
.mpdu_start_spacing = ampdu_density,
};
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_SET_ASSOCIATION_MODE, &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_SET_ASSOCIATION_MODE,
+ &arg, sizeof(arg));
}
-int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif,
- int policy_index, u8 *rates)
+int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif,
+ int policy_index, u8 *rates)
{
struct hif_mib_set_tx_rate_retry_policy *arg;
size_t size = struct_size(arg, tx_rate_retry_policy, 1);
@@ -222,23 +227,25 @@ int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif,
arg->tx_rate_retry_policy[0].count_init = 1;
memcpy(&arg->tx_rate_retry_policy[0].rates, rates,
sizeof(arg->tx_rate_retry_policy[0].rates));
- ret = hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, arg, size);
+ ret = wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY,
+ arg, size);
kfree(arg);
return ret;
}
-int hif_keep_alive_period(struct wfx_vif *wvif, int period)
+int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period)
{
struct hif_mib_keep_alive_period arg = {
.keep_alive_period = cpu_to_le16(period),
};
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_KEEP_ALIVE_PERIOD,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_KEEP_ALIVE_PERIOD,
+ &arg, sizeof(arg));
};
-int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr)
+int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr)
{
struct hif_mib_arp_ip_addr_table arg = {
.condition_idx = idx,
@@ -250,22 +257,22 @@ int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr)
memcpy(arg.ipv4_address, addr, sizeof(arg.ipv4_address));
arg.arp_enable = HIF_ARP_NS_FILTERING_ENABLE;
}
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE,
+ &arg, sizeof(arg));
}
-int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable)
+int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable)
{
struct hif_mib_gl_set_multi_msg arg = {
.enable_multi_tx_conf = enable,
};
- return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG,
+ &arg, sizeof(arg));
}
-int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val)
+int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val)
{
struct hif_mib_set_uapsd_information arg = { };
@@ -277,48 +284,50 @@ int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val)
arg.trig_be = 1;
if (val & BIT(IEEE80211_AC_BK))
arg.trig_bckgrnd = 1;
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_SET_UAPSD_INFORMATION,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_SET_UAPSD_INFORMATION,
+ &arg, sizeof(arg));
}
-int hif_erp_use_protection(struct wfx_vif *wvif, bool enable)
+int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable)
{
struct hif_mib_non_erp_protection arg = {
.use_cts_to_self = enable,
};
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_NON_ERP_PROTECTION, &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_NON_ERP_PROTECTION,
+ &arg, sizeof(arg));
}
-int hif_slot_time(struct wfx_vif *wvif, int val)
+int wfx_hif_slot_time(struct wfx_vif *wvif, int val)
{
struct hif_mib_slot_time arg = {
.slot_time = cpu_to_le32(val),
};
- return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME,
+ &arg, sizeof(arg));
}
-int hif_wep_default_key_id(struct wfx_vif *wvif, int val)
+int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val)
{
struct hif_mib_wep_default_key_id arg = {
.wep_default_key_id = val,
};
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID,
- &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID,
+ &arg, sizeof(arg));
}
-int hif_rts_threshold(struct wfx_vif *wvif, int val)
+int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val)
{
struct hif_mib_dot11_rts_threshold arg = {
.threshold = cpu_to_le32(val >= 0 ? val : 0xFFFF),
};
- return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_DOT11_RTS_THRESHOLD, &arg, sizeof(arg));
+ return wfx_hif_write_mib(wvif->wdev, wvif->id,
+ HIF_MIB_ID_DOT11_RTS_THRESHOLD,
+ &arg, sizeof(arg));
}
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h
index fe08a69412ab..9b4c16ad5ecf 100644
--- a/drivers/staging/wfx/hif_tx_mib.h
+++ b/drivers/staging/wfx/hif_tx_mib.h
@@ -17,38 +17,39 @@ struct wfx_dev;
struct hif_ie_table_entry;
struct hif_mib_extended_count_table;
-int hif_set_output_power(struct wfx_vif *wvif, int val);
-int hif_set_beacon_wakeup_period(struct wfx_vif *wvif,
- unsigned int dtim_interval,
- unsigned int listen_interval);
-int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif,
- int rssi_thold, int rssi_hyst);
-int hif_get_counters_table(struct wfx_dev *wdev, int vif_id,
- struct hif_mib_extended_count_table *arg);
-int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac);
-int hif_set_rx_filter(struct wfx_vif *wvif,
- bool filter_bssid, bool fwd_probe_req);
-int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
- const struct hif_ie_table_entry *tbl);
-int hif_beacon_filter_control(struct wfx_vif *wvif,
- int enable, int beacon_count);
-int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode);
-int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb,
- u8 frame_type, int init_rate);
-int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required);
-int hif_set_block_ack_policy(struct wfx_vif *wvif,
- u8 tx_tid_policy, u8 rx_tid_policy);
-int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density,
- bool greenfield, bool short_preamble);
-int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif,
- int policy_index, u8 *rates);
-int hif_keep_alive_period(struct wfx_vif *wvif, int period);
-int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr);
-int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable);
-int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val);
-int hif_erp_use_protection(struct wfx_vif *wvif, bool enable);
-int hif_slot_time(struct wfx_vif *wvif, int val);
-int hif_wep_default_key_id(struct wfx_vif *wvif, int val);
-int hif_rts_threshold(struct wfx_vif *wvif, int val);
+int wfx_hif_set_output_power(struct wfx_vif *wvif, int val);
+int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif,
+ unsigned int dtim_interval,
+ unsigned int listen_interval);
+int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif,
+ int rssi_thold, int rssi_hyst);
+int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id,
+ struct hif_mib_extended_count_table *arg);
+int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac);
+int wfx_hif_set_rx_filter(struct wfx_vif *wvif,
+ bool filter_bssid, bool fwd_probe_req);
+int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
+ const struct hif_ie_table_entry *tbl);
+int wfx_hif_beacon_filter_control(struct wfx_vif *wvif,
+ int enable, int beacon_count);
+int wfx_hif_set_operational_mode(struct wfx_dev *wdev,
+ enum hif_op_power_mode mode);
+int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb,
+ u8 frame_type, int init_rate);
+int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required);
+int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif,
+ u8 tx_tid_policy, u8 rx_tid_policy);
+int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density,
+ bool greenfield, bool short_preamble);
+int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif,
+ int policy_index, u8 *rates);
+int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period);
+int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr);
+int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable);
+int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val);
+int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable);
+int wfx_hif_slot_time(struct wfx_vif *wvif, int val);
+int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val);
+int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val);
#endif
diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c
index 65134a174683..6069be161154 100644
--- a/drivers/staging/wfx/key.c
+++ b/drivers/staging/wfx/key.c
@@ -205,7 +205,7 @@ static int wfx_add_key(struct wfx_vif *wvif, struct ieee80211_sta *sta,
wfx_free_key(wdev, idx);
return -EOPNOTSUPP;
}
- ret = hif_add_key(wdev, &k);
+ ret = wfx_hif_add_key(wdev, &k);
if (ret) {
wfx_free_key(wdev, idx);
return -EOPNOTSUPP;
@@ -220,7 +220,7 @@ static int wfx_remove_key(struct wfx_vif *wvif, struct ieee80211_key_conf *key)
{
WARN(key->hw_key_idx >= MAX_KEY_ENTRIES, "corrupted hw_key_idx");
wfx_free_key(wvif->wdev, key->hw_key_idx);
- return hif_remove_key(wvif->wdev, key->hw_key_idx);
+ return wfx_hif_remove_key(wvif->wdev, key->hw_key_idx);
}
int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index ddc95ea16b6d..abc1a6d43300 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -201,8 +201,8 @@ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len)
buf[i] = 0;
dev_dbg(wdev->dev, "send PDS '%s}'\n", buf + start);
buf[i] = '}';
- ret = hif_configuration(wdev, buf + start,
- i - start + 1);
+ ret = wfx_hif_configuration(wdev, buf + start,
+ i - start + 1);
if (ret > 0) {
dev_err(wdev->dev, "PDS bytes %d to %d: invalid data (unsupported options?)\n",
start, i);
@@ -418,7 +418,7 @@ int wfx_probe(struct wfx_dev *wdev)
if (err)
goto err0;
- err = hif_use_multi_tx_conf(wdev, true);
+ err = wfx_hif_use_multi_tx_conf(wdev, true);
if (err)
dev_err(wdev->dev, "misconfigured IRQ?\n");
@@ -429,9 +429,9 @@ int wfx_probe(struct wfx_dev *wdev)
wdev->pdata.file_pds);
gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 1);
control_reg_write(wdev, 0);
- hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT);
+ wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT);
} else {
- hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE);
+ wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE);
}
for (i = 0; i < ARRAY_SIZE(wdev->addresses); i++) {
@@ -478,7 +478,7 @@ int wfx_probe(struct wfx_dev *wdev)
void wfx_release(struct wfx_dev *wdev)
{
ieee80211_unregister_hw(wdev->hw);
- hif_shutdown(wdev);
+ wfx_hif_shutdown(wdev);
wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv);
wfx_bh_unregister(wdev);
}
diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c
index a1fd0f850481..f61c6b2db352 100644
--- a/drivers/staging/wfx/scan.c
+++ b/drivers/staging/wfx/scan.c
@@ -33,7 +33,7 @@ static int update_probe_tmpl(struct wfx_vif *wvif,
return -ENOMEM;
skb_put_data(skb, req->ie, req->ie_len);
- hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBREQ, 0);
+ wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBREQ, 0);
dev_kfree_skb(skb);
return 0;
}
@@ -56,14 +56,14 @@ static int send_scan_req(struct wfx_vif *wvif,
wfx_tx_lock_flush(wvif->wdev);
wvif->scan_abort = false;
reinit_completion(&wvif->scan_complete);
- ret = hif_scan(wvif, req, start_idx, i - start_idx);
+ ret = wfx_hif_scan(wvif, req, start_idx, i - start_idx);
if (ret) {
wfx_tx_unlock(wvif->wdev);
return -EIO;
}
ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ);
if (!ret) {
- hif_stop_scan(wvif);
+ wfx_hif_stop_scan(wvif);
ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ);
dev_dbg(wvif->wdev->dev, "scan timeout (%d channels done)\n",
wvif->scan_nb_chan_done);
@@ -80,7 +80,7 @@ static int send_scan_req(struct wfx_vif *wvif,
ret = wvif->scan_nb_chan_done;
}
if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower)
- hif_set_output_power(wvif, wvif->vif->bss_conf.txpower);
+ wfx_hif_set_output_power(wvif, wvif->vif->bss_conf.txpower);
wfx_tx_unlock(wvif->wdev);
return ret;
}
@@ -139,7 +139,7 @@ void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
wvif->scan_abort = true;
- hif_stop_scan(wvif);
+ wfx_hif_stop_scan(wvif);
}
void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done)
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 23c0425e3929..d384f2df329c 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -89,10 +89,12 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon)
};
if (!filter_beacon) {
- hif_beacon_filter_control(wvif, 0, 1);
+ wfx_hif_beacon_filter_control(wvif, 0, 1);
} else {
- hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), filter_ies);
- hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0);
+ wfx_hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies),
+ filter_ies);
+ wfx_hif_beacon_filter_control(wvif,
+ HIF_BEACON_FILTER_ENABLE, 0);
}
}
@@ -143,7 +145,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
filter_prbreq = false;
else
filter_prbreq = true;
- hif_set_rx_filter(wvif, filter_bssid, filter_prbreq);
+ wfx_hif_set_rx_filter(wvif, filter_bssid, filter_prbreq);
mutex_unlock(&wvif->scan_lock);
}
@@ -210,7 +212,7 @@ int wfx_update_pm(struct wfx_vif *wvif)
TU_TO_JIFFIES(512)))
dev_warn(wvif->wdev->dev,
"timeout while waiting of set_pm_mode_complete\n");
- return hif_set_pm(wvif, ps, ps_timeout);
+ return wfx_hif_set_pm(wvif, ps, ps_timeout);
}
int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -224,10 +226,10 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
mutex_lock(&wdev->conf_mutex);
assign_bit(queue, &wvif->uapsd_mask, params->uapsd);
- hif_set_edca_queue_params(wvif, queue, params);
+ wfx_hif_set_edca_queue_params(wvif, queue, params);
if (wvif->vif->type == NL80211_IFTYPE_STATION &&
old_uapsd != wvif->uapsd_mask) {
- hif_set_uapsd_info(wvif, wvif->uapsd_mask);
+ wfx_hif_set_uapsd_info(wvif, wvif->uapsd_mask);
wfx_update_pm(wvif);
}
mutex_unlock(&wdev->conf_mutex);
@@ -240,7 +242,7 @@ int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
struct wfx_vif *wvif = NULL;
while ((wvif = wvif_iterate(wdev, wvif)) != NULL)
- hif_rts_threshold(wvif, value);
+ wfx_hif_rts_threshold(wvif, value);
return 0;
}
@@ -276,7 +278,7 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw,
{
struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
- hif_wep_default_key_id(wvif, idx);
+ wfx_hif_wep_default_key_id(wvif, idx);
}
void wfx_reset(struct wfx_vif *wvif)
@@ -284,10 +286,10 @@ void wfx_reset(struct wfx_vif *wvif)
struct wfx_dev *wdev = wvif->wdev;
wfx_tx_lock_flush(wdev);
- hif_reset(wvif, false);
+ wfx_hif_reset(wvif, false);
wfx_tx_policy_init(wvif);
if (wvif_count(wdev) <= 1)
- hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
+ wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
wfx_tx_unlock(wdev);
wvif->join_in_progress = false;
cancel_delayed_work_sync(&wvif->beacon_loss_work);
@@ -305,7 +307,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
sta_priv->vif_id = wvif->id;
if (vif->type == NL80211_IFTYPE_STATION)
- hif_set_mfp(wvif, sta->mfp, sta->mfp);
+ wfx_hif_set_mfp(wvif, sta->mfp, sta->mfp);
/* In station mode, the firmware interprets new link-id as a TDLS peer */
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
@@ -314,7 +316,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
wvif->link_id_map |= BIT(sta_priv->link_id);
WARN_ON(!sta_priv->link_id);
WARN_ON(sta_priv->link_id >= HIF_LINK_ID_MAX);
- hif_map_link(wvif, false, sta->addr, sta_priv->link_id, sta->mfp);
+ wfx_hif_map_link(wvif, false, sta->addr, sta_priv->link_id, sta->mfp);
return 0;
}
@@ -329,7 +331,7 @@ int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (!sta_priv->link_id)
return 0;
/* FIXME add a mutex? */
- hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false);
+ wfx_hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false);
wvif->link_id_map &= ~BIT(sta_priv->link_id);
return 0;
}
@@ -341,15 +343,15 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif)
skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif);
if (!skb)
return -ENOMEM;
- hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN,
- API_RATE_INDEX_B_1MBPS);
+ wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN,
+ API_RATE_INDEX_B_1MBPS);
dev_kfree_skb(skb);
skb = ieee80211_proberesp_get(wvif->wdev->hw, wvif->vif);
if (!skb)
return -ENOMEM;
- hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES,
- API_RATE_INDEX_B_1MBPS);
+ wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES,
+ API_RATE_INDEX_B_1MBPS);
dev_kfree_skb(skb);
return 0;
}
@@ -375,7 +377,7 @@ static void wfx_set_mfp_ap(struct wfx_vif *wvif)
ptr += 1 + akm_suite_size * *ptr;
if (WARN_ON(ptr > (u16 *)skb_tail_pointer(skb)))
return;
- hif_set_mfp(wvif, *ptr & BIT(7), *ptr & BIT(6));
+ wfx_hif_set_mfp(wvif, *ptr & BIT(7), *ptr & BIT(6));
}
}
@@ -390,7 +392,7 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
wfx_update_pm(wvif);
wvif = (struct wfx_vif *)vif->drv_priv;
wfx_upload_ap_templates(wvif);
- ret = hif_start(wvif, &vif->bss_conf, wvif->channel);
+ ret = wfx_hif_start(wvif, &vif->bss_conf, wvif->channel);
if (ret > 0)
return -EIO;
wfx_set_mfp_ap(wvif);
@@ -437,7 +439,7 @@ static void wfx_join(struct wfx_vif *wvif)
cfg80211_put_bss(wvif->wdev->hw->wiphy, bss);
wvif->join_in_progress = true;
- ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen);
+ ret = wfx_hif_join(wvif, conf, wvif->channel, ssid, ssidlen);
if (ret) {
ieee80211_connection_loss(wvif->vif);
wfx_reset(wvif);
@@ -470,14 +472,14 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
rcu_read_unlock();
wvif->join_in_progress = false;
- hif_set_association_mode(wvif, ampdu_density, greenfield,
- info->use_short_preamble);
- hif_keep_alive_period(wvif, 0);
+ wfx_hif_set_association_mode(wvif, ampdu_density, greenfield,
+ info->use_short_preamble);
+ wfx_hif_keep_alive_period(wvif, 0);
/* beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use
* the same value.
*/
- hif_set_bss_params(wvif, info->aid, 7);
- hif_set_beacon_wakeup_period(wvif, 1, 1);
+ wfx_hif_set_bss_params(wvif, info->aid, 7);
+ wfx_hif_set_beacon_wakeup_period(wvif, 1, 1);
wfx_update_pm(wvif);
}
@@ -508,7 +510,7 @@ static void wfx_enable_beacon(struct wfx_vif *wvif, bool enable)
wvif->after_dtim_tx_allowed = true;
wfx_bh_request_tx(wvif->wdev);
}
- hif_beacon_transmit(wvif, enable);
+ wfx_hif_beacon_transmit(wvif, enable);
}
void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -541,8 +543,8 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (vif->type != NL80211_IFTYPE_STATION)
dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n",
__func__);
- hif_set_beacon_wakeup_period(wvif, info->dtim_period,
- info->dtim_period);
+ wfx_hif_set_beacon_wakeup_period(wvif, info->dtim_period,
+ info->dtim_period);
/* We temporary forwarded beacon for join process. It is now no
* more necessary.
*/
@@ -557,7 +559,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
arp_addr = NULL;
if (i >= info->arp_addr_cnt)
arp_addr = NULL;
- hif_set_arp_ipv4_filter(wvif, i, arp_addr);
+ wfx_hif_set_arp_ipv4_filter(wvif, i, arp_addr);
}
}
@@ -569,21 +571,21 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
wfx_enable_beacon(wvif, info->enable_beacon);
if (changed & BSS_CHANGED_KEEP_ALIVE)
- hif_keep_alive_period(wvif, info->max_idle_period *
- USEC_PER_TU / USEC_PER_MSEC);
+ wfx_hif_keep_alive_period(wvif, info->max_idle_period *
+ USEC_PER_TU / USEC_PER_MSEC);
if (changed & BSS_CHANGED_ERP_CTS_PROT)
- hif_erp_use_protection(wvif, info->use_cts_prot);
+ wfx_hif_erp_use_protection(wvif, info->use_cts_prot);
if (changed & BSS_CHANGED_ERP_SLOT)
- hif_slot_time(wvif, info->use_short_slot ? 9 : 20);
+ wfx_hif_slot_time(wvif, info->use_short_slot ? 9 : 20);
if (changed & BSS_CHANGED_CQM)
- hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold,
- info->cqm_rssi_hyst);
+ wfx_hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold,
+ info->cqm_rssi_hyst);
if (changed & BSS_CHANGED_TXPOWER)
- hif_set_output_power(wvif, info->txpower);
+ wfx_hif_set_output_power(wvif, info->txpower);
if (changed & BSS_CHANGED_PS)
wfx_update_pm(wvif);
@@ -614,7 +616,7 @@ static int wfx_update_tim(struct wfx_vif *wvif)
tim_ptr[4] &= ~1;
}
- hif_update_ie_beacon(wvif, tim_ptr, tim_length);
+ wfx_hif_update_ie_beacon(wvif, tim_ptr, tim_length);
dev_kfree_skb(skb);
return 0;
@@ -774,7 +776,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
}
WARN(i == ARRAY_SIZE(wdev->vif), "try to instantiate more vif than supported");
- hif_set_macaddr(wvif, vif->addr);
+ wfx_hif_set_macaddr(wvif, vif->addr);
mutex_unlock(&wdev->conf_mutex);
@@ -782,9 +784,9 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
while ((wvif = wvif_iterate(wdev, wvif)) != NULL) {
/* Combo mode does not support Block Acks. We can re-enable them */
if (wvif_count(wdev) == 1)
- hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
+ wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
else
- hif_set_block_ack_policy(wvif, 0x00, 0x00);
+ wfx_hif_set_block_ack_policy(wvif, 0x00, 0x00);
}
return ret;
}
@@ -800,8 +802,8 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
mutex_lock(&wdev->conf_mutex);
WARN(wvif->link_id_map != 1, "corrupted state");
- hif_reset(wvif, false);
- hif_set_macaddr(wvif, NULL);
+ wfx_hif_reset(wvif, false);
+ wfx_hif_set_macaddr(wvif, NULL);
wfx_tx_policy_init(wvif);
cancel_delayed_work_sync(&wvif->beacon_loss_work);
@@ -814,9 +816,9 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
while ((wvif = wvif_iterate(wdev, wvif)) != NULL) {
/* Combo mode does not support Block Acks. We can re-enable them */
if (wvif_count(wdev) == 1)
- hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
+ wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
else
- hif_set_block_ack_policy(wvif, 0x00, 0x00);
+ wfx_hif_set_block_ack_policy(wvif, 0x00, 0x00);
}
}
--
2.34.1