summaryrefslogtreecommitdiff
path: root/sys
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
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')
-rw-r--r--sys/dev/pci/if_iwm.c466
-rw-r--r--sys/dev/pci/if_iwmreg.h182
-rw-r--r--sys/dev/pci/if_iwmvar.h14
3 files changed, 331 insertions, 331 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",
diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h
index 17571bd0780..7f4d4d96a54 100644
--- a/sys/dev/pci/if_iwmreg.h
+++ b/sys/dev/pci/if_iwmreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwmreg.h,v 1.17 2016/09/10 07:38:24 stsp Exp $ */
+/* $OpenBSD: if_iwmreg.h,v 1.18 2016/09/10 09:32:33 stsp Exp $ */
/******************************************************************************
*
@@ -1663,26 +1663,26 @@ struct iwm_agn_scd_bc_tbl {
} __packed;
/* Maximum number of Tx queues. */
-#define IWM_MVM_MAX_QUEUES 31
+#define IWM_MAX_QUEUES 31
/* Tx queue numbers */
-#define IWM_MVM_OFFCHANNEL_QUEUE 8
-#define IWM_MVM_CMD_QUEUE 9
-#define IWM_MVM_AUX_QUEUE 15
+#define IWM_OFFCHANNEL_QUEUE 8
+#define IWM_CMD_QUEUE 9
+#define IWM_AUX_QUEUE 15
-#define IWM_MVM_TX_FIFO_BK 0
-#define IWM_MVM_TX_FIFO_BE 1
-#define IWM_MVM_TX_FIFO_VI 2
-#define IWM_MVM_TX_FIFO_VO 3
-#define IWM_MVM_TX_FIFO_MCAST 5
-#define IWM_MVM_TX_FIFO_CMD 7
+#define IWM_TX_FIFO_BK 0
+#define IWM_TX_FIFO_BE 1
+#define IWM_TX_FIFO_VI 2
+#define IWM_TX_FIFO_VO 3
+#define IWM_TX_FIFO_MCAST 5
+#define IWM_TX_FIFO_CMD 7
-#define IWM_MVM_STATION_COUNT 16
+#define IWM_STATION_COUNT 16
/*
* Commands
*/
-#define IWM_MVM_ALIVE 0x1
+#define IWM_ALIVE 0x1
#define IWM_REPLY_ERROR 0x2
#define IWM_INIT_COMPLETE_NOTIF 0x4
@@ -2089,7 +2089,7 @@ struct iwm_nvm_access_resp {
uint8_t data[];
} __packed; /* IWM_NVM_ACCESS_CMD_RESP_API_S_VER_2 */
-/* IWM_MVM_ALIVE 0x1 */
+/* IWM_ALIVE 0x1 */
/* alive response is_valid values */
#define IWM_ALIVE_RESP_UCODE_OK (1 << 0)
@@ -2118,7 +2118,7 @@ struct iwm_nvm_access_resp {
#define IWM_ALIVE_FLG_RFKILL (1 << 0)
-struct iwm_mvm_alive_resp_v1 {
+struct iwm_alive_resp_v1 {
uint16_t status;
uint16_t flags;
uint8_t ucode_minor;
@@ -2140,7 +2140,7 @@ struct iwm_mvm_alive_resp_v1 {
uint32_t scd_base_ptr; /* SRAM address for SCD */
} __packed; /* IWM_ALIVE_RES_API_S_VER_1 */
-struct iwm_mvm_alive_resp_v2 {
+struct iwm_alive_resp_v2 {
uint16_t status;
uint16_t flags;
uint8_t ucode_minor;
@@ -2169,7 +2169,7 @@ struct iwm_mvm_alive_resp_v2 {
uint32_t dbg_print_buff_addr;
} __packed; /* ALIVE_RES_API_S_VER_2 */
-struct iwm_mvm_alive_resp_v3 {
+struct iwm_alive_resp_v3 {
uint16_t status;
uint16_t flags;
uint32_t ucode_minor;
@@ -2596,7 +2596,7 @@ struct iwm_binding_cmd {
} __packed; /* IWM_BINDING_CMD_API_S_VER_1 */
/* The maximal number of fragments in the FW's schedule session */
-#define IWM_MVM_MAX_QUOTA 128
+#define IWM_MAX_QUOTA 128
/**
* struct iwm_time_quota_data - configuration of time quota per binding
@@ -2977,14 +2977,14 @@ struct iwm_mcast_filter_cmd {
uint8_t addr_list[0];
} __packed; /* IWM_MCAST_FILTERING_CMD_API_S_VER_1 */
-struct iwm_mvm_statistics_dbg {
+struct iwm_statistics_dbg {
uint32_t burst_check;
uint32_t burst_count;
uint32_t wait_for_silence_timeout_cnt;
uint32_t reserved[3];
} __packed; /* IWM_STATISTICS_DEBUG_API_S_VER_2 */
-struct iwm_mvm_statistics_div {
+struct iwm_statistics_div {
uint32_t tx_on_a;
uint32_t tx_on_b;
uint32_t exec_time;
@@ -2993,15 +2993,15 @@ struct iwm_mvm_statistics_div {
uint32_t reserved2;
} __packed; /* IWM_STATISTICS_SLOW_DIV_API_S_VER_2 */
-struct iwm_mvm_statistics_general_common {
+struct iwm_statistics_general_common {
uint32_t temperature; /* radio temperature */
uint32_t temperature_m; /* radio voltage */
- struct iwm_mvm_statistics_dbg dbg;
+ struct iwm_statistics_dbg dbg;
uint32_t sleep_time;
uint32_t slots_out;
uint32_t slots_idle;
uint32_t ttl_timestamp;
- struct iwm_mvm_statistics_div div;
+ struct iwm_statistics_div div;
uint32_t rx_enable_counter;
/*
* num_of_sos_states:
@@ -3011,7 +3011,7 @@ struct iwm_mvm_statistics_general_common {
uint32_t num_of_sos_states;
} __packed; /* IWM_STATISTICS_GENERAL_API_S_VER_5 */
-struct iwm_mvm_statistics_rx_non_phy {
+struct iwm_statistics_rx_non_phy {
uint32_t bogus_cts; /* CTS received when not expecting CTS */
uint32_t bogus_ack; /* ACK received when not expecting ACK */
uint32_t non_bssid_frames; /* number of frames with BSSID that
@@ -3045,7 +3045,7 @@ struct iwm_mvm_statistics_rx_non_phy {
uint32_t directed_data_mpdu;
} __packed; /* IWM_STATISTICS_RX_NON_PHY_API_S_VER_3 */
-struct iwm_mvm_statistics_rx_phy {
+struct iwm_statistics_rx_phy {
uint32_t ina_cnt;
uint32_t fina_cnt;
uint32_t plcp_err;
@@ -3068,7 +3068,7 @@ struct iwm_mvm_statistics_rx_phy {
uint32_t reserved;
} __packed; /* IWM_STATISTICS_RX_PHY_API_S_VER_2 */
-struct iwm_mvm_statistics_rx_ht_phy {
+struct iwm_statistics_rx_ht_phy {
uint32_t plcp_err;
uint32_t overrun_err;
uint32_t early_overrun_err;
@@ -3083,7 +3083,7 @@ struct iwm_mvm_statistics_rx_ht_phy {
#define IWM_MAX_CHAINS 3
-struct iwm_mvm_statistics_tx_non_phy_agg {
+struct iwm_statistics_tx_non_phy_agg {
uint32_t ba_timeout;
uint32_t ba_reschedule_frames;
uint32_t scd_query_agg_frame_cnt;
@@ -3099,7 +3099,7 @@ struct iwm_mvm_statistics_tx_non_phy_agg {
uint32_t reserved2;
} __packed; /* IWM_STATISTICS_TX_NON_PHY_AGG_API_S_VER_1 */
-struct iwm_mvm_statistics_tx_channel_width {
+struct iwm_statistics_tx_channel_width {
uint32_t ext_cca_narrow_ch20[1];
uint32_t ext_cca_narrow_ch40[2];
uint32_t ext_cca_narrow_ch80[3];
@@ -3110,7 +3110,7 @@ struct iwm_mvm_statistics_tx_channel_width {
uint32_t fail_per_ch_width[4];
}; /* IWM_STATISTICS_TX_CHANNEL_WIDTH_API_S_VER_1 */
-struct iwm_mvm_statistics_tx {
+struct iwm_statistics_tx {
uint32_t preamble_cnt;
uint32_t rx_detected_cnt;
uint32_t bt_prio_defer_cnt;
@@ -3125,12 +3125,12 @@ struct iwm_mvm_statistics_tx {
uint32_t burst_abort_missing_next_frame_cnt;
uint32_t cts_timeout_collision;
uint32_t ack_or_ba_timeout_collision;
- struct iwm_mvm_statistics_tx_non_phy_agg agg;
- struct iwm_mvm_statistics_tx_channel_width channel_width;
+ struct iwm_statistics_tx_non_phy_agg agg;
+ struct iwm_statistics_tx_channel_width channel_width;
} __packed; /* IWM_STATISTICS_TX_API_S_VER_4 */
-struct iwm_mvm_statistics_bt_activity {
+struct iwm_statistics_bt_activity {
uint32_t hi_priority_tx_req_cnt;
uint32_t hi_priority_tx_denied_cnt;
uint32_t lo_priority_tx_req_cnt;
@@ -3141,8 +3141,8 @@ struct iwm_mvm_statistics_bt_activity {
uint32_t lo_priority_rx_denied_cnt;
} __packed; /* IWM_STATISTICS_BT_ACTIVITY_API_S_VER_1 */
-struct iwm_mvm_statistics_general {
- struct iwm_mvm_statistics_general_common common;
+struct iwm_statistics_general {
+ struct iwm_statistics_general_common common;
uint32_t beacon_filtered;
uint32_t missed_beacons;
int8_t beacon_filter_average_energy;
@@ -3150,14 +3150,14 @@ struct iwm_mvm_statistics_general {
int8_t beacon_filter_current_energy;
int8_t beacon_filter_reserved;
uint32_t beacon_filter_delta_time;
- struct iwm_mvm_statistics_bt_activity bt_activity;
+ struct iwm_statistics_bt_activity bt_activity;
} __packed; /* IWM_STATISTICS_GENERAL_API_S_VER_5 */
-struct iwm_mvm_statistics_rx {
- struct iwm_mvm_statistics_rx_phy ofdm;
- struct iwm_mvm_statistics_rx_phy cck;
- struct iwm_mvm_statistics_rx_non_phy general;
- struct iwm_mvm_statistics_rx_ht_phy ofdm_ht;
+struct iwm_statistics_rx {
+ struct iwm_statistics_rx_phy ofdm;
+ struct iwm_statistics_rx_phy cck;
+ struct iwm_statistics_rx_non_phy general;
+ struct iwm_statistics_rx_ht_phy ofdm_ht;
} __packed; /* IWM_STATISTICS_RX_API_S_VER_3 */
/*
@@ -3178,9 +3178,9 @@ struct iwm_mvm_statistics_rx {
struct iwm_notif_statistics { /* IWM_STATISTICS_NTFY_API_S_VER_8 */
uint32_t flag;
- struct iwm_mvm_statistics_rx rx;
- struct iwm_mvm_statistics_tx tx;
- struct iwm_mvm_statistics_general general;
+ struct iwm_statistics_rx rx;
+ struct iwm_statistics_tx tx;
+ struct iwm_statistics_general general;
} __packed;
/***********************************
@@ -3548,7 +3548,7 @@ struct iwm_mac_ctx_cmd {
};
} __packed; /* IWM_MAC_CONTEXT_CMD_API_S_VER_1 */
-static inline uint32_t iwm_mvm_reciprocal(uint32_t v)
+static inline uint32_t iwm_reciprocal(uint32_t v)
{
if (!v)
return 0;
@@ -4501,11 +4501,11 @@ struct iwm_agg_tx_status {
#define IWM_TX_RES_RATE_TABLE_COLOR_MSK 0x70
#define IWM_TX_RES_INV_RATE_INDEX_MSK 0x80
-#define IWM_MVM_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f)
-#define IWM_MVM_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4)
+#define IWM_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f)
+#define IWM_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4)
/**
- * struct iwm_mvm_tx_resp - notifies that fw is TXing a packet
+ * struct iwm_tx_resp - notifies that fw is TXing a packet
* ( IWM_REPLY_TX = 0x1c )
* @frame_count: 1 no aggregation, >1 aggregation
* @bt_kill_count: num of times blocked by bluetooth (unused for agg)
@@ -4532,9 +4532,9 @@ struct iwm_agg_tx_status {
* follow this one, up to frame_count.
*
* After the array of statuses comes the SSN of the SCD. Look at
- * %iwm_mvm_get_scd_ssn for more details.
+ * %iwm_get_scd_ssn for more details.
*/
-struct iwm_mvm_tx_resp {
+struct iwm_tx_resp {
uint8_t frame_count;
uint8_t bt_kill_count;
uint8_t failure_rts;
@@ -4560,7 +4560,7 @@ struct iwm_mvm_tx_resp {
} __packed; /* IWM_TX_RSP_API_S_VER_3 */
/**
- * struct iwm_mvm_ba_notif - notifies about reception of BA
+ * struct iwm_ba_notif - notifies about reception of BA
* ( IWM_BA_NOTIF = 0xc5 )
* @sta_addr_lo32: lower 32 bits of the MAC address
* @sta_addr_hi16: upper 16 bits of the MAC address
@@ -4573,7 +4573,7 @@ struct iwm_mvm_tx_resp {
* @txed: number of Txed frames in this batch
* @txed_2_done: number of Acked frames in this batch
*/
-struct iwm_mvm_ba_notif {
+struct iwm_ba_notif {
uint32_t sta_addr_lo32;
uint16_t sta_addr_hi16;
uint16_t reserved;
@@ -4607,7 +4607,7 @@ struct iwm_mac_beacon_cmd {
} __packed;
struct iwm_beacon_notif {
- struct iwm_mvm_tx_resp beacon_notify_hdr;
+ struct iwm_tx_resp beacon_notify_hdr;
uint64_t tsf;
uint32_t ibss_mgr_status;
} __packed;
@@ -4632,7 +4632,7 @@ struct iwm_tx_path_flush_cmd {
} __packed; /* IWM_TX_PATH_FLUSH_CMD_API_S_VER_1 */
/**
- * iwm_mvm_get_scd_ssn - returns the SSN of the SCD
+ * iwm_get_scd_ssn - returns the SSN of the SCD
* @tx_resp: the Tx response from the fw (agg or non-agg)
*
* When the fw sends an AMPDU, it fetches the MPDUs one after the other. Since
@@ -4644,7 +4644,7 @@ struct iwm_tx_path_flush_cmd {
* whole struct at a variable offset. This function knows how to cope with the
* variable offset and returns the SSN of the SCD.
*/
-static inline uint32_t iwm_mvm_get_scd_ssn(struct iwm_mvm_tx_resp *tx_resp)
+static inline uint32_t iwm_get_scd_ssn(struct iwm_tx_resp *tx_resp)
{
return le32_to_cpup((uint32_t *)&tx_resp->status +
tx_resp->frame_count) & 0xfff;
@@ -4658,7 +4658,7 @@ static inline uint32_t iwm_mvm_get_scd_ssn(struct iwm_mvm_tx_resp *tx_resp)
* @scd_queue: scheduler queue to confiug
* @enable: 1 queue enable, 0 queue disable
* @aggregate: 1 aggregated queue, 0 otherwise
- * @tx_fifo: %enum iwm_mvm_tx_fifo
+ * @tx_fifo: %enum iwm_tx_fifo
* @window: BA window size
* @ssn: SSN for the BA agreement
*/
@@ -4884,28 +4884,28 @@ struct iwm_scan_channel_opt {
/**
* LMAC scan flags
- * @IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL: pass all beacons and probe responses
+ * @IWM_LMAC_SCAN_FLAG_PASS_ALL: pass all beacons and probe responses
* without filtering.
- * @IWM_MVM_LMAC_SCAN_FLAG_PASSIVE: force passive scan on all channels
- * @IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION: single channel scan
- * @IWM_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE: send iteration complete notification
- * @IWM_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS multiple SSID matching
- * @IWM_MVM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented
- * @IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report
+ * @IWM_LMAC_SCAN_FLAG_PASSIVE: force passive scan on all channels
+ * @IWM_LMAC_SCAN_FLAG_PRE_CONNECTION: single channel scan
+ * @IWM_LMAC_SCAN_FLAG_ITER_COMPLETE: send iteration complete notification
+ * @IWM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS multiple SSID matching
+ * @IWM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented
+ * @IWM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report
* and DS parameter set IEs into probe requests.
- * @IWM_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL: use extended dwell time on channels
+ * @IWM_LMAC_SCAN_FLAG_EXTENDED_DWELL: use extended dwell time on channels
* 1, 6 and 11.
- * @IWM_MVM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
- */
-#define IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL (1 << 0)
-#define IWM_MVM_LMAC_SCAN_FLAG_PASSIVE (1 << 1)
-#define IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION (1 << 2)
-#define IWM_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE (1 << 3)
-#define IWM_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS (1 << 4)
-#define IWM_MVM_LMAC_SCAN_FLAG_FRAGMENTED (1 << 5)
-#define IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED (1 << 6)
-#define IWM_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL (1 << 7)
-#define IWM_MVM_LMAC_SCAN_FLAG_MATCH (1 << 9)
+ * @IWM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
+ */
+#define IWM_LMAC_SCAN_FLAG_PASS_ALL (1 << 0)
+#define IWM_LMAC_SCAN_FLAG_PASSIVE (1 << 1)
+#define IWM_LMAC_SCAN_FLAG_PRE_CONNECTION (1 << 2)
+#define IWM_LMAC_SCAN_FLAG_ITER_COMPLETE (1 << 3)
+#define IWM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS (1 << 4)
+#define IWM_LMAC_SCAN_FLAG_FRAGMENTED (1 << 5)
+#define IWM_LMAC_SCAN_FLAGS_RRM_ENABLED (1 << 6)
+#define IWM_LMAC_SCAN_FLAG_EXTENDED_DWELL (1 << 7)
+#define IWM_LMAC_SCAN_FLAG_MATCH (1 << 9)
#define IWM_SCAN_PRIORITY_LOW 0
#define IWM_SCAN_PRIORITY_MEDIUM 1
@@ -4921,7 +4921,7 @@ struct iwm_scan_channel_opt {
* @extended_dwell: dwell time for channels 1, 6 and 11 (in certain cases)
* @reserved2: for alignment and future use
* @rx_chain_selct: PHY_RX_CHAIN_* flags
- * @scan_flags: &enum iwm_mvm_lmac_scan_flags
+ * @scan_flags: &enum iwm_lmac_scan_flags
* @max_out_time: max time (in TU) to be out of associated channel
* @suspend_time: pause scan this long (TUs) when returning to service channel
* @flags: RXON flags
@@ -5330,10 +5330,10 @@ struct iwm_sched_scan_results {
/* UMAC Scan API */
/* The maximum of either of these cannot exceed 8, because we use an
- * 8-bit mask (see IWM_MVM_SCAN_MASK).
+ * 8-bit mask (see IWM_SCAN_MASK).
*/
-#define IWM_MVM_MAX_UMAC_SCANS 8
-#define IWM_MVM_MAX_LMAC_SCANS 1
+#define IWM_MAX_UMAC_SCANS 8
+#define IWM_MAX_LMAC_SCANS 1
#define IWM_SCAN_CONFIG_FLAG_ACTIVATE (1 << 0)
#define IWM_SCAN_CONFIG_FLAG_DEACTIVATE (1 << 1)
@@ -5791,7 +5791,7 @@ struct iwm_umac_scan_iter_complete_notif {
#define IWM_STA_KEY_LEN_WEP104 (13)
/**
- * struct iwm_mvm_keyinfo - key information
+ * struct iwm_keyinfo - key information
* @key_flags: type %iwm_sta_key_flag
* @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
* @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
@@ -5801,7 +5801,7 @@ struct iwm_umac_scan_iter_complete_notif {
* @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only
* @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only
*/
-struct iwm_mvm_keyinfo {
+struct iwm_keyinfo {
uint16_t key_flags;
uint8_t tkip_rx_tsc_byte2;
uint8_t reserved1;
@@ -5820,7 +5820,7 @@ struct iwm_mvm_keyinfo {
#define IWM_ADD_STA_BAID_SHIFT 8
/**
- * struct iwm_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
+ * struct iwm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
* ( REPLY_ADD_STA = 0x18 )
* @add_modify: 1: modify existing, 0: add new station
* @awake_acs:
@@ -5856,7 +5856,7 @@ struct iwm_mvm_keyinfo {
* ADD_STA sets up the table entry for one station, either creating a new
* entry, or modifying a pre-existing one.
*/
-struct iwm_mvm_add_sta_cmd_v7 {
+struct iwm_add_sta_cmd_v7 {
uint8_t add_modify;
uint8_t awake_acs;
uint16_t tid_disable_tx;
@@ -5879,7 +5879,7 @@ struct iwm_mvm_add_sta_cmd_v7 {
} __packed; /* ADD_STA_CMD_API_S_VER_7 */
/**
- * struct iwm_mvm_add_sta_key_cmd - add/modify sta key
+ * struct iwm_add_sta_key_cmd - add/modify sta key
* ( IWM_REPLY_ADD_STA_KEY = 0x17 )
* @sta_id: index of station in uCode's station table
* @key_offset: key offset in key storage
@@ -5890,7 +5890,7 @@ struct iwm_mvm_add_sta_cmd_v7 {
* @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
* @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
*/
-struct iwm_mvm_add_sta_key_cmd {
+struct iwm_add_sta_key_cmd {
uint8_t sta_id;
uint8_t key_offset;
uint16_t key_flags;
@@ -5916,17 +5916,17 @@ struct iwm_mvm_add_sta_key_cmd {
#define IWM_ADD_STA_MODIFY_NON_EXISTING_STA 0x8
/**
- * struct iwm_mvm_rm_sta_cmd - Add / modify a station in the fw's station table
+ * struct iwm_rm_sta_cmd - Add / modify a station in the fw's station table
* ( IWM_REMOVE_STA = 0x19 )
* @sta_id: the station id of the station to be removed
*/
-struct iwm_mvm_rm_sta_cmd {
+struct iwm_rm_sta_cmd {
uint8_t sta_id;
uint8_t reserved[3];
} __packed; /* IWM_REMOVE_STA_CMD_API_S_VER_2 */
/**
- * struct iwm_mvm_mgmt_mcast_key_cmd
+ * struct iwm_mgmt_mcast_key_cmd
* ( IWM_MGMT_MCAST_KEY = 0x1f )
* @ctrl_flags: %iwm_sta_key_flag
* @IGTK:
@@ -5936,7 +5936,7 @@ struct iwm_mvm_rm_sta_cmd {
* @key_id:
* @receive_seq_cnt: initial RSC/PN needed for replay check
*/
-struct iwm_mvm_mgmt_mcast_key_cmd {
+struct iwm_mgmt_mcast_key_cmd {
uint32_t ctrl_flags;
uint8_t IGTK[16];
uint8_t K1[16];
@@ -5946,7 +5946,7 @@ struct iwm_mvm_mgmt_mcast_key_cmd {
uint64_t receive_seq_cnt;
} __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_1 */
-struct iwm_mvm_wep_key {
+struct iwm_wep_key {
uint8_t key_index;
uint8_t key_offset;
uint16_t reserved1;
@@ -5955,13 +5955,13 @@ struct iwm_mvm_wep_key {
uint8_t key[16];
} __packed;
-struct iwm_mvm_wep_key_cmd {
+struct iwm_wep_key_cmd {
uint32_t mac_id_n_color;
uint8_t num_keys;
uint8_t decryption_type;
uint8_t flags;
uint8_t reserved;
- struct iwm_mvm_wep_key wep_key[0];
+ struct iwm_wep_key wep_key[0];
} __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */
/*
diff --git a/sys/dev/pci/if_iwmvar.h b/sys/dev/pci/if_iwmvar.h
index fa79dac72d3..89bdd5f825f 100644
--- a/sys/dev/pci/if_iwmvar.h
+++ b/sys/dev/pci/if_iwmvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwmvar.h,v 1.21 2016/09/04 18:49:21 stsp Exp $ */
+/* $OpenBSD: if_iwmvar.h,v 1.22 2016/09/10 09:32:33 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
@@ -303,8 +303,8 @@ struct iwm_ucode_status {
#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 16384
#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 32768
-#define IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 1000
-#define IWM_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS 400
+#define IWM_TE_SESSION_PROTECTION_MAX_TIME_MS 1000
+#define IWM_TE_SESSION_PROTECTION_MIN_TIME_MS 400
enum IWM_CMD_MODE {
IWM_CMD_ASYNC = (1 << 0),
@@ -336,7 +336,7 @@ struct iwm_int_sta {
uint32_t tfd_queue_msk;
};
-struct iwm_mvm_phy_ctxt {
+struct iwm_phy_ctxt {
uint16_t id;
uint16_t color;
uint32_t ref;
@@ -388,7 +388,7 @@ struct iwm_softc {
uint32_t sched_base;
/* TX/RX rings. */
- struct iwm_tx_ring txq[IWM_MVM_MAX_QUEUES];
+ struct iwm_tx_ring txq[IWM_MAX_QUEUES];
struct iwm_rx_ring rxq;
int qfullmsk;
@@ -476,7 +476,7 @@ struct iwm_softc {
struct iwm_int_sta sc_aux_sta;
/* phy contexts. we only use the first one */
- struct iwm_mvm_phy_ctxt sc_phyctxt[IWM_NUM_PHY_CTX];
+ struct iwm_phy_ctxt sc_phyctxt[IWM_NUM_PHY_CTX];
struct iwm_notif_statistics sc_stats;
int sc_noise;
@@ -504,7 +504,7 @@ struct iwm_softc {
struct iwm_node {
struct ieee80211_node in_ni;
- struct iwm_mvm_phy_ctxt *in_phyctxt;
+ struct iwm_phy_ctxt *in_phyctxt;
uint16_t in_id;
uint16_t in_color;