summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwm.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-09-10 09:32:34 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-09-10 09:32:34 +0000
commitd3dadb9522eb7667ac92a3e3c8f2e9a4b51b2d10 (patch)
treeb9294b5d7371df021242cb75b18d83fe8d929455 /sys/dev/pci/if_iwm.c
parent1bb1d0c64cd2f0e197461ca6d6a7033c9083eb81 (diff)
iwm(4) inherited the 'MVM' prefix in many of its symbol names from iwlwifi.
Linux iwlwifi implements support for iwn(4) chips in the 'DVM' driver, and support for iwm(4) chips in the 'MVM' driver. In OpenBSD the 'MVM' prefix is redundant, so we can remove it to shorten many lines and reduce noise: s/iwm_mvm_/iwm_/g
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r--sys/dev/pci/if_iwm.c466
1 files changed, 233 insertions, 233 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index c442f212d5f..879731e730c 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.128 2016/09/10 09:13:09 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.129 2016/09/10 09:32:33 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -266,7 +266,7 @@ void iwm_apm_stop(struct iwm_softc *);
int iwm_allow_mcast(struct iwm_softc *);
int iwm_start_hw(struct iwm_softc *);
void iwm_stop_device(struct iwm_softc *);
-void iwm_mvm_nic_config(struct iwm_softc *);
+void iwm_nic_config(struct iwm_softc *);
int iwm_nic_rx_init(struct iwm_softc *);
int iwm_nic_tx_init(struct iwm_softc *);
int iwm_nic_init(struct iwm_softc *);
@@ -286,11 +286,11 @@ int iwm_send_phy_db_cmd(struct iwm_softc *, uint16_t, uint16_t, void *);
int iwm_phy_db_send_all_channel_groups(struct iwm_softc *,
uint16_t, uint8_t);
int iwm_send_phy_db_data(struct iwm_softc *);
-void iwm_mvm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *,
+void iwm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *,
struct iwm_time_event_cmd_v1 *);
-int iwm_mvm_send_time_event_cmd(struct iwm_softc *,
+int iwm_send_time_event_cmd(struct iwm_softc *,
const struct iwm_time_event_cmd_v2 *);
-void iwm_mvm_protect_session(struct iwm_softc *, struct iwm_node *,
+void iwm_protect_session(struct iwm_softc *, struct iwm_node *,
uint32_t, uint32_t);
int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t,
uint8_t *, uint16_t *);
@@ -305,7 +305,7 @@ int iwm_ampdu_rx_start(struct ieee80211com *,
struct ieee80211_node *, uint8_t);
void iwm_ampdu_rx_stop(struct ieee80211com *,
struct ieee80211_node *, uint8_t);
-void iwm_mvm_sta_rx_agg(struct iwm_softc *, struct ieee80211_node *,
+void iwm_sta_rx_agg(struct iwm_softc *, struct ieee80211_node *,
uint8_t, uint16_t, int);
#ifdef notyet
int iwm_ampdu_tx_start(struct ieee80211com *,
@@ -335,35 +335,35 @@ int iwm_load_firmware(struct iwm_softc *, enum iwm_ucode_type);
int iwm_start_fw(struct iwm_softc *, enum iwm_ucode_type);
int iwm_send_tx_ant_cfg(struct iwm_softc *, uint8_t);
int iwm_send_phy_cfg_cmd(struct iwm_softc *);
-int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *, enum iwm_ucode_type);
+int iwm_load_ucode_wait_alive(struct iwm_softc *, enum iwm_ucode_type);
int iwm_run_init_mvm_ucode(struct iwm_softc *, int);
int iwm_rx_addbuf(struct iwm_softc *, int, int);
-int iwm_mvm_calc_rssi(struct iwm_softc *, struct iwm_rx_phy_info *);
-int iwm_mvm_get_signal_strength(struct iwm_softc *,
+int iwm_calc_rssi(struct iwm_softc *, struct iwm_rx_phy_info *);
+int iwm_get_signal_strength(struct iwm_softc *,
struct iwm_rx_phy_info *);
-void iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *, struct iwm_rx_packet *,
+void iwm_rx_rx_phy_cmd(struct iwm_softc *, struct iwm_rx_packet *,
struct iwm_rx_data *);
-int iwm_get_noise(const struct iwm_mvm_statistics_rx_non_phy *);
-void iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct iwm_rx_packet *,
+int iwm_get_noise(const struct iwm_statistics_rx_non_phy *);
+void iwm_rx_rx_mpdu(struct iwm_softc *, struct iwm_rx_packet *,
struct iwm_rx_data *);
-void iwm_mvm_rx_tx_cmd_single(struct iwm_softc *, struct iwm_rx_packet *,
+void iwm_rx_tx_cmd_single(struct iwm_softc *, struct iwm_rx_packet *,
struct iwm_node *);
-void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *,
+void iwm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *,
struct iwm_rx_data *);
-int iwm_mvm_binding_cmd(struct iwm_softc *, struct iwm_node *, uint32_t);
-void iwm_mvm_phy_ctxt_cmd_hdr(struct iwm_softc *, struct iwm_mvm_phy_ctxt *,
+int iwm_binding_cmd(struct iwm_softc *, struct iwm_node *, uint32_t);
+void iwm_phy_ctxt_cmd_hdr(struct iwm_softc *, struct iwm_phy_ctxt *,
struct iwm_phy_context_cmd *, uint32_t, uint32_t);
-void iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *,
+void iwm_phy_ctxt_cmd_data(struct iwm_softc *,
struct iwm_phy_context_cmd *, struct ieee80211_channel *,
uint8_t, uint8_t);
-int iwm_mvm_phy_ctxt_cmd(struct iwm_softc *, struct iwm_mvm_phy_ctxt *,
+int iwm_phy_ctxt_cmd(struct iwm_softc *, struct iwm_phy_ctxt *,
uint8_t, uint8_t, uint32_t, uint32_t);
int iwm_send_cmd(struct iwm_softc *, struct iwm_host_cmd *);
-int iwm_mvm_send_cmd_pdu(struct iwm_softc *, uint8_t, uint32_t, uint16_t,
+int iwm_send_cmd_pdu(struct iwm_softc *, uint8_t, uint32_t, uint16_t,
const void *);
-int iwm_mvm_send_cmd_status(struct iwm_softc *, struct iwm_host_cmd *,
+int iwm_send_cmd_status(struct iwm_softc *, struct iwm_host_cmd *,
uint32_t *);
-int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *, uint8_t,
+int iwm_send_cmd_pdu_status(struct iwm_softc *, uint8_t,
uint16_t, const void *, uint32_t *);
void iwm_free_resp(struct iwm_softc *, struct iwm_host_cmd *);
void iwm_cmd_done(struct iwm_softc *, struct iwm_rx_packet *);
@@ -371,46 +371,46 @@ void iwm_update_sched(struct iwm_softc *, int, int, uint8_t, uint16_t);
const struct iwm_rate *iwm_tx_fill_cmd(struct iwm_softc *, struct iwm_node *,
struct ieee80211_frame *, struct iwm_tx_cmd *);
int iwm_tx(struct iwm_softc *, struct mbuf *, struct ieee80211_node *, int);
-void iwm_mvm_led_enable(struct iwm_softc *);
-void iwm_mvm_led_disable(struct iwm_softc *);
-int iwm_mvm_led_is_enabled(struct iwm_softc *);
+void iwm_led_enable(struct iwm_softc *);
+void iwm_led_disable(struct iwm_softc *);
+int iwm_led_is_enabled(struct iwm_softc *);
void iwm_led_blink_timeout(void *);
void iwm_led_blink_start(struct iwm_softc *);
void iwm_led_blink_stop(struct iwm_softc *);
-int iwm_mvm_beacon_filter_send_cmd(struct iwm_softc *,
+int iwm_beacon_filter_send_cmd(struct iwm_softc *,
struct iwm_beacon_filter_cmd *);
-void iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *,
+void iwm_beacon_filter_set_cqm_params(struct iwm_softc *,
struct iwm_node *, struct iwm_beacon_filter_cmd *);
-int iwm_mvm_update_beacon_abort(struct iwm_softc *, struct iwm_node *, int);
-void iwm_mvm_power_build_cmd(struct iwm_softc *, struct iwm_node *,
+int iwm_update_beacon_abort(struct iwm_softc *, struct iwm_node *, int);
+void iwm_power_build_cmd(struct iwm_softc *, struct iwm_node *,
struct iwm_mac_power_cmd *);
-int iwm_mvm_power_mac_update_mode(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_power_update_device(struct iwm_softc *);
-int iwm_mvm_enable_beacon_filter(struct iwm_softc *, struct iwm_node *);
-int iwm_mvm_disable_beacon_filter(struct iwm_softc *);
-int iwm_mvm_add_sta_cmd(struct iwm_softc *, struct iwm_node *, int);
-int iwm_mvm_add_int_sta_common(struct iwm_softc *, struct iwm_int_sta *,
+int iwm_power_mac_update_mode(struct iwm_softc *, struct iwm_node *);
+int iwm_power_update_device(struct iwm_softc *);
+int iwm_enable_beacon_filter(struct iwm_softc *, struct iwm_node *);
+int iwm_disable_beacon_filter(struct iwm_softc *);
+int iwm_add_sta_cmd(struct iwm_softc *, struct iwm_node *, int);
+int iwm_add_int_sta_common(struct iwm_softc *, struct iwm_int_sta *,
const uint8_t *, uint16_t, uint16_t);
-int iwm_mvm_add_aux_sta(struct iwm_softc *);
-uint16_t iwm_mvm_scan_rx_chain(struct iwm_softc *);
-uint32_t iwm_mvm_scan_max_out_time(struct iwm_softc *, uint32_t, int);
-uint32_t iwm_mvm_scan_suspend_time(struct iwm_softc *, int);
-uint32_t iwm_mvm_scan_rate_n_flags(struct iwm_softc *, int, int);
-uint16_t iwm_mvm_get_active_dwell(struct iwm_softc *, int, int);
-uint16_t iwm_mvm_get_passive_dwell(struct iwm_softc *, int);
-uint8_t iwm_mvm_lmac_scan_fill_channels(struct iwm_softc *,
+int iwm_add_aux_sta(struct iwm_softc *);
+uint16_t iwm_scan_rx_chain(struct iwm_softc *);
+uint32_t iwm_scan_max_out_time(struct iwm_softc *, uint32_t, int);
+uint32_t iwm_scan_suspend_time(struct iwm_softc *, int);
+uint32_t iwm_scan_rate_n_flags(struct iwm_softc *, int, int);
+uint16_t iwm_get_active_dwell(struct iwm_softc *, int, int);
+uint16_t iwm_get_passive_dwell(struct iwm_softc *, int);
+uint8_t iwm_lmac_scan_fill_channels(struct iwm_softc *,
struct iwm_scan_channel_cfg_lmac *, int);
-int iwm_mvm_fill_probe_req(struct iwm_softc *, struct iwm_scan_probe_req *);
-int iwm_mvm_lmac_scan(struct iwm_softc *);
-int iwm_mvm_config_umac_scan(struct iwm_softc *);
-int iwm_mvm_umac_scan(struct iwm_softc *);
-void iwm_mvm_ack_rates(struct iwm_softc *, struct iwm_node *, int *, int *);
-void iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *, struct iwm_node *,
+int iwm_fill_probe_req(struct iwm_softc *, struct iwm_scan_probe_req *);
+int iwm_lmac_scan(struct iwm_softc *);
+int iwm_config_umac_scan(struct iwm_softc *);
+int iwm_umac_scan(struct iwm_softc *);
+void iwm_ack_rates(struct iwm_softc *, struct iwm_node *, int *, int *);
+void iwm_mac_ctxt_cmd_common(struct iwm_softc *, struct iwm_node *,
struct iwm_mac_ctx_cmd *, uint32_t);
-void iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *, struct iwm_node *,
+void iwm_mac_ctxt_cmd_fill_sta(struct iwm_softc *, struct iwm_node *,
struct iwm_mac_data_sta *, int);
-int iwm_mvm_mac_ctxt_cmd(struct iwm_softc *, struct iwm_node *, uint32_t);
-int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_node *);
+int iwm_mac_ctxt_cmd(struct iwm_softc *, struct iwm_node *, uint32_t);
+int iwm_update_quotas(struct iwm_softc *, struct iwm_node *);
int iwm_auth(struct iwm_softc *);
int iwm_assoc(struct iwm_softc *);
struct ieee80211_node *iwm_node_alloc(struct ieee80211com *);
@@ -420,12 +420,12 @@ int iwm_media_change(struct ifnet *);
void iwm_newstate_task(void *);
int iwm_newstate(struct ieee80211com *, enum ieee80211_state, int);
void iwm_endscan_cb(void *);
-void iwm_mvm_fill_sf_command(struct iwm_softc *, struct iwm_sf_cfg_cmd *,
+void iwm_fill_sf_command(struct iwm_softc *, struct iwm_sf_cfg_cmd *,
struct ieee80211_node *);
-int iwm_mvm_sf_config(struct iwm_softc *, int);
+int iwm_sf_config(struct iwm_softc *, int);
int iwm_send_bt_init_conf(struct iwm_softc *);
int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *);
-void iwm_mvm_tt_tx_backoff(struct iwm_softc *, uint32_t);
+void iwm_tt_tx_backoff(struct iwm_softc *, uint32_t);
int iwm_init_hw(struct iwm_softc *);
int iwm_init(struct ifnet *);
void iwm_start(struct ifnet *);
@@ -1115,7 +1115,7 @@ iwm_alloc_tx_ring(struct iwm_softc *sc, struct iwm_tx_ring *ring, int qid)
* We only use rings 0 through 9 (4 EDCA + cmd) so there is no need
* to allocate commands space for other rings.
*/
- if (qid > IWM_MVM_CMD_QUEUE)
+ if (qid > IWM_CMD_QUEUE)
return 0;
size = IWM_TX_RING_COUNT * sizeof(struct iwm_device_cmd);
@@ -1137,7 +1137,7 @@ iwm_alloc_tx_ring(struct iwm_softc *sc, struct iwm_tx_ring *ring, int qid)
paddr += sizeof(struct iwm_device_cmd);
/* FW commands may require more mapped space than packets. */
- if (qid == IWM_MVM_CMD_QUEUE)
+ if (qid == IWM_CMD_QUEUE)
mapsize = (sizeof(struct iwm_cmd_header) +
IWM_MAX_CMD_PAYLOAD_SIZE);
else
@@ -1562,7 +1562,7 @@ iwm_stop_device(struct iwm_softc *sc)
}
void
-iwm_mvm_nic_config(struct iwm_softc *sc)
+iwm_nic_config(struct iwm_softc *sc)
{
uint8_t radio_cfg_type, radio_cfg_step, radio_cfg_dash;
uint32_t reg_val = 0;
@@ -1686,7 +1686,7 @@ iwm_nic_init(struct iwm_softc *sc)
IWM_APMG_PS_CTRL_VAL_PWR_SRC_VMAIN,
~IWM_APMG_PS_CTRL_MSK_PWR_SRC);
- iwm_mvm_nic_config(sc);
+ iwm_nic_config(sc);
err = iwm_nic_rx_init(sc);
if (err)
@@ -1701,11 +1701,11 @@ iwm_nic_init(struct iwm_softc *sc)
return 0;
}
-const uint8_t iwm_mvm_ac_to_tx_fifo[] = {
- IWM_MVM_TX_FIFO_VO,
- IWM_MVM_TX_FIFO_VI,
- IWM_MVM_TX_FIFO_BE,
- IWM_MVM_TX_FIFO_BK,
+const uint8_t iwm_ac_to_tx_fifo[] = {
+ IWM_TX_FIFO_VO,
+ IWM_TX_FIFO_VI,
+ IWM_TX_FIFO_BE,
+ IWM_TX_FIFO_BK,
};
int
@@ -1716,7 +1716,7 @@ iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo)
IWM_WRITE(sc, IWM_HBUS_TARG_WRPTR, qid << 8 | 0);
- if (qid == IWM_MVM_CMD_QUEUE) {
+ if (qid == IWM_CMD_QUEUE) {
iwm_write_prph(sc, IWM_SCD_QUEUE_STATUS_BITS(qid),
(0 << IWM_SCD_QUEUE_STTS_REG_POS_ACTIVE)
| (1 << IWM_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN));
@@ -1757,7 +1757,7 @@ iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo)
cmd.aggregate = 0;
cmd.window = IWM_FRAME_LIMIT;
- err = iwm_mvm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, 0,
+ err = iwm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, 0,
sizeof(cmd), &cmd);
if (err)
return err;
@@ -1806,7 +1806,7 @@ iwm_post_alive(struct iwm_softc *sc)
iwm_nic_unlock(sc);
/* enable command channel */
- err = iwm_enable_txq(sc, 0 /* unused */, IWM_MVM_CMD_QUEUE, 7);
+ err = iwm_enable_txq(sc, 0 /* unused */, IWM_CMD_QUEUE, 7);
if (err)
return err;
@@ -2070,8 +2070,8 @@ iwm_send_phy_db_data(struct iwm_softc *sc)
* For the high priority TE use a time event type that has similar priority to
* the FW's action scan priority.
*/
-#define IWM_MVM_ROC_TE_TYPE_NORMAL IWM_TE_P2P_DEVICE_DISCOVERABLE
-#define IWM_MVM_ROC_TE_TYPE_MGMT_TX IWM_TE_P2P_CLIENT_ASSOC
+#define IWM_ROC_TE_TYPE_NORMAL IWM_TE_P2P_DEVICE_DISCOVERABLE
+#define IWM_ROC_TE_TYPE_MGMT_TX IWM_TE_P2P_CLIENT_ASSOC
/* used to convert from time event API v2 to v1 */
#define IWM_TE_V2_DEP_POLICY_MSK (IWM_TE_V2_DEP_OTHER | IWM_TE_V2_DEP_TSF |\
@@ -2096,7 +2096,7 @@ iwm_te_v2_get_absence(uint16_t policy)
}
void
-iwm_mvm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *cmd_v2,
+iwm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *cmd_v2,
struct iwm_time_event_cmd_v1 *cmd_v1)
{
cmd_v1->id_and_color = cmd_v2->id_and_color;
@@ -2120,22 +2120,22 @@ iwm_mvm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *cmd_v2,
}
int
-iwm_mvm_send_time_event_cmd(struct iwm_softc *sc,
+iwm_send_time_event_cmd(struct iwm_softc *sc,
const struct iwm_time_event_cmd_v2 *cmd)
{
struct iwm_time_event_cmd_v1 cmd_v1;
if (sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2)
- return iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD,
+ return iwm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD,
0, sizeof(*cmd), cmd);
- iwm_mvm_te_v2_to_v1(cmd, &cmd_v1);
- return iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0,
+ iwm_te_v2_to_v1(cmd, &cmd_v1);
+ return iwm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0,
sizeof(cmd_v1), &cmd_v1);
}
void
-iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in,
+iwm_protect_session(struct iwm_softc *sc, struct iwm_node *in,
uint32_t duration, uint32_t max_delay)
{
struct iwm_time_event_cmd_v2 time_cmd;
@@ -2160,7 +2160,7 @@ iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in,
IWM_TE_V2_NOTIF_HOST_EVENT_END |
IWM_T2_V2_START_IMMEDIATELY);
- iwm_mvm_send_time_event_cmd(sc, &time_cmd);
+ iwm_send_time_event_cmd(sc, &time_cmd);
}
/*
@@ -2380,10 +2380,10 @@ iwm_setup_ht_rates(struct iwm_softc *sc)
#define IWM_MAX_RX_BA_SESSIONS 16
void
-iwm_mvm_sta_rx_agg(struct iwm_softc *sc, struct ieee80211_node *ni,
+iwm_sta_rx_agg(struct iwm_softc *sc, struct ieee80211_node *ni,
uint8_t tid, uint16_t ssn, int start)
{
- struct iwm_mvm_add_sta_cmd_v7 cmd;
+ struct iwm_add_sta_cmd_v7 cmd;
struct iwm_node *in = (void *)ni;
int err, s;
uint32_t status;
@@ -2408,7 +2408,7 @@ iwm_mvm_sta_rx_agg(struct iwm_softc *sc, struct ieee80211_node *ni,
IWM_STA_MODIFY_REMOVE_BA_TID;
status = IWM_ADD_STA_SUCCESS;
- err = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA,
+ err = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA,
sizeof(cmd), &cmd, &status);
if (err)
return;
@@ -2440,7 +2440,7 @@ iwm_htprot_task(void *arg)
int err;
/* This call updates HT protection based on in->in_ni.ni_htop1. */
- err = iwm_mvm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
+ err = iwm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
if (err)
printf("%s: could not change HT protection: error %d\n",
DEVNAME(sc), err);
@@ -2467,9 +2467,9 @@ iwm_ba_task(void *arg)
struct ieee80211_node *ni = ic->ic_bss;
if (sc->ba_start)
- iwm_mvm_sta_rx_agg(sc, ni, sc->ba_tid, sc->ba_ssn, 1);
+ iwm_sta_rx_agg(sc, ni, sc->ba_tid, sc->ba_ssn, 1);
else
- iwm_mvm_sta_rx_agg(sc, ni, sc->ba_tid, 0, 0);
+ iwm_sta_rx_agg(sc, ni, sc->ba_tid, 0, 0);
}
/*
@@ -3013,7 +3013,7 @@ iwm_send_tx_ant_cfg(struct iwm_softc *sc, uint8_t valid_tx_ant)
.valid = htole32(valid_tx_ant),
};
- return iwm_mvm_send_cmd_pdu(sc, IWM_TX_ANT_CONFIGURATION_CMD,
+ return iwm_send_cmd_pdu(sc, IWM_TX_ANT_CONFIGURATION_CMD,
0, sizeof(tx_ant_cmd), &tx_ant_cmd);
}
@@ -3029,12 +3029,12 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *sc)
phy_cfg_cmd.calib_control.flow_trigger =
sc->sc_default_calib[ucode_type].flow_trigger;
- return iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONFIGURATION_CMD, 0,
+ return iwm_send_cmd_pdu(sc, IWM_PHY_CONFIGURATION_CMD, 0,
sizeof(phy_cfg_cmd), &phy_cfg_cmd);
}
int
-iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc,
+iwm_load_ucode_wait_alive(struct iwm_softc *sc,
enum iwm_ucode_type ucode_type)
{
enum iwm_ucode_type old_type = sc->sc_uc_current;
@@ -3066,7 +3066,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
}
sc->sc_init_complete = 0;
- err = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_INIT);
+ err = iwm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_INIT);
if (err) {
printf("%s: failed to load init firmware\n", DEVNAME(sc));
return err;
@@ -3090,7 +3090,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
if (err)
return err;
- err = iwm_mvm_sf_config(sc, IWM_SF_INIT_OFF);
+ err = iwm_sf_config(sc, IWM_SF_INIT_OFF);
if (err)
return err;
@@ -3171,7 +3171,7 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
#define IWM_RSSI_OFFSET 50
int
-iwm_mvm_calc_rssi(struct iwm_softc *sc, struct iwm_rx_phy_info *phy_info)
+iwm_calc_rssi(struct iwm_softc *sc, struct iwm_rx_phy_info *phy_info)
{
int rssi_a, rssi_b, rssi_a_dbm, rssi_b_dbm, max_rssi_dbm;
uint32_t agc_a, agc_b;
@@ -3202,7 +3202,7 @@ iwm_mvm_calc_rssi(struct iwm_softc *sc, struct iwm_rx_phy_info *phy_info)
* values by -256dBm: practically 0 power and a non-feasible 8 bit value.
*/
int
-iwm_mvm_get_signal_strength(struct iwm_softc *sc,
+iwm_get_signal_strength(struct iwm_softc *sc,
struct iwm_rx_phy_info *phy_info)
{
int energy_a, energy_b, energy_c, max_energy;
@@ -3225,7 +3225,7 @@ iwm_mvm_get_signal_strength(struct iwm_softc *sc,
}
void
-iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc,
+iwm_rx_rx_phy_cmd(struct iwm_softc *sc,
struct iwm_rx_packet *pkt, struct iwm_rx_data *data)
{
struct iwm_rx_phy_info *phy_info = (void *)pkt->data;
@@ -3240,7 +3240,7 @@ iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc,
* Retrieve the average noise (in dBm) among receivers.
*/
int
-iwm_get_noise(const struct iwm_mvm_statistics_rx_non_phy *stats)
+iwm_get_noise(const struct iwm_statistics_rx_non_phy *stats)
{
int i, total, nbant, noise;
@@ -3258,7 +3258,7 @@ iwm_get_noise(const struct iwm_mvm_statistics_rx_non_phy *stats)
}
void
-iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
+iwm_rx_rx_mpdu(struct iwm_softc *sc,
struct iwm_rx_packet *pkt, struct iwm_rx_data *data)
{
struct ieee80211com *ic = &sc->sc_ic;
@@ -3298,9 +3298,9 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
device_timestamp = le32toh(phy_info->system_timestamp);
if (sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_RX_ENERGY_API) {
- rssi = iwm_mvm_get_signal_strength(sc, phy_info);
+ rssi = iwm_get_signal_strength(sc, phy_info);
} else {
- rssi = iwm_mvm_calc_rssi(sc, phy_info);
+ rssi = iwm_calc_rssi(sc, phy_info);
}
rssi = (0 - IWM_MIN_DBM) + rssi; /* normalize */
rssi = MIN(rssi, ic->ic_max_rssi); /* clip to max. 100% */
@@ -3378,12 +3378,12 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
}
void
-iwm_mvm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
+iwm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
struct iwm_node *in)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ifnet *ifp = IC2IFP(ic);
- struct iwm_mvm_tx_resp *tx_resp = (void *)pkt->data;
+ struct iwm_tx_resp *tx_resp = (void *)pkt->data;
int status = le16toh(tx_resp->status.status) & IWM_TX_STATUS_MSK;
int failack = tx_resp->failure_frame;
@@ -3403,7 +3403,7 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
}
void
-iwm_mvm_rx_tx_cmd(struct iwm_softc *sc,
+iwm_rx_tx_cmd(struct iwm_softc *sc,
struct iwm_rx_packet *pkt, struct iwm_rx_data *data)
{
struct ieee80211com *ic = &sc->sc_ic;
@@ -3423,7 +3423,7 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc,
sc->sc_tx_timer = 0;
- iwm_mvm_rx_tx_cmd_single(sc, pkt, in);
+ iwm_rx_tx_cmd_single(sc, pkt, in);
bus_dmamap_sync(sc->sc_dmat, txd->map, 0, txd->map->dm_mapsize,
BUS_DMASYNC_POSTWRITE);
@@ -3453,10 +3453,10 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc,
}
int
-iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
+iwm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
{
struct iwm_binding_cmd cmd;
- struct iwm_mvm_phy_ctxt *phyctxt = in->in_phyctxt;
+ struct iwm_phy_ctxt *phyctxt = in->in_phyctxt;
int i, err;
uint32_t status;
@@ -3472,7 +3472,7 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
cmd.macs[i] = htole32(IWM_FW_CTXT_INVALID);
status = 0;
- err = iwm_mvm_send_cmd_pdu_status(sc, IWM_BINDING_CONTEXT_CMD,
+ err = iwm_send_cmd_pdu_status(sc, IWM_BINDING_CONTEXT_CMD,
sizeof(cmd), &cmd, &status);
if (err)
return err;
@@ -3484,7 +3484,7 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
}
void
-iwm_mvm_phy_ctxt_cmd_hdr(struct iwm_softc *sc, struct iwm_mvm_phy_ctxt *ctxt,
+iwm_phy_ctxt_cmd_hdr(struct iwm_softc *sc, struct iwm_phy_ctxt *ctxt,
struct iwm_phy_context_cmd *cmd, uint32_t action, uint32_t apply_time)
{
memset(cmd, 0, sizeof(struct iwm_phy_context_cmd));
@@ -3496,7 +3496,7 @@ iwm_mvm_phy_ctxt_cmd_hdr(struct iwm_softc *sc, struct iwm_mvm_phy_ctxt *ctxt,
}
void
-iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *sc,
+iwm_phy_ctxt_cmd_data(struct iwm_softc *sc,
struct iwm_phy_context_cmd *cmd, struct ieee80211_channel *chan,
uint8_t chains_static, uint8_t chains_dynamic)
{
@@ -3524,26 +3524,26 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *sc,
}
int
-iwm_mvm_phy_ctxt_cmd(struct iwm_softc *sc,
- struct iwm_mvm_phy_ctxt *ctxt,
+iwm_phy_ctxt_cmd(struct iwm_softc *sc,
+ struct iwm_phy_ctxt *ctxt,
uint8_t chains_static, uint8_t chains_dynamic,
uint32_t action, uint32_t apply_time)
{
struct iwm_phy_context_cmd cmd;
- iwm_mvm_phy_ctxt_cmd_hdr(sc, ctxt, &cmd, action, apply_time);
+ iwm_phy_ctxt_cmd_hdr(sc, ctxt, &cmd, action, apply_time);
- iwm_mvm_phy_ctxt_cmd_data(sc, &cmd, ctxt->channel,
+ iwm_phy_ctxt_cmd_data(sc, &cmd, ctxt->channel,
chains_static, chains_dynamic);
- return iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONTEXT_CMD, 0,
+ return iwm_send_cmd_pdu(sc, IWM_PHY_CONTEXT_CMD, 0,
sizeof(struct iwm_phy_context_cmd), &cmd);
}
int
iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
{
- struct iwm_tx_ring *ring = &sc->txq[IWM_MVM_CMD_QUEUE];
+ struct iwm_tx_ring *ring = &sc->txq[IWM_CMD_QUEUE];
struct iwm_tfd *desc;
struct iwm_tx_data *txdata;
struct iwm_device_cmd *cmd;
@@ -3709,7 +3709,7 @@ iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
}
int
-iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id,
+iwm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id,
uint32_t flags, uint16_t len, const void *data)
{
struct iwm_host_cmd cmd = {
@@ -3723,7 +3723,7 @@ iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id,
}
int
-iwm_mvm_send_cmd_status(struct iwm_softc *sc,
+iwm_send_cmd_status(struct iwm_softc *sc,
struct iwm_host_cmd *cmd, uint32_t *status)
{
struct iwm_rx_packet *pkt;
@@ -3763,7 +3763,7 @@ iwm_mvm_send_cmd_status(struct iwm_softc *sc,
}
int
-iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id,
+iwm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id,
uint16_t len, const void *data, uint32_t *status)
{
struct iwm_host_cmd cmd = {
@@ -3772,7 +3772,7 @@ iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id,
.data = { data, },
};
- return iwm_mvm_send_cmd_status(sc, &cmd, status);
+ return iwm_send_cmd_status(sc, &cmd, status);
}
void
@@ -3787,10 +3787,10 @@ iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
void
iwm_cmd_done(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
{
- struct iwm_tx_ring *ring = &sc->txq[IWM_MVM_CMD_QUEUE];
+ struct iwm_tx_ring *ring = &sc->txq[IWM_CMD_QUEUE];
struct iwm_tx_data *data;
- if (pkt->hdr.qid != IWM_MVM_CMD_QUEUE) {
+ if (pkt->hdr.qid != IWM_CMD_QUEUE) {
return; /* Not a command ack. */
}
@@ -4121,7 +4121,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac)
#if 0
/* not necessary? */
int
-iwm_mvm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync)
+iwm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync)
{
struct iwm_tx_path_flush_cmd flush_cmd = {
.queues_ctl = htole32(tfd_msk),
@@ -4129,7 +4129,7 @@ iwm_mvm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync)
};
int err;
- err = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH,
+ err = iwm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH,
sync ? 0 : IWM_CMD_ASYNC,
sizeof(flush_cmd), &flush_cmd);
if (err)
@@ -4139,19 +4139,19 @@ iwm_mvm_flush_tx_path(struct iwm_softc *sc, int tfd_msk, int sync)
#endif
void
-iwm_mvm_led_enable(struct iwm_softc *sc)
+iwm_led_enable(struct iwm_softc *sc)
{
IWM_WRITE(sc, IWM_CSR_LED_REG, IWM_CSR_LED_REG_TURN_ON);
}
void
-iwm_mvm_led_disable(struct iwm_softc *sc)
+iwm_led_disable(struct iwm_softc *sc)
{
IWM_WRITE(sc, IWM_CSR_LED_REG, IWM_CSR_LED_REG_TURN_OFF);
}
int
-iwm_mvm_led_is_enabled(struct iwm_softc *sc)
+iwm_led_is_enabled(struct iwm_softc *sc)
{
return (IWM_READ(sc, IWM_CSR_LED_REG) == IWM_CSR_LED_REG_TURN_ON);
}
@@ -4161,10 +4161,10 @@ iwm_led_blink_timeout(void *arg)
{
struct iwm_softc *sc = arg;
- if (iwm_mvm_led_is_enabled(sc))
- iwm_mvm_led_disable(sc);
+ if (iwm_led_is_enabled(sc))
+ iwm_led_disable(sc);
else
- iwm_mvm_led_enable(sc);
+ iwm_led_enable(sc);
timeout_add_msec(&sc->sc_led_blink_to, 200);
}
@@ -4179,28 +4179,28 @@ void
iwm_led_blink_stop(struct iwm_softc *sc)
{
timeout_del(&sc->sc_led_blink_to);
- iwm_mvm_led_disable(sc);
+ iwm_led_disable(sc);
}
#define IWM_POWER_KEEP_ALIVE_PERIOD_SEC 25
int
-iwm_mvm_beacon_filter_send_cmd(struct iwm_softc *sc,
+iwm_beacon_filter_send_cmd(struct iwm_softc *sc,
struct iwm_beacon_filter_cmd *cmd)
{
- return iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD,
+ return iwm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD,
0, sizeof(struct iwm_beacon_filter_cmd), cmd);
}
void
-iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *sc,
+iwm_beacon_filter_set_cqm_params(struct iwm_softc *sc,
struct iwm_node *in, struct iwm_beacon_filter_cmd *cmd)
{
cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled);
}
int
-iwm_mvm_update_beacon_abort(struct iwm_softc *sc, struct iwm_node *in,
+iwm_update_beacon_abort(struct iwm_softc *sc, struct iwm_node *in,
int enable)
{
struct iwm_beacon_filter_cmd cmd = {
@@ -4213,12 +4213,12 @@ iwm_mvm_update_beacon_abort(struct iwm_softc *sc, struct iwm_node *in,
return 0;
sc->sc_bf.ba_enabled = enable;
- iwm_mvm_beacon_filter_set_cqm_params(sc, in, &cmd);
- return iwm_mvm_beacon_filter_send_cmd(sc, &cmd);
+ iwm_beacon_filter_set_cqm_params(sc, in, &cmd);
+ return iwm_beacon_filter_send_cmd(sc, &cmd);
}
void
-iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in,
+iwm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in,
struct iwm_mac_power_cmd *cmd)
{
struct ieee80211com *ic = &sc->sc_ic;
@@ -4244,7 +4244,7 @@ iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in,
}
int
-iwm_mvm_power_mac_update_mode(struct iwm_softc *sc, struct iwm_node *in)
+iwm_power_mac_update_mode(struct iwm_softc *sc, struct iwm_node *in)
{
int err;
int ba_enable;
@@ -4252,20 +4252,20 @@ iwm_mvm_power_mac_update_mode(struct iwm_softc *sc, struct iwm_node *in)
memset(&cmd, 0, sizeof(cmd));
- iwm_mvm_power_build_cmd(sc, in, &cmd);
+ iwm_power_build_cmd(sc, in, &cmd);
- err = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0,
+ err = iwm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0,
sizeof(cmd), &cmd);
if (err != 0)
return err;
ba_enable = !!(cmd.flags &
htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK));
- return iwm_mvm_update_beacon_abort(sc, in, ba_enable);
+ return iwm_update_beacon_abort(sc, in, ba_enable);
}
int
-iwm_mvm_power_update_device(struct iwm_softc *sc)
+iwm_power_update_device(struct iwm_softc *sc)
{
struct iwm_device_power_cmd cmd = {
.flags = htole16(IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK),
@@ -4276,12 +4276,12 @@ iwm_mvm_power_update_device(struct iwm_softc *sc)
cmd.flags |= htole16(IWM_DEVICE_POWER_FLAGS_CAM_MSK);
- return iwm_mvm_send_cmd_pdu(sc,
+ return iwm_send_cmd_pdu(sc,
IWM_POWER_TABLE_CMD, 0, sizeof(cmd), &cmd);
}
int
-iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in)
+iwm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in)
{
struct iwm_beacon_filter_cmd cmd = {
IWM_BF_CMD_CONFIG_DEFAULTS,
@@ -4289,8 +4289,8 @@ iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in)
};
int err;
- iwm_mvm_beacon_filter_set_cqm_params(sc, in, &cmd);
- err = iwm_mvm_beacon_filter_send_cmd(sc, &cmd);
+ iwm_beacon_filter_set_cqm_params(sc, in, &cmd);
+ err = iwm_beacon_filter_send_cmd(sc, &cmd);
if (err == 0)
sc->sc_bf.bf_enabled = 1;
@@ -4299,7 +4299,7 @@ iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in)
}
int
-iwm_mvm_disable_beacon_filter(struct iwm_softc *sc)
+iwm_disable_beacon_filter(struct iwm_softc *sc)
{
struct iwm_beacon_filter_cmd cmd;
int err;
@@ -4308,7 +4308,7 @@ iwm_mvm_disable_beacon_filter(struct iwm_softc *sc)
if ((sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_BF_UPDATED) == 0)
return 0;
- err = iwm_mvm_beacon_filter_send_cmd(sc, &cmd);
+ err = iwm_beacon_filter_send_cmd(sc, &cmd);
if (err == 0)
sc->sc_bf.bf_enabled = 0;
@@ -4316,9 +4316,9 @@ iwm_mvm_disable_beacon_filter(struct iwm_softc *sc)
}
int
-iwm_mvm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update)
+iwm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update)
{
- struct iwm_mvm_add_sta_cmd_v7 add_sta_cmd;
+ struct iwm_add_sta_cmd_v7 add_sta_cmd;
int err;
uint32_t status;
struct ieee80211com *ic = &sc->sc_ic;
@@ -4332,7 +4332,7 @@ iwm_mvm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update)
int ac;
for (ac = 0; ac < EDCA_NUM_AC; ac++) {
add_sta_cmd.tfd_queue_msk |=
- htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]);
+ htole32(1 << iwm_ac_to_tx_fifo[ac]);
}
IEEE80211_ADDR_COPY(&add_sta_cmd.addr, in->in_ni.ni_bssid);
}
@@ -4373,7 +4373,7 @@ iwm_mvm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update)
}
status = IWM_ADD_STA_SUCCESS;
- err = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, sizeof(add_sta_cmd),
+ err = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA, sizeof(add_sta_cmd),
&add_sta_cmd, &status);
if (err)
return err;
@@ -4390,10 +4390,10 @@ iwm_mvm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update)
}
int
-iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta,
+iwm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta,
const uint8_t *addr, uint16_t mac_id, uint16_t color)
{
- struct iwm_mvm_add_sta_cmd_v7 cmd;
+ struct iwm_add_sta_cmd_v7 cmd;
int err;
uint32_t status;
@@ -4407,7 +4407,7 @@ iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta,
if (addr)
memcpy(cmd.addr, addr, ETHER_ADDR_LEN);
- err = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA,
+ err = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA,
sizeof(cmd), &cmd, &status);
if (err)
return err;
@@ -4423,18 +4423,18 @@ iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta,
}
int
-iwm_mvm_add_aux_sta(struct iwm_softc *sc)
+iwm_add_aux_sta(struct iwm_softc *sc)
{
int err;
sc->sc_aux_sta.sta_id = IWM_AUX_STA_ID;
- sc->sc_aux_sta.tfd_queue_msk = (1 << IWM_MVM_AUX_QUEUE);
+ sc->sc_aux_sta.tfd_queue_msk = (1 << IWM_AUX_QUEUE);
- err = iwm_enable_txq(sc, 0, IWM_MVM_AUX_QUEUE, IWM_MVM_TX_FIFO_MCAST);
+ err = iwm_enable_txq(sc, 0, IWM_AUX_QUEUE, IWM_TX_FIFO_MCAST);
if (err)
return err;
- err = iwm_mvm_add_int_sta_common(sc,
+ err = iwm_add_int_sta_common(sc,
&sc->sc_aux_sta, NULL, IWM_MAC_INDEX_AUX, 0);
if (err)
@@ -4449,7 +4449,7 @@ iwm_mvm_add_aux_sta(struct iwm_softc *sc)
#define SUSPEND_TIME_PERIOD 100
uint16_t
-iwm_mvm_scan_rx_chain(struct iwm_softc *sc)
+iwm_scan_rx_chain(struct iwm_softc *sc)
{
uint16_t rx_chain;
uint8_t rx_ant;
@@ -4465,7 +4465,7 @@ iwm_mvm_scan_rx_chain(struct iwm_softc *sc)
#define ieee80211_tu_to_usec(a) (1024*(a))
uint32_t
-iwm_mvm_scan_max_out_time(struct iwm_softc *sc, uint32_t flags, int is_assoc)
+iwm_scan_max_out_time(struct iwm_softc *sc, uint32_t flags, int is_assoc)
{
if (!is_assoc)
return 0;
@@ -4475,7 +4475,7 @@ iwm_mvm_scan_max_out_time(struct iwm_softc *sc, uint32_t flags, int is_assoc)
}
uint32_t
-iwm_mvm_scan_suspend_time(struct iwm_softc *sc, int is_assoc)
+iwm_scan_suspend_time(struct iwm_softc *sc, int is_assoc)
{
if (!is_assoc)
return 0;
@@ -4483,7 +4483,7 @@ iwm_mvm_scan_suspend_time(struct iwm_softc *sc, int is_assoc)
}
uint32_t
-iwm_mvm_scan_rate_n_flags(struct iwm_softc *sc, int flags, int no_cck)
+iwm_scan_rate_n_flags(struct iwm_softc *sc, int flags, int no_cck)
{
uint32_t tx_ant;
int i, ind;
@@ -4516,7 +4516,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_softc *sc, int flags, int no_cck)
* req->n_ssids - 1 bits in addition to the first bit.
*/
uint16_t
-iwm_mvm_get_active_dwell(struct iwm_softc *sc, int flags, int n_ssids)
+iwm_get_active_dwell(struct iwm_softc *sc, int flags, int n_ssids)
{
if (flags & IEEE80211_CHAN_2GHZ)
return 30 + 3 * (n_ssids + 1);
@@ -4524,13 +4524,13 @@ iwm_mvm_get_active_dwell(struct iwm_softc *sc, int flags, int n_ssids)
}
uint16_t
-iwm_mvm_get_passive_dwell(struct iwm_softc *sc, int flags)
+iwm_get_passive_dwell(struct iwm_softc *sc, int flags)
{
return (flags & IEEE80211_CHAN_2GHZ) ? 100 + 20 : 100 + 10;
}
uint8_t
-iwm_mvm_lmac_scan_fill_channels(struct iwm_softc *sc,
+iwm_lmac_scan_fill_channels(struct iwm_softc *sc,
struct iwm_scan_channel_cfg_lmac *chan, int n_ssids)
{
struct ieee80211com *ic = &sc->sc_ic;
@@ -4560,7 +4560,7 @@ iwm_mvm_lmac_scan_fill_channels(struct iwm_softc *sc,
}
uint8_t
-iwm_mvm_umac_scan_fill_channels(struct iwm_softc *sc,
+iwm_umac_scan_fill_channels(struct iwm_softc *sc,
struct iwm_scan_channel_cfg_umac *chan, int n_ssids)
{
struct ieee80211com *ic = &sc->sc_ic;
@@ -4589,7 +4589,7 @@ iwm_mvm_umac_scan_fill_channels(struct iwm_softc *sc,
}
int
-iwm_mvm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq)
+iwm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ifnet *ifp = IC2IFP(ic);
@@ -4682,7 +4682,7 @@ iwm_mvm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq)
}
int
-iwm_mvm_lmac_scan(struct iwm_softc *sc)
+iwm_lmac_scan(struct iwm_softc *sc)
{
struct ieee80211com *ic = &sc->sc_ic;
struct iwm_host_cmd hcmd = {
@@ -4716,21 +4716,21 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
req->suspend_time = 0;
req->scan_prio = htole32(IWM_SCAN_PRIORITY_HIGH);
- req->rx_chain_select = iwm_mvm_scan_rx_chain(sc);
+ req->rx_chain_select = iwm_scan_rx_chain(sc);
req->iter_num = htole32(1);
req->delay = 0;
- req->scan_flags = htole32(IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL |
- IWM_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE |
- IWM_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL);
+ req->scan_flags = htole32(IWM_LMAC_SCAN_FLAG_PASS_ALL |
+ IWM_LMAC_SCAN_FLAG_ITER_COMPLETE |
+ IWM_LMAC_SCAN_FLAG_EXTENDED_DWELL);
if (ic->ic_des_esslen == 0)
- req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAG_PASSIVE);
+ req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAG_PASSIVE);
else
req->scan_flags |=
- htole32(IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION);
+ htole32(IWM_LMAC_SCAN_FLAG_PRE_CONNECTION);
if (isset(sc->sc_enabled_capa,
IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT))
- req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED);
+ req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAGS_RRM_ENABLED);
req->flags = htole32(IWM_PHY_BAND_24);
if (sc->sc_nvm.sku_cap_band_52GHz_enable)
@@ -4742,14 +4742,14 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
req->tx_cmd[0].tx_flags = htole32(IWM_TX_CMD_FLG_SEQ_CTL |
IWM_TX_CMD_FLG_BT_DIS);
req->tx_cmd[0].rate_n_flags =
- iwm_mvm_scan_rate_n_flags(sc, IEEE80211_CHAN_2GHZ, 1/*XXX*/);
+ iwm_scan_rate_n_flags(sc, IEEE80211_CHAN_2GHZ, 1/*XXX*/);
req->tx_cmd[0].sta_id = sc->sc_aux_sta.sta_id;
/* Tx flags 5 GHz. */
req->tx_cmd[1].tx_flags = htole32(IWM_TX_CMD_FLG_SEQ_CTL |
IWM_TX_CMD_FLG_BT_DIS);
req->tx_cmd[1].rate_n_flags =
- iwm_mvm_scan_rate_n_flags(sc, IEEE80211_CHAN_5GHZ, 1/*XXX*/);
+ iwm_scan_rate_n_flags(sc, IEEE80211_CHAN_5GHZ, 1/*XXX*/);
req->tx_cmd[1].sta_id = sc->sc_aux_sta.sta_id;
/* Check if we're doing an active directed scan. */
@@ -4760,11 +4760,11 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
ic->ic_des_esslen);
}
- req->n_channels = iwm_mvm_lmac_scan_fill_channels(sc,
+ req->n_channels = iwm_lmac_scan_fill_channels(sc,
(struct iwm_scan_channel_cfg_lmac *)req->data,
ic->ic_des_esslen != 0);
- err = iwm_mvm_fill_probe_req(sc,
+ err = iwm_fill_probe_req(sc,
(struct iwm_scan_probe_req *)(req->data +
(sizeof(struct iwm_scan_channel_cfg_lmac) *
sc->sc_capa_n_scan_channels)));
@@ -4787,7 +4787,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
}
int
-iwm_mvm_config_umac_scan(struct iwm_softc *sc)
+iwm_config_umac_scan(struct iwm_softc *sc)
{
struct ieee80211com *ic = &sc->sc_ic;
struct iwm_scan_config *scan_config;
@@ -4862,7 +4862,7 @@ iwm_mvm_config_umac_scan(struct iwm_softc *sc)
}
int
-iwm_mvm_umac_scan(struct iwm_softc *sc)
+iwm_umac_scan(struct iwm_softc *sc)
{
struct ieee80211com *ic = &sc->sc_ic;
struct iwm_host_cmd hcmd = {
@@ -4900,7 +4900,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
req->scan_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
req->ooc_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
- req->n_channels = iwm_mvm_umac_scan_fill_channels(sc,
+ req->n_channels = iwm_umac_scan_fill_channels(sc,
(struct iwm_scan_channel_cfg_umac *)req->data,
ic->ic_des_esslen != 0);
@@ -4928,7 +4928,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
req->general_flags |=
htole32(IWM_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED);
- err = iwm_mvm_fill_probe_req(sc, &tail->preq);
+ err = iwm_fill_probe_req(sc, &tail->preq);
if (err) {
free(req, M_DEVBUF, req_len);
return err;
@@ -4944,7 +4944,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
}
void
-iwm_mvm_ack_rates(struct iwm_softc *sc, struct iwm_node *in,
+iwm_ack_rates(struct iwm_softc *sc, struct iwm_node *in,
int *cck_rates, int *ofdm_rates)
{
struct ieee80211_node *ni = &in->in_ni;
@@ -5026,7 +5026,7 @@ iwm_mvm_ack_rates(struct iwm_softc *sc, struct iwm_node *in,
}
void
-iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
+iwm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
struct iwm_mac_ctx_cmd *cmd, uint32_t action)
{
struct ieee80211com *ic = &sc->sc_ic;
@@ -5047,7 +5047,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
} else {
IEEE80211_ADDR_COPY(cmd->bssid_addr, etherbroadcastaddr);
}
- iwm_mvm_ack_rates(sc, in, &cck_ack_rates, &ofdm_ack_rates);
+ iwm_ack_rates(sc, in, &cck_ack_rates, &ofdm_ack_rates);
cmd->cck_rates = htole32(cck_ack_rates);
cmd->ofdm_rates = htole32(ofdm_ack_rates);
@@ -5096,7 +5096,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
}
void
-iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *sc, struct iwm_node *in,
+iwm_mac_ctxt_cmd_fill_sta(struct iwm_softc *sc, struct iwm_node *in,
struct iwm_mac_data_sta *ctxt_sta, int force_assoc_off)
{
struct ieee80211_node *ni = &in->in_ni;
@@ -5104,10 +5104,10 @@ iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *sc, struct iwm_node *in,
ctxt_sta->is_assoc = htole32(0);
ctxt_sta->bi = htole32(ni->ni_intval);
- ctxt_sta->bi_reciprocal = htole32(iwm_mvm_reciprocal(ni->ni_intval));
+ ctxt_sta->bi_reciprocal = htole32(iwm_reciprocal(ni->ni_intval));
ctxt_sta->dtim_interval = htole32(ni->ni_intval * ic->ic_dtim_period);
ctxt_sta->dtim_reciprocal =
- htole32(iwm_mvm_reciprocal(ni->ni_intval * ic->ic_dtim_period));
+ htole32(iwm_reciprocal(ni->ni_intval * ic->ic_dtim_period));
/* 10 = CONN_MAX_LISTEN_INTERVAL */
ctxt_sta->listen_interval = htole32(10);
@@ -5115,13 +5115,13 @@ iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *sc, struct iwm_node *in,
}
int
-iwm_mvm_mac_ctxt_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
+iwm_mac_ctxt_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
{
struct iwm_mac_ctx_cmd cmd;
memset(&cmd, 0, sizeof(cmd));
- iwm_mvm_mac_ctxt_cmd_common(sc, in, &cmd, action);
+ iwm_mac_ctxt_cmd_common(sc, in, &cmd, action);
/* Allow beacons to pass through as long as we are not associated or we
* do not have dtim period information */
@@ -5131,15 +5131,15 @@ iwm_mvm_mac_ctxt_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action)
cmd.filter_flags &= ~htole32(IWM_MAC_FILTER_IN_BEACON);
/* Fill the data specific for station mode */
- iwm_mvm_mac_ctxt_cmd_fill_sta(sc, in,
+ iwm_mac_ctxt_cmd_fill_sta(sc, in,
&cmd.sta, action == IWM_FW_CTXT_ACTION_ADD);
- return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_CONTEXT_CMD, 0, sizeof(cmd),
+ return iwm_send_cmd_pdu(sc, IWM_MAC_CONTEXT_CMD, 0, sizeof(cmd),
&cmd);
}
int
-iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
+iwm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
{
struct iwm_time_quota_cmd cmd;
int i, idx, num_active_macs, quota, quota_rem;
@@ -5161,7 +5161,7 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
/*
* The FW's scheduling session consists of
- * IWM_MVM_MAX_QUOTA fragments. Divide these fragments
+ * IWM_MAX_QUOTA fragments. Divide these fragments
* equally between all the bindings that require quota
*/
num_active_macs = 0;
@@ -5173,8 +5173,8 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
quota = 0;
quota_rem = 0;
if (num_active_macs) {
- quota = IWM_MVM_MAX_QUOTA / num_active_macs;
- quota_rem = IWM_MVM_MAX_QUOTA % num_active_macs;
+ quota = IWM_MAX_QUOTA / num_active_macs;
+ quota_rem = IWM_MAX_QUOTA % num_active_macs;
}
for (idx = 0, i = 0; i < IWM_MAX_BINDINGS; i++) {
@@ -5197,7 +5197,7 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in)
/* Give the remainder of the session to the first binding */
cmd.quotas[0].quota = htole32(le32toh(cmd.quotas[0].quota) + quota_rem);
- return iwm_mvm_send_cmd_pdu(sc, IWM_TIME_QUOTA_CMD, 0,
+ return iwm_send_cmd_pdu(sc, IWM_TIME_QUOTA_CMD, 0,
sizeof(cmd), &cmd);
}
@@ -5211,7 +5211,7 @@ iwm_auth(struct iwm_softc *sc)
in->in_assoc = 0;
- err = iwm_mvm_sf_config(sc, IWM_SF_FULL_ON);
+ err = iwm_sf_config(sc, IWM_SF_FULL_ON);
if (err)
return err;
@@ -5220,21 +5220,21 @@ iwm_auth(struct iwm_softc *sc)
return err;
sc->sc_phyctxt[0].channel = in->in_ni.ni_chan;
- err = iwm_mvm_phy_ctxt_cmd(sc, &sc->sc_phyctxt[0], 1, 1,
+ err = iwm_phy_ctxt_cmd(sc, &sc->sc_phyctxt[0], 1, 1,
IWM_FW_CTXT_ACTION_MODIFY, 0);
if (err)
return err;
in->in_phyctxt = &sc->sc_phyctxt[0];
- err = iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD);
+ err = iwm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD);
if (err)
return err;
- err = iwm_mvm_add_sta_cmd(sc, in, 0);
+ err = iwm_add_sta_cmd(sc, in, 0);
if (err)
return err;
- err = iwm_mvm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
+ err = iwm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
if (err) {
printf("%s: failed to update MAC\n", DEVNAME(sc));
return err;
@@ -5245,8 +5245,8 @@ iwm_auth(struct iwm_softc *sc)
* by "protecting" the session with a time event.
*/
/* XXX duration is in units of TU, not MS */
- duration = IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS;
- iwm_mvm_protect_session(sc, in, duration, 500 /* XXX magic number */);
+ duration = IWM_TE_SESSION_PROTECTION_MAX_TIME_MS;
+ iwm_protect_session(sc, in, duration, 500 /* XXX magic number */);
DELAY(100);
return 0;
@@ -5259,13 +5259,13 @@ iwm_assoc(struct iwm_softc *sc)
struct iwm_node *in = (void *)ic->ic_bss;
int err;
- err = iwm_mvm_add_sta_cmd(sc, in, 1);
+ err = iwm_add_sta_cmd(sc, in, 1);
if (err)
return err;
in->in_assoc = 1;
- err = iwm_mvm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
+ err = iwm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY);
if (err) {
printf("%s: failed to update MAC\n", DEVNAME(sc));
return err;
@@ -5469,7 +5469,7 @@ iwm_newstate_task(void *psc)
iwm_led_blink_stop(sc);
if (ostate == IEEE80211_S_RUN && nstate != ostate)
- iwm_mvm_disable_beacon_filter(sc);
+ iwm_disable_beacon_filter(sc);
/* Reset the device if moving out of AUTH, ASSOC, or RUN. */
/* XXX Is there a way to switch states without a full reset? */
@@ -5504,9 +5504,9 @@ iwm_newstate_task(void *psc)
(sc->sc_flags & IWM_FLAG_SCANNING))
return;
if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN))
- err = iwm_mvm_umac_scan(sc);
+ err = iwm_umac_scan(sc);
else
- err = iwm_mvm_lmac_scan(sc);
+ err = iwm_lmac_scan(sc);
if (err) {
printf("%s: could not initiate scan\n", DEVNAME(sc));
return;
@@ -5531,16 +5531,16 @@ iwm_newstate_task(void *psc)
case IEEE80211_S_RUN:
in = (struct iwm_node *)ic->ic_bss;
- iwm_mvm_power_mac_update_mode(sc, in);
+ iwm_power_mac_update_mode(sc, in);
#ifdef notyet
/*
* Disabled for now. Default beacon filter settings
* prevent net80211 from getting ERP and HT protection
* updates from beacons.
*/
- iwm_mvm_enable_beacon_filter(sc, in);
+ iwm_enable_beacon_filter(sc, in);
#endif
- iwm_mvm_update_quotas(sc, in);
+ iwm_update_quotas(sc, in);
ieee80211_amrr_node_init(&sc->sc_amrr, &in->in_amn);
@@ -5550,7 +5550,7 @@ iwm_newstate_task(void *psc)
iwm_setrates(in);
timeout_add_msec(&sc->sc_calib_to, 500);
- iwm_mvm_led_enable(sc);
+ iwm_led_enable(sc);
break;
default:
@@ -5643,7 +5643,7 @@ iwm_sf_full_timeout[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES] = {
};
void
-iwm_mvm_fill_sf_command(struct iwm_softc *sc, struct iwm_sf_cfg_cmd *sf_cmd,
+iwm_fill_sf_command(struct iwm_softc *sc, struct iwm_sf_cfg_cmd *sf_cmd,
struct ieee80211_node *ni)
{
int i, j, watermark;
@@ -5691,7 +5691,7 @@ iwm_mvm_fill_sf_command(struct iwm_softc *sc, struct iwm_sf_cfg_cmd *sf_cmd,
}
int
-iwm_mvm_sf_config(struct iwm_softc *sc, int new_state)
+iwm_sf_config(struct iwm_softc *sc, int new_state)
{
struct ieee80211com *ic = &sc->sc_ic;
struct iwm_sf_cfg_cmd sf_cmd = {
@@ -5705,16 +5705,16 @@ iwm_mvm_sf_config(struct iwm_softc *sc, int new_state)
switch (new_state) {
case IWM_SF_UNINIT:
case IWM_SF_INIT_OFF:
- iwm_mvm_fill_sf_command(sc, &sf_cmd, NULL);
+ iwm_fill_sf_command(sc, &sf_cmd, NULL);
break;
case IWM_SF_FULL_ON:
- iwm_mvm_fill_sf_command(sc, &sf_cmd, ic->ic_bss);
+ iwm_fill_sf_command(sc, &sf_cmd, ic->ic_bss);
break;
default:
return EINVAL;
}
- err = iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_SF_CFG_CMD, IWM_CMD_ASYNC,
+ err = iwm_send_cmd_pdu(sc, IWM_REPLY_SF_CFG_CMD, IWM_CMD_ASYNC,
sizeof(sf_cmd), &sf_cmd);
return err;
}
@@ -5727,7 +5727,7 @@ iwm_send_bt_init_conf(struct iwm_softc *sc)
bt_cmd.mode = htole32(IWM_BT_COEX_WIFI);
bt_cmd.enabled_modules = htole32(IWM_BT_COEX_HIGH_BAND_RET);
- return iwm_mvm_send_cmd_pdu(sc, IWM_BT_CONFIG, 0, sizeof(bt_cmd),
+ return iwm_send_cmd_pdu(sc, IWM_BT_CONFIG, 0, sizeof(bt_cmd),
&bt_cmd);
}
@@ -5767,7 +5767,7 @@ iwm_send_update_mcc_cmd(struct iwm_softc *sc, const char *alpha2)
}
void
-iwm_mvm_tt_tx_backoff(struct iwm_softc *sc, uint32_t backoff)
+iwm_tt_tx_backoff(struct iwm_softc *sc, uint32_t backoff)
{
struct iwm_host_cmd cmd = {
.id = IWM_REPLY_THERMAL_MNG_BACKOFF,
@@ -5808,7 +5808,7 @@ iwm_init_hw(struct iwm_softc *sc)
}
/* Restart, this time with the regular firmware */
- err = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_REGULAR);
+ err = iwm_load_ucode_wait_alive(sc, IWM_UCODE_TYPE_REGULAR);
if (err) {
printf("%s: could not load firmware\n", DEVNAME(sc));
goto err;
@@ -5843,7 +5843,7 @@ iwm_init_hw(struct iwm_softc *sc)
}
/* Add auxiliary station for scanning */
- err = iwm_mvm_add_aux_sta(sc);
+ err = iwm_add_aux_sta(sc);
if (err) {
printf("%s: could not add aux station (error %d)\n",
DEVNAME(sc), err);
@@ -5857,7 +5857,7 @@ iwm_init_hw(struct iwm_softc *sc)
* For now use the first channel we have.
*/
sc->sc_phyctxt[i].channel = &ic->ic_channels[1];
- err = iwm_mvm_phy_ctxt_cmd(sc, &sc->sc_phyctxt[i], 1, 1,
+ err = iwm_phy_ctxt_cmd(sc, &sc->sc_phyctxt[i], 1, 1,
IWM_FW_CTXT_ACTION_ADD, 0);
if (err) {
printf("%s: could not add phy context %d (error %d)\n",
@@ -5868,9 +5868,9 @@ iwm_init_hw(struct iwm_softc *sc)
/* Initialize tx backoffs to the minimum. */
if (sc->sc_device_family == IWM_DEVICE_FAMILY_7000)
- iwm_mvm_tt_tx_backoff(sc, 0);
+ iwm_tt_tx_backoff(sc, 0);
- err = iwm_mvm_power_update_device(sc);
+ err = iwm_power_update_device(sc);
if (err) {
printf("%s: could send power update command (error %d)\n",
DEVNAME(sc), err);
@@ -5887,7 +5887,7 @@ iwm_init_hw(struct iwm_softc *sc)
}
if (isset(sc->sc_enabled_capa, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) {
- err = iwm_mvm_config_umac_scan(sc);
+ err = iwm_config_umac_scan(sc);
if (err) {
printf("%s: could not configure scan (error %d)\n",
DEVNAME(sc), err);
@@ -5897,7 +5897,7 @@ iwm_init_hw(struct iwm_softc *sc)
for (ac = 0; ac < EDCA_NUM_AC; ac++) {
err = iwm_enable_txq(sc, IWM_STATION_ID, ac,
- iwm_mvm_ac_to_tx_fifo[ac]);
+ iwm_ac_to_tx_fifo[ac]);
if (err) {
printf("%s: could not enable Tx queue %d (error %d)\n",
DEVNAME(sc), ac, err);
@@ -5905,14 +5905,14 @@ iwm_init_hw(struct iwm_softc *sc)
}
}
- err = iwm_mvm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD);
+ err = iwm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD);
if (err) {
printf("%s: could not add MAC context (error %d)\n",
DEVNAME(sc), err);
goto err;
}
- err = iwm_mvm_disable_beacon_filter(sc);
+ err = iwm_disable_beacon_filter(sc);
if (err) {
printf("%s: could not disable beacon filter (error %d)\n",
DEVNAME(sc), err);
@@ -5946,7 +5946,7 @@ iwm_allow_mcast(struct iwm_softc *sc)
cmd->pass_all = 1;
IEEE80211_ADDR_COPY(cmd->bssid, ni->ni_bssid);
- err = iwm_mvm_send_cmd_pdu(sc, IWM_MCAST_FILTER_CMD,
+ err = iwm_send_cmd_pdu(sc, IWM_MCAST_FILTER_CMD,
0, size, cmd);
free(cmd, M_DEVBUF, size);
return err;
@@ -6463,15 +6463,15 @@ iwm_notif_intr(struct iwm_softc *sc)
switch (code) {
case IWM_REPLY_RX_PHY_CMD:
- iwm_mvm_rx_rx_phy_cmd(sc, pkt, data);
+ iwm_rx_rx_phy_cmd(sc, pkt, data);
break;
case IWM_REPLY_RX_MPDU_CMD:
- iwm_mvm_rx_rx_mpdu(sc, pkt, data);
+ iwm_rx_rx_mpdu(sc, pkt, data);
break;
case IWM_TX_CMD:
- iwm_mvm_rx_tx_cmd(sc, pkt, data);
+ iwm_rx_tx_cmd(sc, pkt, data);
break;
case IWM_MISSED_BEACONS_NOTIFICATION:
@@ -6481,10 +6481,10 @@ iwm_notif_intr(struct iwm_softc *sc)
case IWM_MFUART_LOAD_NOTIFICATION:
break;
- case IWM_MVM_ALIVE: {
- struct iwm_mvm_alive_resp_v1 *resp1;
- struct iwm_mvm_alive_resp_v2 *resp2;
- struct iwm_mvm_alive_resp_v3 *resp3;
+ case IWM_ALIVE: {
+ struct iwm_alive_resp_v1 *resp1;
+ struct iwm_alive_resp_v2 *resp2;
+ struct iwm_alive_resp_v3 *resp3;
if (iwm_rx_packet_payload_len(pkt) == sizeof(*resp1)) {
SYNC_RESP_STRUCT(resp1, pkt);
@@ -6756,7 +6756,7 @@ iwm_intr(void *arg)
/* Dump driver status (TX and RX rings) while we're here. */
DPRINTF(("driver status:\n"));
- for (i = 0; i < IWM_MVM_MAX_QUEUES; i++) {
+ for (i = 0; i < IWM_MAX_QUEUES; i++) {
struct iwm_tx_ring *ring = &sc->txq[i];
DPRINTF((" tx ring %2d: qid=%-2d cur=%-3d "
"queued=%-3d\n",