Commit 1c780482 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: prefix functions from hif_*.h with wfx_

All the functions related to a driver should use the same prefix.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220113085524.1110708-15-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eec453df
......@@ -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);
}
......
......@@ -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)
......
......@@ -16,7 +16,7 @@
#include "data_rx.h"
#include "hif_api_cmd.h"
static int hif_generic_confirm(struct wfx_dev *wdev,
static int wfx_hif_generic_confirm(struct wfx_dev *wdev,
const struct hif_msg *hif, const void *buf)
{
/* All confirm messages start with status */
......@@ -50,7 +50,7 @@ static int hif_generic_confirm(struct wfx_dev *wdev,
return status;
}
static int hif_tx_confirm(struct wfx_dev *wdev,
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,7 +59,7 @@ static int hif_tx_confirm(struct wfx_dev *wdev,
return 0;
}
static int hif_multi_tx_confirm(struct wfx_dev *wdev,
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;
......@@ -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,7 +86,7 @@ static int hif_startup_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_wakeup_indication(struct wfx_dev *wdev,
static int wfx_hif_wakeup_indication(struct wfx_dev *wdev,
const struct hif_msg *hif, const void *buf)
{
if (!wdev->pdata.gpio_wakeup ||
......@@ -96,7 +97,7 @@ static int hif_wakeup_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_receive_indication(struct wfx_dev *wdev,
static int wfx_hif_receive_indication(struct wfx_dev *wdev,
const struct hif_msg *hif,
const void *buf, struct sk_buff *skb)
{
......@@ -114,7 +115,7 @@ static int hif_receive_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_event_indication(struct wfx_dev *wdev,
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);
......@@ -149,7 +150,7 @@ static int hif_event_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_pm_mode_complete_indication(struct wfx_dev *wdev,
static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev,
const struct hif_msg *hif,
const void *buf)
{
......@@ -164,7 +165,7 @@ static int hif_pm_mode_complete_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_scan_complete_indication(struct wfx_dev *wdev,
static int wfx_hif_scan_complete_indication(struct wfx_dev *wdev,
const struct hif_msg *hif,
const void *buf)
{
......@@ -181,7 +182,7 @@ static int hif_scan_complete_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_join_complete_indication(struct wfx_dev *wdev,
static int wfx_hif_join_complete_indication(struct wfx_dev *wdev,
const struct hif_msg *hif,
const void *buf)
{
......@@ -196,7 +197,7 @@ static int hif_join_complete_indication(struct wfx_dev *wdev,
return 0;
}
static int hif_suspend_resume_indication(struct wfx_dev *wdev,
static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev,
const struct hif_msg *hif,
const void *buf)
{
......@@ -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,7 +307,7 @@ static const struct {
"secure link params (nonce or tag) mismatch" },
};
static int hif_error_indication(struct wfx_dev *wdev,
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;
......@@ -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++) {
......
......@@ -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,7 +172,7 @@ 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,
int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
void *val, size_t val_len)
{
int ret;
......@@ -208,7 +208,7 @@ 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,
int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id,
void *val, size_t val_len)
{
int ret;
......@@ -227,7 +227,7 @@ 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 wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req,
int chan_start_idx, int chan_num)
{
int ret, i;
......@@ -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,7 +291,7 @@ int hif_stop_scan(struct wfx_vif *wvif)
return ret;
}
int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
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;
......@@ -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,7 +379,7 @@ int hif_remove_key(struct wfx_dev *wdev, int idx)
return ret;
}
int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue,
const struct ieee80211_tx_queue_params *arg)
{
int ret;
......@@ -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,7 +434,7 @@ 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,
int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
const struct ieee80211_channel *channel)
{
int ret;
......@@ -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;
......
......@@ -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,
int wfx_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,
int wfx_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,
int wfx_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,
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 hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len);
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
This diff is collapsed.
......@@ -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,
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 hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif,
int wfx_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,
int wfx_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,
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 hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len,
int wfx_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 wfx_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,
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 hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required);
int hif_set_block_ack_policy(struct wfx_vif *wvif,
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 hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density,
int wfx_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 wfx_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_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
......@@ -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,
......
......@@ -201,7 +201,7 @@ 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,
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",
......@@ -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);
}
......
......@@ -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)
......
......@@ -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,14 +343,14 @@ 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,
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,
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,
wfx_hif_set_association_mode(wvif, ampdu_density, greenfield,
info->use_short_preamble);
hif_keep_alive_period(wvif, 0);
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,7 +543,7 @@ 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,
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 *
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,
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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment