iwm(4): Remove _mvm from the namespace.
This was inherited from iwlwifi, which drives devices supported by both iwn(4) and iwm(4) in FreeBSD. In iwm(4) _mvm is meaningless, so remove it. OpenBSD made the same change a long time ago. No functional change intended. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
86ea3e8bb1
commit
e7065dd1e8
@ -231,10 +231,10 @@ struct iwm_nvm_section {
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
#define IWM_MVM_UCODE_ALIVE_TIMEOUT hz
|
||||
#define IWM_MVM_UCODE_CALIB_TIMEOUT (2*hz)
|
||||
#define IWM_UCODE_ALIVE_TIMEOUT hz
|
||||
#define IWM_UCODE_CALIB_TIMEOUT (2*hz)
|
||||
|
||||
struct iwm_mvm_alive_data {
|
||||
struct iwm_alive_data {
|
||||
int valid;
|
||||
uint32_t scd_base_addr;
|
||||
};
|
||||
@ -263,7 +263,7 @@ static void iwm_disable_interrupts(struct iwm_softc *);
|
||||
static void iwm_ict_reset(struct iwm_softc *);
|
||||
static int iwm_allow_mcast(struct ieee80211vap *, struct iwm_softc *);
|
||||
static void iwm_stop_device(struct iwm_softc *);
|
||||
static void iwm_mvm_nic_config(struct iwm_softc *);
|
||||
static void iwm_nic_config(struct iwm_softc *);
|
||||
static int iwm_nic_rx_init(struct iwm_softc *);
|
||||
static int iwm_nic_tx_init(struct iwm_softc *);
|
||||
static int iwm_nic_init(struct iwm_softc *);
|
||||
@ -317,23 +317,23 @@ static int iwm_pcie_load_given_ucode(struct iwm_softc *,
|
||||
static int iwm_start_fw(struct iwm_softc *, const struct iwm_fw_img *);
|
||||
static int iwm_send_tx_ant_cfg(struct iwm_softc *, uint8_t);
|
||||
static int iwm_send_phy_cfg_cmd(struct iwm_softc *);
|
||||
static int iwm_mvm_load_ucode_wait_alive(struct iwm_softc *,
|
||||
static int iwm_load_ucode_wait_alive(struct iwm_softc *,
|
||||
enum iwm_ucode_type);
|
||||
static int iwm_run_init_mvm_ucode(struct iwm_softc *, int);
|
||||
static int iwm_mvm_config_ltr(struct iwm_softc *sc);
|
||||
static int iwm_run_init_ucode(struct iwm_softc *, int);
|
||||
static int iwm_config_ltr(struct iwm_softc *sc);
|
||||
static int iwm_rx_addbuf(struct iwm_softc *, int, int);
|
||||
static void iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *,
|
||||
static void iwm_rx_rx_phy_cmd(struct iwm_softc *,
|
||||
struct iwm_rx_packet *);
|
||||
static int iwm_get_noise(struct iwm_softc *,
|
||||
const struct iwm_mvm_statistics_rx_non_phy *);
|
||||
static void iwm_mvm_handle_rx_statistics(struct iwm_softc *,
|
||||
const struct iwm_statistics_rx_non_phy *);
|
||||
static void iwm_handle_rx_statistics(struct iwm_softc *,
|
||||
struct iwm_rx_packet *);
|
||||
static bool iwm_mvm_rx_mpdu(struct iwm_softc *, struct mbuf *,
|
||||
static bool iwm_rx_mpdu(struct iwm_softc *, struct mbuf *,
|
||||
uint32_t, bool);
|
||||
static int iwm_mvm_rx_tx_cmd_single(struct iwm_softc *,
|
||||
static int iwm_rx_tx_cmd_single(struct iwm_softc *,
|
||||
struct iwm_rx_packet *,
|
||||
struct iwm_node *);
|
||||
static void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *);
|
||||
static void iwm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *);
|
||||
static void iwm_cmd_done(struct iwm_softc *, struct iwm_rx_packet *);
|
||||
#if 0
|
||||
static void iwm_update_sched(struct iwm_softc *, int, int, uint8_t,
|
||||
@ -346,7 +346,7 @@ static int iwm_tx(struct iwm_softc *, struct mbuf *,
|
||||
struct ieee80211_node *, int);
|
||||
static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *,
|
||||
const struct ieee80211_bpf_params *);
|
||||
static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *);
|
||||
static int iwm_update_quotas(struct iwm_softc *, struct iwm_vap *);
|
||||
static int iwm_auth(struct ieee80211vap *, struct iwm_softc *);
|
||||
static struct ieee80211_node *
|
||||
iwm_node_alloc(struct ieee80211vap *,
|
||||
@ -358,10 +358,10 @@ static int iwm_media_change(struct ifnet *);
|
||||
static int iwm_newstate(struct ieee80211vap *, enum ieee80211_state, int);
|
||||
static void iwm_endscan_cb(void *, int);
|
||||
static int iwm_send_bt_init_conf(struct iwm_softc *);
|
||||
static boolean_t iwm_mvm_is_lar_supported(struct iwm_softc *);
|
||||
static boolean_t iwm_mvm_is_wifi_mcc_supported(struct iwm_softc *);
|
||||
static boolean_t iwm_is_lar_supported(struct iwm_softc *);
|
||||
static boolean_t iwm_is_wifi_mcc_supported(struct iwm_softc *);
|
||||
static int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *);
|
||||
static void iwm_mvm_tt_tx_backoff(struct iwm_softc *, uint32_t);
|
||||
static void iwm_tt_tx_backoff(struct iwm_softc *, uint32_t);
|
||||
static int iwm_init_hw(struct iwm_softc *);
|
||||
static void iwm_init(struct iwm_softc *);
|
||||
static void iwm_start(struct iwm_softc *);
|
||||
@ -1093,7 +1093,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);
|
||||
@ -1106,7 +1106,7 @@ iwm_alloc_tx_ring(struct iwm_softc *sc, struct iwm_tx_ring *ring, int qid)
|
||||
ring->cmd = ring->cmd_dma.vaddr;
|
||||
|
||||
/* FW commands may require more mapped space than packets. */
|
||||
if (qid == IWM_MVM_CMD_QUEUE) {
|
||||
if (qid == IWM_CMD_QUEUE) {
|
||||
maxsize = IWM_RBUF_SIZE;
|
||||
nsegments = 1;
|
||||
} else {
|
||||
@ -1170,7 +1170,7 @@ iwm_reset_tx_ring(struct iwm_softc *sc, struct iwm_tx_ring *ring)
|
||||
ring->queued = 0;
|
||||
ring->cur = 0;
|
||||
|
||||
if (ring->qid == IWM_MVM_CMD_QUEUE && sc->cmd_hold_nic_awake)
|
||||
if (ring->qid == IWM_CMD_QUEUE && sc->cmd_hold_nic_awake)
|
||||
iwm_pcie_clear_cmd_in_flight(sc);
|
||||
}
|
||||
|
||||
@ -1359,11 +1359,11 @@ iwm_stop_device(struct iwm_softc *sc)
|
||||
|
||||
/* iwlwifi: mvm/ops.c */
|
||||
static 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;
|
||||
uint32_t phy_config = iwm_mvm_get_phy_config(sc);
|
||||
uint32_t phy_config = iwm_get_phy_config(sc);
|
||||
|
||||
radio_cfg_type = (phy_config & IWM_FW_PHY_CFG_RADIO_TYPE) >>
|
||||
IWM_FW_PHY_CFG_RADIO_TYPE_POS;
|
||||
@ -1572,7 +1572,7 @@ iwm_nic_init(struct iwm_softc *sc)
|
||||
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000)
|
||||
iwm_set_pwr(sc);
|
||||
|
||||
iwm_mvm_nic_config(sc);
|
||||
iwm_nic_config(sc);
|
||||
|
||||
if ((error = iwm_nic_rx_init(sc)) != 0)
|
||||
return error;
|
||||
@ -1605,7 +1605,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) {
|
||||
/* Disable the scheduler. */
|
||||
iwm_write_prph(sc, IWM_SCD_EN_CTRL, 0);
|
||||
|
||||
@ -1665,7 +1665,7 @@ iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo)
|
||||
cmd.aggregate = 0;
|
||||
cmd.window = IWM_FRAME_LIMIT;
|
||||
|
||||
error = iwm_mvm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, IWM_CMD_SYNC,
|
||||
error = iwm_send_cmd_pdu(sc, IWM_SCD_QUEUE_CFG, IWM_CMD_SYNC,
|
||||
sizeof(cmd), &cmd);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
@ -1726,7 +1726,7 @@ iwm_trans_pcie_fw_alive(struct iwm_softc *sc, uint32_t scd_base_addr)
|
||||
iwm_nic_unlock(sc);
|
||||
|
||||
/* enable command channel */
|
||||
error = iwm_enable_txq(sc, 0 /* unused */, IWM_MVM_CMD_QUEUE, 7);
|
||||
error = iwm_enable_txq(sc, 0 /* unused */, IWM_CMD_QUEUE, 7);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
@ -2788,7 +2788,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,
|
||||
IWM_CMD_SYNC, sizeof(tx_ant_cmd), &tx_ant_cmd);
|
||||
}
|
||||
|
||||
@ -2800,7 +2800,7 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *sc)
|
||||
enum iwm_ucode_type ucode_type = sc->cur_ucode;
|
||||
|
||||
/* Set parameters */
|
||||
phy_cfg_cmd.phy_cfg = htole32(iwm_mvm_get_phy_config(sc));
|
||||
phy_cfg_cmd.phy_cfg = htole32(iwm_get_phy_config(sc));
|
||||
phy_cfg_cmd.calib_control.event_trigger =
|
||||
sc->sc_default_calib[ucode_type].event_trigger;
|
||||
phy_cfg_cmd.calib_control.flow_trigger =
|
||||
@ -2808,16 +2808,16 @@ iwm_send_phy_cfg_cmd(struct iwm_softc *sc)
|
||||
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET,
|
||||
"Sending Phy CFG command: 0x%x\n", phy_cfg_cmd.phy_cfg);
|
||||
return iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONFIGURATION_CMD, IWM_CMD_SYNC,
|
||||
return iwm_send_cmd_pdu(sc, IWM_PHY_CONFIGURATION_CMD, IWM_CMD_SYNC,
|
||||
sizeof(phy_cfg_cmd), &phy_cfg_cmd);
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_alive_fn(struct iwm_softc *sc, struct iwm_rx_packet *pkt, void *data)
|
||||
{
|
||||
struct iwm_mvm_alive_data *alive_data = data;
|
||||
struct iwm_mvm_alive_resp_v3 *palive3;
|
||||
struct iwm_mvm_alive_resp *palive;
|
||||
struct iwm_alive_data *alive_data = data;
|
||||
struct iwm_alive_resp_v3 *palive3;
|
||||
struct iwm_alive_resp *palive;
|
||||
struct iwm_umac_alive *umac;
|
||||
struct iwm_lmac_alive *lmac1;
|
||||
struct iwm_lmac_alive *lmac2 = NULL;
|
||||
@ -2885,15 +2885,15 @@ iwm_wait_phy_db_entry(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static 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)
|
||||
{
|
||||
struct iwm_notification_wait alive_wait;
|
||||
struct iwm_mvm_alive_data alive_data;
|
||||
struct iwm_alive_data alive_data;
|
||||
const struct iwm_fw_img *fw;
|
||||
enum iwm_ucode_type old_type = sc->cur_ucode;
|
||||
int error;
|
||||
static const uint16_t alive_cmd[] = { IWM_MVM_ALIVE };
|
||||
static const uint16_t alive_cmd[] = { IWM_ALIVE };
|
||||
|
||||
fw = &sc->sc_fw.img[ucode_type];
|
||||
sc->cur_ucode = ucode_type;
|
||||
@ -2918,7 +2918,7 @@ iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc,
|
||||
*/
|
||||
IWM_UNLOCK(sc);
|
||||
error = iwm_wait_notification(sc->sc_notif_wait, &alive_wait,
|
||||
IWM_MVM_UCODE_ALIVE_TIMEOUT);
|
||||
IWM_UCODE_ALIVE_TIMEOUT);
|
||||
IWM_LOCK(sc);
|
||||
if (error) {
|
||||
if (sc->cfg->device_family >= IWM_DEVICE_FAMILY_8000) {
|
||||
@ -2981,7 +2981,7 @@ iwm_mvm_load_ucode_wait_alive(struct iwm_softc *sc,
|
||||
* follows iwlwifi/fw.c
|
||||
*/
|
||||
static int
|
||||
iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
|
||||
iwm_run_init_ucode(struct iwm_softc *sc, int justnvm)
|
||||
{
|
||||
struct iwm_notification_wait calib_wait;
|
||||
static const uint16_t init_complete[] = {
|
||||
@ -3005,7 +3005,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
|
||||
sc->sc_phy_db);
|
||||
|
||||
/* Will also start the device */
|
||||
ret = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_INIT);
|
||||
ret = iwm_load_ucode_wait_alive(sc, IWM_UCODE_INIT);
|
||||
if (ret) {
|
||||
device_printf(sc->sc_dev, "Failed to start INIT ucode: %d\n",
|
||||
ret);
|
||||
@ -3033,7 +3033,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
|
||||
}
|
||||
|
||||
/* Send TX valid antennas before triggering calibrations */
|
||||
ret = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc));
|
||||
ret = iwm_send_tx_ant_cfg(sc, iwm_get_valid_tx_ant(sc));
|
||||
if (ret) {
|
||||
device_printf(sc->sc_dev,
|
||||
"failed to send antennas before calibration: %d\n", ret);
|
||||
@ -3058,7 +3058,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc *sc, int justnvm)
|
||||
*/
|
||||
IWM_UNLOCK(sc);
|
||||
ret = iwm_wait_notification(sc->sc_notif_wait, &calib_wait,
|
||||
IWM_MVM_UCODE_CALIB_TIMEOUT);
|
||||
IWM_UCODE_CALIB_TIMEOUT);
|
||||
IWM_LOCK(sc);
|
||||
|
||||
|
||||
@ -3071,7 +3071,7 @@ out:
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_config_ltr(struct iwm_softc *sc)
|
||||
iwm_config_ltr(struct iwm_softc *sc)
|
||||
{
|
||||
struct iwm_ltr_config_cmd cmd = {
|
||||
.flags = htole32(IWM_LTR_CFG_FLAG_FEATURE_ENABLE),
|
||||
@ -3080,7 +3080,7 @@ iwm_mvm_config_ltr(struct iwm_softc *sc)
|
||||
if (!sc->sc_ltr_enabled)
|
||||
return 0;
|
||||
|
||||
return iwm_mvm_send_cmd_pdu(sc, IWM_LTR_CONFIG, 0, sizeof(cmd), &cmd);
|
||||
return iwm_send_cmd_pdu(sc, IWM_LTR_CONFIG, 0, sizeof(cmd), &cmd);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3136,7 +3136,7 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
iwm_rx_rx_phy_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
{
|
||||
struct iwm_rx_phy_info *phy_info = (void *)pkt->data;
|
||||
|
||||
@ -3150,7 +3150,7 @@ iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
*/
|
||||
static int
|
||||
iwm_get_noise(struct iwm_softc *sc,
|
||||
const struct iwm_mvm_statistics_rx_non_phy *stats)
|
||||
const struct iwm_statistics_rx_non_phy *stats)
|
||||
{
|
||||
int i, total, nbant, noise;
|
||||
|
||||
@ -3180,7 +3180,7 @@ iwm_get_noise(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_handle_rx_statistics(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
iwm_handle_rx_statistics(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
{
|
||||
struct iwm_notif_statistics_v10 *stats = (void *)&pkt->data;
|
||||
|
||||
@ -3190,13 +3190,13 @@ iwm_mvm_handle_rx_statistics(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
|
||||
/* iwlwifi: mvm/rx.c */
|
||||
/*
|
||||
* iwm_mvm_get_signal_strength - use new rx PHY INFO API
|
||||
* iwm_get_signal_strength - use new rx PHY INFO API
|
||||
* values are reported by the fw as positive values - need to negate
|
||||
* to obtain their dBM. Account for missing antennas by replacing 0
|
||||
* values by -256dBm: practically 0 power and a non-feasible 8 bit value.
|
||||
*/
|
||||
static int
|
||||
iwm_mvm_rx_get_signal_strength(struct iwm_softc *sc,
|
||||
iwm_rx_get_signal_strength(struct iwm_softc *sc,
|
||||
struct iwm_rx_phy_info *phy_info)
|
||||
{
|
||||
int energy_a, energy_b, energy_c, max_energy;
|
||||
@ -3223,7 +3223,7 @@ iwm_mvm_rx_get_signal_strength(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_rxmq_get_signal_strength(struct iwm_softc *sc,
|
||||
iwm_rxmq_get_signal_strength(struct iwm_softc *sc,
|
||||
struct iwm_rx_mpdu_desc *desc)
|
||||
{
|
||||
int energy_a, energy_b;
|
||||
@ -3236,12 +3236,12 @@ iwm_mvm_rxmq_get_signal_strength(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
/*
|
||||
* iwm_mvm_rx_rx_mpdu - IWM_REPLY_RX_MPDU_CMD handler
|
||||
* iwm_rx_rx_mpdu - IWM_REPLY_RX_MPDU_CMD handler
|
||||
*
|
||||
* Handles the actual data of the Rx packet from the fw
|
||||
*/
|
||||
static bool
|
||||
iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
iwm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
bool stolen)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
@ -3275,7 +3275,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
return false;
|
||||
}
|
||||
|
||||
rssi = iwm_mvm_rx_get_signal_strength(sc, phy_info);
|
||||
rssi = iwm_rx_get_signal_strength(sc, phy_info);
|
||||
|
||||
/* Map it to relative value */
|
||||
rssi = rssi - sc->sc_noise;
|
||||
@ -3354,7 +3354,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
}
|
||||
|
||||
static bool
|
||||
iwm_mvm_rx_mpdu_mq(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
iwm_rx_mpdu_mq(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
bool stolen)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
@ -3397,7 +3397,7 @@ iwm_mvm_rx_mpdu_mq(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
}
|
||||
|
||||
/* Map it to relative value */
|
||||
rssi = iwm_mvm_rxmq_get_signal_strength(sc, desc);
|
||||
rssi = iwm_rxmq_get_signal_strength(sc, desc);
|
||||
rssi = rssi - sc->sc_noise;
|
||||
|
||||
/* replenish ring for the buffer we're going to feed to the sharks */
|
||||
@ -3462,7 +3462,7 @@ iwm_mvm_rx_mpdu_mq(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
}
|
||||
|
||||
static bool
|
||||
iwm_mvm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
bool stolen)
|
||||
{
|
||||
struct ieee80211com *ic;
|
||||
@ -3473,8 +3473,8 @@ iwm_mvm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
ic = &sc->sc_ic;
|
||||
|
||||
ret = sc->cfg->mqrx_supported ?
|
||||
iwm_mvm_rx_mpdu_mq(sc, m, offset, stolen) :
|
||||
iwm_mvm_rx_rx_mpdu(sc, m, offset, stolen);
|
||||
iwm_rx_mpdu_mq(sc, m, offset, stolen) :
|
||||
iwm_rx_rx_mpdu(sc, m, offset, stolen);
|
||||
if (!ret) {
|
||||
counter_u64_add(ic->ic_ierrors, 1);
|
||||
return (ret);
|
||||
@ -3498,10 +3498,10 @@ iwm_mvm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset,
|
||||
}
|
||||
|
||||
static int
|
||||
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 iwm_mvm_tx_resp *tx_resp = (void *)pkt->data;
|
||||
struct iwm_tx_resp *tx_resp = (void *)pkt->data;
|
||||
struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs;
|
||||
struct ieee80211_node *ni = &in->in_ni;
|
||||
struct ieee80211vap *vap = ni->ni_vap;
|
||||
@ -3567,7 +3567,7 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
if (new_rate != 0 && new_rate != cur_rate) {
|
||||
struct iwm_node *in = IWM_NODE(vap->iv_bss);
|
||||
iwm_setrates(sc, in, rix);
|
||||
iwm_mvm_send_lq_cmd(sc, &in->in_lq, FALSE);
|
||||
iwm_send_lq_cmd(sc, &in->in_lq, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3575,7 +3575,7 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
iwm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
{
|
||||
struct iwm_cmd_header *cmd_hdr;
|
||||
struct iwm_tx_ring *ring;
|
||||
@ -3599,7 +3599,7 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
|
||||
sc->sc_tx_timer = 0;
|
||||
|
||||
status = iwm_mvm_rx_tx_cmd_single(sc, pkt, in);
|
||||
status = iwm_rx_tx_cmd_single(sc, pkt, in);
|
||||
|
||||
/* Unmap and free mbuf. */
|
||||
bus_dmamap_sync(ring->data_dmat, txd->map, BUS_DMASYNC_POSTWRITE);
|
||||
@ -3633,10 +3633,10 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
static 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. */
|
||||
}
|
||||
|
||||
@ -4047,7 +4047,7 @@ iwm_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
|
||||
* 3) wait for the transport queues to be empty
|
||||
*/
|
||||
int
|
||||
iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, uint32_t flags)
|
||||
iwm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, uint32_t flags)
|
||||
{
|
||||
int ret;
|
||||
struct iwm_tx_path_flush_cmd flush_cmd = {
|
||||
@ -4055,7 +4055,7 @@ iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, uint32_t flags)
|
||||
.flush_ctl = htole16(IWM_DUMP_TX_FIFO_FLUSH),
|
||||
};
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH, flags,
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_TXPATH_FLUSH, flags,
|
||||
sizeof(flush_cmd), &flush_cmd);
|
||||
if (ret)
|
||||
device_printf(sc->sc_dev,
|
||||
@ -4068,7 +4068,7 @@ iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, uint32_t flags)
|
||||
*/
|
||||
|
||||
static int
|
||||
iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
struct iwm_time_quota_cmd cmd;
|
||||
int i, idx, ret, num_active_macs, quota, quota_rem;
|
||||
@ -4090,7 +4090,7 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
|
||||
/*
|
||||
* 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;
|
||||
@ -4102,8 +4102,8 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
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++) {
|
||||
@ -4126,7 +4126,7 @@ iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
/* Give the remainder of the session to the first binding */
|
||||
cmd.quotas[0].quota = htole32(le32toh(cmd.quotas[0].quota) + quota_rem);
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_TIME_QUOTA_CMD, IWM_CMD_SYNC,
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_TIME_QUOTA_CMD, IWM_CMD_SYNC,
|
||||
sizeof(cmd), &cmd);
|
||||
if (ret)
|
||||
device_printf(sc->sc_dev,
|
||||
@ -4210,13 +4210,13 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
|
||||
* contexts that are required), let's do a dirty hack here.
|
||||
*/
|
||||
if (iv->is_uploaded) {
|
||||
if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) {
|
||||
if ((error = iwm_mac_ctxt_changed(sc, vap)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to update MAC\n", __func__);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
if ((error = iwm_mvm_mac_ctxt_add(sc, vap)) != 0) {
|
||||
if ((error = iwm_mac_ctxt_add(sc, vap)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to add MAC\n", __func__);
|
||||
goto out;
|
||||
@ -4224,7 +4224,7 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
|
||||
}
|
||||
sc->sc_firmware_state = 1;
|
||||
|
||||
if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0],
|
||||
if ((error = iwm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0],
|
||||
in->in_ni.ni_chan, 1, 1)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed update phy ctxt\n", __func__);
|
||||
@ -4232,7 +4232,7 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
|
||||
}
|
||||
iv->phy_ctxt = &sc->sc_phyctxt[0];
|
||||
|
||||
if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) {
|
||||
if ((error = iwm_binding_add_vif(sc, iv)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: binding update cmd\n", __func__);
|
||||
goto out;
|
||||
@ -4244,7 +4244,7 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
|
||||
* finished or is aborted.
|
||||
*/
|
||||
iv->ps_disabled = TRUE;
|
||||
error = iwm_mvm_power_update_mac(sc);
|
||||
error = iwm_power_update_mac(sc);
|
||||
iv->ps_disabled = FALSE;
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
@ -4252,7 +4252,7 @@ iwm_auth(struct ieee80211vap *vap, struct iwm_softc *sc)
|
||||
__func__);
|
||||
goto out;
|
||||
}
|
||||
if ((error = iwm_mvm_add_sta(sc, in)) != 0) {
|
||||
if ((error = iwm_add_sta(sc, in)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to add sta\n", __func__);
|
||||
goto out;
|
||||
@ -4264,8 +4264,8 @@ iwm_auth(struct ieee80211vap *vap, 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, iv, duration, 500 /* XXX magic number */, TRUE);
|
||||
duration = IWM_TE_SESSION_PROTECTION_MAX_TIME_MS;
|
||||
iwm_protect_session(sc, iv, duration, 500 /* XXX magic number */, TRUE);
|
||||
|
||||
error = 0;
|
||||
out:
|
||||
@ -4390,11 +4390,11 @@ iwm_setrates(struct iwm_softc *sc, struct iwm_node *in, int rix)
|
||||
|
||||
#if 0
|
||||
if (txant == 0)
|
||||
txant = iwm_mvm_get_valid_tx_ant(sc);
|
||||
txant = iwm_get_valid_tx_ant(sc);
|
||||
nextant = 1<<(ffs(txant)-1);
|
||||
txant &= ~nextant;
|
||||
#else
|
||||
nextant = iwm_mvm_get_valid_tx_ant(sc);
|
||||
nextant = iwm_get_valid_tx_ant(sc);
|
||||
#endif
|
||||
tab = iwm_rates[ridx].plcp;
|
||||
tab |= nextant << IWM_RATE_MCS_ANT_POS;
|
||||
@ -4445,8 +4445,8 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
ivp->iv_auth = 0;
|
||||
if (sc->sc_firmware_state == 3) {
|
||||
iwm_xmit_queue_drain(sc);
|
||||
// iwm_mvm_flush_tx_path(sc, 0xf, IWM_CMD_SYNC);
|
||||
error = iwm_mvm_rm_sta(sc, vap, TRUE);
|
||||
// iwm_flush_tx_path(sc, 0xf, IWM_CMD_SYNC);
|
||||
error = iwm_rm_sta(sc, vap, TRUE);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to remove station: %d\n",
|
||||
@ -4454,7 +4454,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
if (sc->sc_firmware_state == 3) {
|
||||
error = iwm_mvm_mac_ctxt_changed(sc, vap);
|
||||
error = iwm_mac_ctxt_changed(sc, vap);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to change mac context: %d\n",
|
||||
@ -4462,7 +4462,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
if (sc->sc_firmware_state == 3) {
|
||||
error = iwm_mvm_sf_update(sc, vap, FALSE);
|
||||
error = iwm_sf_update(sc, vap, FALSE);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to update smart FIFO: %d\n",
|
||||
@ -4470,7 +4470,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
if (sc->sc_firmware_state == 3) {
|
||||
error = iwm_mvm_rm_sta_id(sc, vap);
|
||||
error = iwm_rm_sta_id(sc, vap);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to remove station id: %d\n",
|
||||
@ -4478,7 +4478,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
if (sc->sc_firmware_state == 3) {
|
||||
error = iwm_mvm_update_quotas(sc, NULL);
|
||||
error = iwm_update_quotas(sc, NULL);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to update PHY quota: %d\n",
|
||||
@ -4487,7 +4487,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
if (sc->sc_firmware_state == 3) {
|
||||
/* XXX Might need to specify bssid correctly. */
|
||||
error = iwm_mvm_mac_ctxt_changed(sc, vap);
|
||||
error = iwm_mac_ctxt_changed(sc, vap);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to change mac context: %d\n",
|
||||
@ -4498,7 +4498,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
sc->sc_firmware_state = 2;
|
||||
}
|
||||
if (sc->sc_firmware_state > 1) {
|
||||
error = iwm_mvm_binding_remove_vif(sc, ivp);
|
||||
error = iwm_binding_remove_vif(sc, ivp);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to remove channel ctx: %d\n",
|
||||
@ -4510,7 +4510,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
ivp->phy_ctxt = NULL;
|
||||
if (sc->sc_firmware_state > 0) {
|
||||
error = iwm_mvm_mac_ctxt_changed(sc, vap);
|
||||
error = iwm_mac_ctxt_changed(sc, vap);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: Failed to change mac context: %d\n",
|
||||
@ -4518,7 +4518,7 @@ iwm_bring_down_firmware(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
}
|
||||
if (sc->sc_firmware_state > 0) {
|
||||
error = iwm_mvm_power_update_mac(sc);
|
||||
error = iwm_power_update_mac(sc);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to update power management\n",
|
||||
@ -4555,9 +4555,9 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
|
||||
}
|
||||
|
||||
if (vap->iv_state == IEEE80211_S_RUN && nstate != IEEE80211_S_RUN) {
|
||||
iwm_mvm_led_disable(sc);
|
||||
iwm_led_disable(sc);
|
||||
/* disable beacon filtering if we're hopping out of RUN */
|
||||
iwm_mvm_disable_beacon_filter(sc);
|
||||
iwm_disable_beacon_filter(sc);
|
||||
if (((in = IWM_NODE(vap->iv_bss)) != NULL))
|
||||
in->in_assoc = 0;
|
||||
}
|
||||
@ -4568,7 +4568,7 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
|
||||
(nstate == IEEE80211_S_INIT ||
|
||||
nstate == IEEE80211_S_SCAN ||
|
||||
nstate == IEEE80211_S_AUTH)) {
|
||||
iwm_mvm_stop_session_protection(sc, ivp);
|
||||
iwm_stop_session_protection(sc, ivp);
|
||||
}
|
||||
|
||||
if ((vap->iv_state == IEEE80211_S_RUN ||
|
||||
@ -4620,7 +4620,7 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
|
||||
in = IWM_NODE(vap->iv_bss);
|
||||
/* Update the association state, now we have it all */
|
||||
/* (eg associd comes in at this point */
|
||||
error = iwm_mvm_update_sta(sc, in);
|
||||
error = iwm_update_sta(sc, in);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to update STA\n", __func__);
|
||||
@ -4629,25 +4629,25 @@ iwm_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
|
||||
return error;
|
||||
}
|
||||
in->in_assoc = 1;
|
||||
error = iwm_mvm_mac_ctxt_changed(sc, vap);
|
||||
error = iwm_mac_ctxt_changed(sc, vap);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to update MAC: %d\n", __func__, error);
|
||||
}
|
||||
|
||||
iwm_mvm_sf_update(sc, vap, FALSE);
|
||||
iwm_mvm_enable_beacon_filter(sc, ivp);
|
||||
iwm_mvm_power_update_mac(sc);
|
||||
iwm_mvm_update_quotas(sc, ivp);
|
||||
iwm_sf_update(sc, vap, FALSE);
|
||||
iwm_enable_beacon_filter(sc, ivp);
|
||||
iwm_power_update_mac(sc);
|
||||
iwm_update_quotas(sc, ivp);
|
||||
int rix = ieee80211_ratectl_rate(&in->in_ni, NULL, 0);
|
||||
iwm_setrates(sc, in, rix);
|
||||
|
||||
if ((error = iwm_mvm_send_lq_cmd(sc, &in->in_lq, TRUE)) != 0) {
|
||||
if ((error = iwm_send_lq_cmd(sc, &in->in_lq, TRUE)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: IWM_LQ_CMD failed: %d\n", __func__, error);
|
||||
}
|
||||
|
||||
iwm_mvm_led_enable(sc);
|
||||
iwm_led_enable(sc);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -4680,12 +4680,12 @@ 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);
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
iwm_mvm_is_lar_supported(struct iwm_softc *sc)
|
||||
iwm_is_lar_supported(struct iwm_softc *sc)
|
||||
{
|
||||
boolean_t nvm_lar = sc->nvm_data->lar_enabled;
|
||||
boolean_t tlv_lar = iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_LAR_SUPPORT);
|
||||
@ -4704,7 +4704,7 @@ iwm_mvm_is_lar_supported(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
iwm_mvm_is_wifi_mcc_supported(struct iwm_softc *sc)
|
||||
iwm_is_wifi_mcc_supported(struct iwm_softc *sc)
|
||||
{
|
||||
return iwm_fw_has_api(sc, IWM_UCODE_TLV_API_WIFI_MCC_UPDATE) ||
|
||||
iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_LAR_MULTI_MCC);
|
||||
@ -4729,7 +4729,7 @@ iwm_send_update_mcc_cmd(struct iwm_softc *sc, const char *alpha2)
|
||||
#endif
|
||||
int resp_v2 = iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2);
|
||||
|
||||
if (!iwm_mvm_is_lar_supported(sc)) {
|
||||
if (!iwm_is_lar_supported(sc)) {
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_LAR, "%s: no LAR support\n",
|
||||
__func__);
|
||||
return 0;
|
||||
@ -4737,7 +4737,7 @@ iwm_send_update_mcc_cmd(struct iwm_softc *sc, const char *alpha2)
|
||||
|
||||
memset(&mcc_cmd, 0, sizeof(mcc_cmd));
|
||||
mcc_cmd.mcc = htole16(alpha2[0] << 8 | alpha2[1]);
|
||||
if (iwm_mvm_is_wifi_mcc_supported(sc))
|
||||
if (iwm_is_wifi_mcc_supported(sc))
|
||||
mcc_cmd.source_id = IWM_MCC_SOURCE_GET_CURRENT;
|
||||
else
|
||||
mcc_cmd.source_id = IWM_MCC_SOURCE_OLD_FW;
|
||||
@ -4783,7 +4783,7 @@ iwm_send_update_mcc_cmd(struct iwm_softc *sc, const char *alpha2)
|
||||
}
|
||||
|
||||
static 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,
|
||||
@ -4810,8 +4810,8 @@ iwm_init_hw(struct iwm_softc *sc)
|
||||
return error;
|
||||
}
|
||||
|
||||
if ((error = iwm_run_init_mvm_ucode(sc, 0)) != 0) {
|
||||
printf("iwm_run_init_mvm_ucode: failed %d\n", error);
|
||||
if ((error = iwm_run_init_ucode(sc, 0)) != 0) {
|
||||
printf("iwm_run_init_ucode: failed %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -4827,13 +4827,13 @@ iwm_init_hw(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
/* omstart, this time with the regular firmware */
|
||||
error = iwm_mvm_load_ucode_wait_alive(sc, IWM_UCODE_REGULAR);
|
||||
error = iwm_load_ucode_wait_alive(sc, IWM_UCODE_REGULAR);
|
||||
if (error) {
|
||||
device_printf(sc->sc_dev, "could not load firmware\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
error = iwm_mvm_sf_update(sc, NULL, FALSE);
|
||||
error = iwm_sf_update(sc, NULL, FALSE);
|
||||
if (error)
|
||||
device_printf(sc->sc_dev, "Failed to initialize Smart Fifo\n");
|
||||
|
||||
@ -4842,7 +4842,7 @@ iwm_init_hw(struct iwm_softc *sc)
|
||||
goto error;
|
||||
}
|
||||
|
||||
error = iwm_send_tx_ant_cfg(sc, iwm_mvm_get_valid_tx_ant(sc));
|
||||
error = iwm_send_tx_ant_cfg(sc, iwm_get_valid_tx_ant(sc));
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "antenna config failed\n");
|
||||
goto error;
|
||||
@ -4858,7 +4858,7 @@ iwm_init_hw(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
/* Add auxiliary station for scanning */
|
||||
if ((error = iwm_mvm_add_aux_sta(sc)) != 0) {
|
||||
if ((error = iwm_add_aux_sta(sc)) != 0) {
|
||||
device_printf(sc->sc_dev, "add_aux_sta failed\n");
|
||||
goto error;
|
||||
}
|
||||
@ -4869,19 +4869,19 @@ iwm_init_hw(struct iwm_softc *sc)
|
||||
* going to be overwritten in the other flows.
|
||||
* For now use the first channel we have.
|
||||
*/
|
||||
if ((error = iwm_mvm_phy_ctxt_add(sc,
|
||||
if ((error = iwm_phy_ctxt_add(sc,
|
||||
&sc->sc_phyctxt[i], &ic->ic_channels[1], 1, 1)) != 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Initialize tx backoffs to the minimum. */
|
||||
if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000)
|
||||
iwm_mvm_tt_tx_backoff(sc, 0);
|
||||
iwm_tt_tx_backoff(sc, 0);
|
||||
|
||||
if (iwm_mvm_config_ltr(sc) != 0)
|
||||
if (iwm_config_ltr(sc) != 0)
|
||||
device_printf(sc->sc_dev, "PCIe LTR configuration failed\n");
|
||||
|
||||
error = iwm_mvm_power_update_device(sc);
|
||||
error = iwm_power_update_device(sc);
|
||||
if (error)
|
||||
goto error;
|
||||
|
||||
@ -4889,19 +4889,19 @@ iwm_init_hw(struct iwm_softc *sc)
|
||||
goto error;
|
||||
|
||||
if (iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_UMAC_SCAN)) {
|
||||
if ((error = iwm_mvm_config_umac_scan(sc)) != 0)
|
||||
if ((error = iwm_config_umac_scan(sc)) != 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Enable Tx queues. */
|
||||
for (ac = 0; ac < WME_NUM_AC; ac++) {
|
||||
error = iwm_enable_txq(sc, IWM_STATION_ID, ac,
|
||||
iwm_mvm_ac_to_tx_fifo[ac]);
|
||||
iwm_ac_to_tx_fifo[ac]);
|
||||
if (error)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((error = iwm_mvm_disable_beacon_filter(sc)) != 0) {
|
||||
if ((error = iwm_disable_beacon_filter(sc)) != 0) {
|
||||
device_printf(sc->sc_dev, "failed to disable beacon filter\n");
|
||||
goto error;
|
||||
}
|
||||
@ -4932,7 +4932,7 @@ iwm_allow_mcast(struct ieee80211vap *vap, struct iwm_softc *sc)
|
||||
cmd->pass_all = 1;
|
||||
IEEE80211_ADDR_COPY(cmd->bssid, ni->ni_bssid);
|
||||
|
||||
error = iwm_mvm_send_cmd_pdu(sc, IWM_MCAST_FILTER_CMD,
|
||||
error = iwm_send_cmd_pdu(sc, IWM_MCAST_FILTER_CMD,
|
||||
IWM_CMD_SYNC, size, cmd);
|
||||
free(cmd, M_DEVBUF);
|
||||
|
||||
@ -5372,7 +5372,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
|
||||
switch (code) {
|
||||
case IWM_REPLY_RX_PHY_CMD:
|
||||
iwm_mvm_rx_rx_phy_cmd(sc, pkt);
|
||||
iwm_rx_rx_phy_cmd(sc, pkt);
|
||||
break;
|
||||
|
||||
case IWM_REPLY_RX_MPDU_CMD: {
|
||||
@ -5388,7 +5388,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
nextpkt->hdr.idx == 0) ||
|
||||
(nextpkt->len_n_flags ==
|
||||
htole32(IWM_FH_RSCSR_FRAME_INVALID))) {
|
||||
if (iwm_mvm_rx_mpdu(sc, m, offset, stolen)) {
|
||||
if (iwm_rx_mpdu(sc, m, offset, stolen)) {
|
||||
stolen = FALSE;
|
||||
/* Make sure we abort the loop */
|
||||
nextoff = maxoff;
|
||||
@ -5399,14 +5399,14 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
/*
|
||||
* Use m_copym instead of m_split, because that
|
||||
* makes it easier to keep a valid rx buffer in
|
||||
* the ring, when iwm_mvm_rx_mpdu() fails.
|
||||
* the ring, when iwm_rx_mpdu() fails.
|
||||
*
|
||||
* We need to start m_copym() at offset 0, to get the
|
||||
* M_PKTHDR flag preserved.
|
||||
*/
|
||||
m1 = m_copym(m, 0, M_COPYALL, M_NOWAIT);
|
||||
if (m1) {
|
||||
if (iwm_mvm_rx_mpdu(sc, m1, offset, stolen))
|
||||
if (iwm_rx_mpdu(sc, m1, offset, stolen))
|
||||
stolen = TRUE;
|
||||
else
|
||||
m_freem(m1);
|
||||
@ -5415,7 +5415,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
}
|
||||
|
||||
case IWM_TX_CMD:
|
||||
iwm_mvm_rx_tx_cmd(sc, pkt);
|
||||
iwm_rx_tx_cmd(sc, pkt);
|
||||
break;
|
||||
|
||||
case IWM_MISSED_BEACONS_NOTIFICATION: {
|
||||
@ -5460,14 +5460,14 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
case IWM_MFUART_LOAD_NOTIFICATION:
|
||||
break;
|
||||
|
||||
case IWM_MVM_ALIVE:
|
||||
case IWM_ALIVE:
|
||||
break;
|
||||
|
||||
case IWM_CALIB_RES_NOTIF_PHY_DB:
|
||||
break;
|
||||
|
||||
case IWM_STATISTICS_NOTIFICATION:
|
||||
iwm_mvm_handle_rx_statistics(sc, pkt);
|
||||
iwm_handle_rx_statistics(sc, pkt);
|
||||
break;
|
||||
|
||||
case IWM_NVM_ACCESS_CMD:
|
||||
@ -5548,7 +5548,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
break;
|
||||
|
||||
case IWM_SCAN_OFFLOAD_COMPLETE:
|
||||
iwm_mvm_rx_lmac_scan_complete_notif(sc, pkt);
|
||||
iwm_rx_lmac_scan_complete_notif(sc, pkt);
|
||||
if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) {
|
||||
sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING;
|
||||
ieee80211_runtask(ic, &sc->sc_es_task);
|
||||
@ -5562,7 +5562,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
}
|
||||
|
||||
case IWM_SCAN_COMPLETE_UMAC:
|
||||
iwm_mvm_rx_umac_scan_complete_notif(sc, pkt);
|
||||
iwm_rx_umac_scan_complete_notif(sc, pkt);
|
||||
if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) {
|
||||
sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING;
|
||||
ieee80211_runtask(ic, &sc->sc_es_task);
|
||||
@ -5591,7 +5591,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
|
||||
}
|
||||
|
||||
case IWM_TIME_EVENT_NOTIFICATION:
|
||||
iwm_mvm_rx_time_event_notif(sc, pkt);
|
||||
iwm_rx_time_event_notif(sc, pkt);
|
||||
break;
|
||||
|
||||
/*
|
||||
@ -5763,7 +5763,7 @@ iwm_intr(void *arg)
|
||||
#endif
|
||||
/* Dump driver status (TX and RX rings) while we're here. */
|
||||
device_printf(sc->sc_dev, "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];
|
||||
device_printf(sc->sc_dev,
|
||||
" tx ring %2d: qid=%-2d cur=%-3d "
|
||||
@ -6266,7 +6266,7 @@ iwm_wme_update(struct ieee80211com *ic)
|
||||
if (ivp->is_uploaded && vap->iv_bss != NULL) {
|
||||
in = IWM_NODE(vap->iv_bss);
|
||||
if (in->in_assoc) {
|
||||
if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) {
|
||||
if ((error = iwm_mac_ctxt_changed(sc, vap)) != 0) {
|
||||
device_printf(sc->sc_dev,
|
||||
"%s: failed to update MAC\n", __func__);
|
||||
}
|
||||
@ -6296,7 +6296,7 @@ iwm_preinit(void *arg)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
error = iwm_run_init_mvm_ucode(sc, 1);
|
||||
error = iwm_run_init_ucode(sc, 1);
|
||||
iwm_stop_device(sc);
|
||||
if (error) {
|
||||
IWM_UNLOCK(sc);
|
||||
@ -6439,9 +6439,9 @@ iwm_scan_start(struct ieee80211com *ic)
|
||||
"%s: Previous scan not completed yet\n", __func__);
|
||||
}
|
||||
if (iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_UMAC_SCAN))
|
||||
error = iwm_mvm_umac_scan(sc);
|
||||
error = iwm_umac_scan(sc);
|
||||
else
|
||||
error = iwm_mvm_lmac_scan(sc);
|
||||
error = iwm_lmac_scan(sc);
|
||||
if (error != 0) {
|
||||
device_printf(sc->sc_dev, "could not initiate scan\n");
|
||||
IWM_UNLOCK(sc);
|
||||
@ -6462,7 +6462,7 @@ iwm_scan_end(struct ieee80211com *ic)
|
||||
IWM_LOCK(sc);
|
||||
iwm_led_blink_stop(sc);
|
||||
if (vap->iv_state == IEEE80211_S_RUN)
|
||||
iwm_mvm_led_enable(sc);
|
||||
iwm_led_enable(sc);
|
||||
if (sc->sc_flags & IWM_FLAG_SCAN_RUNNING) {
|
||||
/*
|
||||
* Removing IWM_FLAG_SCAN_RUNNING now, is fine because
|
||||
@ -6470,7 +6470,7 @@ iwm_scan_end(struct ieee80211com *ic)
|
||||
* taskqueue.
|
||||
*/
|
||||
sc->sc_flags &= ~IWM_FLAG_SCAN_RUNNING;
|
||||
iwm_mvm_scan_stop_wait(sc);
|
||||
iwm_scan_stop_wait(sc);
|
||||
}
|
||||
IWM_UNLOCK(sc);
|
||||
|
||||
@ -6500,7 +6500,6 @@ iwm_scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell)
|
||||
static void
|
||||
iwm_scan_mindwell(struct ieee80211_scan_state *ss)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -146,21 +146,21 @@ __FBSDID("$FreeBSD$");
|
||||
* BEGIN iwlwifi/mvm/binding.c
|
||||
*/
|
||||
|
||||
struct iwm_mvm_iface_iterator_data {
|
||||
struct iwm_iface_iterator_data {
|
||||
int idx;
|
||||
|
||||
struct iwm_mvm_phy_ctxt *phyctxt;
|
||||
struct iwm_phy_ctxt *phyctxt;
|
||||
|
||||
uint16_t ids[IWM_MAX_MACS_IN_BINDING];
|
||||
int16_t colors[IWM_MAX_MACS_IN_BINDING];
|
||||
};
|
||||
|
||||
static int
|
||||
iwm_mvm_binding_cmd(struct iwm_softc *sc, uint32_t action,
|
||||
struct iwm_mvm_iface_iterator_data *data)
|
||||
iwm_binding_cmd(struct iwm_softc *sc, uint32_t action,
|
||||
struct iwm_iface_iterator_data *data)
|
||||
{
|
||||
struct iwm_binding_cmd cmd;
|
||||
struct iwm_mvm_phy_ctxt *phyctxt = data->phyctxt;
|
||||
struct iwm_phy_ctxt *phyctxt = data->phyctxt;
|
||||
int i, ret;
|
||||
uint32_t status;
|
||||
|
||||
@ -178,7 +178,7 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc, uint32_t action,
|
||||
data->colors[i]));
|
||||
|
||||
status = 0;
|
||||
ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_BINDING_CONTEXT_CMD,
|
||||
ret = iwm_send_cmd_pdu_status(sc, IWM_BINDING_CONTEXT_CMD,
|
||||
sizeof(cmd), &cmd, &status);
|
||||
if (ret) {
|
||||
device_printf(sc->sc_dev,
|
||||
@ -196,10 +196,10 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc, uint32_t action,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
struct iwm_mvm_phy_ctxt *phyctxt, boolean_t add)
|
||||
iwm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
struct iwm_phy_ctxt *phyctxt, boolean_t add)
|
||||
{
|
||||
struct iwm_mvm_iface_iterator_data data = {
|
||||
struct iwm_iface_iterator_data data = {
|
||||
.phyctxt = phyctxt,
|
||||
};
|
||||
uint32_t action;
|
||||
@ -215,11 +215,11 @@ iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
data.idx++;
|
||||
}
|
||||
|
||||
return iwm_mvm_binding_cmd(sc, action, &data);
|
||||
return iwm_binding_cmd(sc, action, &data);
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
if (!ivp->phy_ctxt)
|
||||
return EINVAL;
|
||||
@ -228,24 +228,24 @@ iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
* Update SF - Disable if needed. if this fails, SF might still be on
|
||||
* while many macs are bound, which is forbidden - so fail the binding.
|
||||
*/
|
||||
if (iwm_mvm_sf_update(sc, &ivp->iv_vap, FALSE))
|
||||
if (iwm_sf_update(sc, &ivp->iv_vap, FALSE))
|
||||
return EINVAL;
|
||||
|
||||
return iwm_mvm_binding_update(sc, ivp, ivp->phy_ctxt, TRUE);
|
||||
return iwm_binding_update(sc, ivp, ivp->phy_ctxt, TRUE);
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!ivp->phy_ctxt)
|
||||
return EINVAL;
|
||||
|
||||
ret = iwm_mvm_binding_update(sc, ivp, ivp->phy_ctxt, FALSE);
|
||||
ret = iwm_binding_update(sc, ivp, ivp->phy_ctxt, FALSE);
|
||||
|
||||
if (!ret) {
|
||||
if (iwm_mvm_sf_update(sc, &ivp->iv_vap, TRUE))
|
||||
if (iwm_sf_update(sc, &ivp->iv_vap, TRUE))
|
||||
device_printf(sc->sc_dev,
|
||||
"Failed to update SF state\n");
|
||||
}
|
||||
|
@ -105,7 +105,7 @@
|
||||
#ifndef __IF_IWM_BINDING_H__
|
||||
#define __IF_IWM_BINDING_H__
|
||||
|
||||
extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp);
|
||||
extern int iwm_mvm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp);
|
||||
extern int iwm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp);
|
||||
extern int iwm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp);
|
||||
|
||||
#endif /* __IF_IWM_BINDING_H__ */
|
||||
|
@ -76,79 +76,79 @@
|
||||
|
||||
/* <netproto/802_11/ieee80211_var.h> */
|
||||
|
||||
#define IWM_MVM_DEFAULT_PS_TX_DATA_TIMEOUT (100 * 1000)
|
||||
#define IWM_MVM_DEFAULT_PS_RX_DATA_TIMEOUT (100 * 1000)
|
||||
#define IWM_MVM_WOWLAN_PS_TX_DATA_TIMEOUT (10 * 1000)
|
||||
#define IWM_MVM_WOWLAN_PS_RX_DATA_TIMEOUT (10 * 1000)
|
||||
#define IWM_MVM_SHORT_PS_TX_DATA_TIMEOUT (2 * 1024) /* defined in TU */
|
||||
#define IWM_MVM_SHORT_PS_RX_DATA_TIMEOUT (40 * 1024) /* defined in TU */
|
||||
#define IWM_MVM_P2P_LOWLATENCY_PS_ENABLE 0
|
||||
#define IWM_MVM_UAPSD_RX_DATA_TIMEOUT (50 * 1000)
|
||||
#define IWM_MVM_UAPSD_TX_DATA_TIMEOUT (50 * 1000)
|
||||
#define IWM_DEFAULT_PS_TX_DATA_TIMEOUT (100 * 1000)
|
||||
#define IWM_DEFAULT_PS_RX_DATA_TIMEOUT (100 * 1000)
|
||||
#define IWM_WOWLAN_PS_TX_DATA_TIMEOUT (10 * 1000)
|
||||
#define IWM_WOWLAN_PS_RX_DATA_TIMEOUT (10 * 1000)
|
||||
#define IWM_SHORT_PS_TX_DATA_TIMEOUT (2 * 1024) /* defined in TU */
|
||||
#define IWM_SHORT_PS_RX_DATA_TIMEOUT (40 * 1024) /* defined in TU */
|
||||
#define IWM_P2P_LOWLATENCY_PS_ENABLE 0
|
||||
#define IWM_UAPSD_RX_DATA_TIMEOUT (50 * 1000)
|
||||
#define IWM_UAPSD_TX_DATA_TIMEOUT (50 * 1000)
|
||||
#ifdef notyet
|
||||
/* XXX Find corresponding values from net80211 */
|
||||
#define IWM_MVM_UAPSD_QUEUES (IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\
|
||||
#define IWM_UAPSD_QUEUES (IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\
|
||||
IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\
|
||||
IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\
|
||||
IEEE80211_WMM_IE_STA_QOSINFO_AC_BE)
|
||||
#endif
|
||||
#define IWM_MVM_PS_HEAVY_TX_THLD_PACKETS 20
|
||||
#define IWM_MVM_PS_HEAVY_RX_THLD_PACKETS 8
|
||||
#define IWM_MVM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS 30
|
||||
#define IWM_MVM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS 20
|
||||
#define IWM_MVM_PS_HEAVY_TX_THLD_PERCENT 50
|
||||
#define IWM_MVM_PS_HEAVY_RX_THLD_PERCENT 50
|
||||
#define IWM_MVM_PS_SNOOZE_INTERVAL 25
|
||||
#define IWM_MVM_PS_SNOOZE_WINDOW 50
|
||||
#define IWM_MVM_WOWLAN_PS_SNOOZE_WINDOW 25
|
||||
#define IWM_MVM_LOWLAT_QUOTA_MIN_PERCENT 64
|
||||
#define IWM_MVM_BT_COEX_EN_RED_TXP_THRESH 62
|
||||
#define IWM_MVM_BT_COEX_DIS_RED_TXP_THRESH 65
|
||||
#define IWM_MVM_BT_COEX_SYNC2SCO 1
|
||||
#define IWM_MVM_BT_COEX_CORUNNING 0
|
||||
#define IWM_MVM_BT_COEX_MPLUT 1
|
||||
#define IWM_MVM_BT_COEX_RRC 1
|
||||
#define IWM_MVM_BT_COEX_TTC 1
|
||||
#define IWM_MVM_BT_COEX_MPLUT_REG0 0x22002200
|
||||
#define IWM_MVM_BT_COEX_MPLUT_REG1 0x11118451
|
||||
#define IWM_MVM_BT_COEX_ANTENNA_COUPLING_THRS 30
|
||||
#define IWM_MVM_FW_MCAST_FILTER_PASS_ALL 0
|
||||
#define IWM_MVM_FW_BCAST_FILTER_PASS_ALL 0
|
||||
#define IWM_MVM_QUOTA_THRESHOLD 4
|
||||
#define IWM_MVM_RS_RSSI_BASED_INIT_RATE 0
|
||||
#define IWM_MVM_RS_80_20_FAR_RANGE_TWEAK 1
|
||||
#define IWM_MVM_TOF_IS_RESPONDER 0
|
||||
#define IWM_MVM_SW_TX_CSUM_OFFLOAD 0
|
||||
#define IWM_MVM_HW_CSUM_DISABLE 0
|
||||
#define IWM_MVM_COLLECT_FW_ERR_DUMP 1
|
||||
#define IWM_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE 1
|
||||
#define IWM_MVM_RS_HT_VHT_RETRIES_PER_RATE 2
|
||||
#define IWM_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW 1
|
||||
#define IWM_MVM_RS_INITIAL_MIMO_NUM_RATES 3
|
||||
#define IWM_MVM_RS_INITIAL_SISO_NUM_RATES 3
|
||||
#define IWM_MVM_RS_INITIAL_LEGACY_NUM_RATES 2
|
||||
#define IWM_MVM_RS_INITIAL_LEGACY_RETRIES 2
|
||||
#define IWM_MVM_RS_SECONDARY_LEGACY_RETRIES 1
|
||||
#define IWM_MVM_RS_SECONDARY_LEGACY_NUM_RATES 16
|
||||
#define IWM_MVM_RS_SECONDARY_SISO_NUM_RATES 3
|
||||
#define IWM_MVM_RS_SECONDARY_SISO_RETRIES 1
|
||||
#define IWM_MVM_RS_RATE_MIN_FAILURE_TH 3
|
||||
#define IWM_MVM_RS_RATE_MIN_SUCCESS_TH 8
|
||||
#define IWM_MVM_RS_STAY_IN_COLUMN_TIMEOUT 5 /* Seconds */
|
||||
#define IWM_MVM_RS_IDLE_TIMEOUT 5 /* Seconds */
|
||||
#define IWM_MVM_RS_MISSED_RATE_MAX 15
|
||||
#define IWM_MVM_RS_LEGACY_FAILURE_LIMIT 160
|
||||
#define IWM_MVM_RS_LEGACY_SUCCESS_LIMIT 480
|
||||
#define IWM_MVM_RS_LEGACY_TABLE_COUNT 160
|
||||
#define IWM_MVM_RS_NON_LEGACY_FAILURE_LIMIT 400
|
||||
#define IWM_MVM_RS_NON_LEGACY_SUCCESS_LIMIT 4500
|
||||
#define IWM_MVM_RS_NON_LEGACY_TABLE_COUNT 1500
|
||||
#define IWM_MVM_RS_SR_FORCE_DECREASE 15 /* percent */
|
||||
#define IWM_MVM_RS_SR_NO_DECREASE 85 /* percent */
|
||||
#define IWM_MVM_RS_AGG_TIME_LIMIT 4000 /* 4 msecs. valid 100-8000 */
|
||||
#define IWM_MVM_RS_AGG_DISABLE_START 3
|
||||
#define IWM_MVM_RS_TPC_SR_FORCE_INCREASE 75 /* percent */
|
||||
#define IWM_MVM_RS_TPC_SR_NO_INCREASE 85 /* percent */
|
||||
#define IWM_MVM_RS_TPC_TX_POWER_STEP 3
|
||||
#define IWM_PS_HEAVY_TX_THLD_PACKETS 20
|
||||
#define IWM_PS_HEAVY_RX_THLD_PACKETS 8
|
||||
#define IWM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS 30
|
||||
#define IWM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS 20
|
||||
#define IWM_PS_HEAVY_TX_THLD_PERCENT 50
|
||||
#define IWM_PS_HEAVY_RX_THLD_PERCENT 50
|
||||
#define IWM_PS_SNOOZE_INTERVAL 25
|
||||
#define IWM_PS_SNOOZE_WINDOW 50
|
||||
#define IWM_WOWLAN_PS_SNOOZE_WINDOW 25
|
||||
#define IWM_LOWLAT_QUOTA_MIN_PERCENT 64
|
||||
#define IWM_BT_COEX_EN_RED_TXP_THRESH 62
|
||||
#define IWM_BT_COEX_DIS_RED_TXP_THRESH 65
|
||||
#define IWM_BT_COEX_SYNC2SCO 1
|
||||
#define IWM_BT_COEX_CORUNNING 0
|
||||
#define IWM_BT_COEX_MPLUT 1
|
||||
#define IWM_BT_COEX_RRC 1
|
||||
#define IWM_BT_COEX_TTC 1
|
||||
#define IWM_BT_COEX_MPLUT_REG0 0x22002200
|
||||
#define IWM_BT_COEX_MPLUT_REG1 0x11118451
|
||||
#define IWM_BT_COEX_ANTENNA_COUPLING_THRS 30
|
||||
#define IWM_FW_MCAST_FILTER_PASS_ALL 0
|
||||
#define IWM_FW_BCAST_FILTER_PASS_ALL 0
|
||||
#define IWM_QUOTA_THRESHOLD 4
|
||||
#define IWM_RS_RSSI_BASED_INIT_RATE 0
|
||||
#define IWM_RS_80_20_FAR_RANGE_TWEAK 1
|
||||
#define IWM_TOF_IS_RESPONDER 0
|
||||
#define IWM_SW_TX_CSUM_OFFLOAD 0
|
||||
#define IWM_HW_CSUM_DISABLE 0
|
||||
#define IWM_COLLECT_FW_ERR_DUMP 1
|
||||
#define IWM_RS_NUM_TRY_BEFORE_ANT_TOGGLE 1
|
||||
#define IWM_RS_HT_VHT_RETRIES_PER_RATE 2
|
||||
#define IWM_RS_HT_VHT_RETRIES_PER_RATE_TW 1
|
||||
#define IWM_RS_INITIAL_MIMO_NUM_RATES 3
|
||||
#define IWM_RS_INITIAL_SISO_NUM_RATES 3
|
||||
#define IWM_RS_INITIAL_LEGACY_NUM_RATES 2
|
||||
#define IWM_RS_INITIAL_LEGACY_RETRIES 2
|
||||
#define IWM_RS_SECONDARY_LEGACY_RETRIES 1
|
||||
#define IWM_RS_SECONDARY_LEGACY_NUM_RATES 16
|
||||
#define IWM_RS_SECONDARY_SISO_NUM_RATES 3
|
||||
#define IWM_RS_SECONDARY_SISO_RETRIES 1
|
||||
#define IWM_RS_RATE_MIN_FAILURE_TH 3
|
||||
#define IWM_RS_RATE_MIN_SUCCESS_TH 8
|
||||
#define IWM_RS_STAY_IN_COLUMN_TIMEOUT 5 /* Seconds */
|
||||
#define IWM_RS_IDLE_TIMEOUT 5 /* Seconds */
|
||||
#define IWM_RS_MISSED_RATE_MAX 15
|
||||
#define IWM_RS_LEGACY_FAILURE_LIMIT 160
|
||||
#define IWM_RS_LEGACY_SUCCESS_LIMIT 480
|
||||
#define IWM_RS_LEGACY_TABLE_COUNT 160
|
||||
#define IWM_RS_NON_LEGACY_FAILURE_LIMIT 400
|
||||
#define IWM_RS_NON_LEGACY_SUCCESS_LIMIT 4500
|
||||
#define IWM_RS_NON_LEGACY_TABLE_COUNT 1500
|
||||
#define IWM_RS_SR_FORCE_DECREASE 15 /* percent */
|
||||
#define IWM_RS_SR_NO_DECREASE 85 /* percent */
|
||||
#define IWM_RS_AGG_TIME_LIMIT 4000 /* 4 msecs. valid 100-8000 */
|
||||
#define IWM_RS_AGG_DISABLE_START 3
|
||||
#define IWM_RS_TPC_SR_FORCE_INCREASE 75 /* percent */
|
||||
#define IWM_RS_TPC_SR_NO_INCREASE 85 /* percent */
|
||||
#define IWM_RS_TPC_TX_POWER_STEP 3
|
||||
|
||||
#endif /* __IF_IWM_CONSTANTS_H */
|
||||
|
@ -336,7 +336,7 @@ iwm_send_paging_cmd(struct iwm_softc *sc, const struct iwm_fw_img *fw)
|
||||
BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
|
||||
}
|
||||
|
||||
return iwm_mvm_send_cmd_pdu(sc, iwm_cmd_id(IWM_FW_PAGING_BLOCK_CMD,
|
||||
return iwm_send_cmd_pdu(sc, iwm_cmd_id(IWM_FW_PAGING_BLOCK_CMD,
|
||||
IWM_ALWAYS_LONG_GROUP, 0),
|
||||
0, sizeof(fw_paging_cmd), &fw_paging_cmd);
|
||||
}
|
||||
|
@ -139,20 +139,20 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
/* Set led register on */
|
||||
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);
|
||||
}
|
||||
|
||||
/* Set led register off */
|
||||
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);
|
||||
}
|
||||
|
||||
static 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);
|
||||
}
|
||||
@ -165,10 +165,10 @@ iwm_led_blink_timeout(void *arg)
|
||||
if (sc->sc_attached == 0)
|
||||
return;
|
||||
|
||||
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);
|
||||
|
||||
callout_reset(&sc->sc_led_blink_to, (200 * hz) / 1000,
|
||||
iwm_led_blink_timeout, sc);
|
||||
@ -184,5 +184,5 @@ void
|
||||
iwm_led_blink_stop(struct iwm_softc *sc)
|
||||
{
|
||||
callout_stop(&sc->sc_led_blink_to);
|
||||
iwm_mvm_led_disable(sc);
|
||||
iwm_led_disable(sc);
|
||||
}
|
||||
|
@ -91,8 +91,8 @@
|
||||
#ifndef __IF_IWM_LED_H__
|
||||
#define __IF_IWM_LED_H__
|
||||
|
||||
extern void iwm_mvm_led_enable(struct iwm_softc *);
|
||||
extern void iwm_mvm_led_disable(struct iwm_softc *);
|
||||
extern void iwm_led_enable(struct iwm_softc *);
|
||||
extern void iwm_led_disable(struct iwm_softc *);
|
||||
extern void iwm_led_blink_start(struct iwm_softc *);
|
||||
extern void iwm_led_blink_stop(struct iwm_softc *);
|
||||
|
||||
|
@ -161,15 +161,15 @@ __FBSDID("$FreeBSD$");
|
||||
* BEGIN mvm/mac-ctxt.c
|
||||
*/
|
||||
|
||||
const uint8_t iwm_mvm_ac_to_tx_fifo[] = {
|
||||
IWM_MVM_TX_FIFO_BE,
|
||||
IWM_MVM_TX_FIFO_BK,
|
||||
IWM_MVM_TX_FIFO_VI,
|
||||
IWM_MVM_TX_FIFO_VO,
|
||||
const uint8_t iwm_ac_to_tx_fifo[] = {
|
||||
IWM_TX_FIFO_BE,
|
||||
IWM_TX_FIFO_BK,
|
||||
IWM_TX_FIFO_VI,
|
||||
IWM_TX_FIFO_VO,
|
||||
};
|
||||
|
||||
static void
|
||||
iwm_mvm_ack_rates(struct iwm_softc *sc, int is2ghz,
|
||||
iwm_ack_rates(struct iwm_softc *sc, int is2ghz,
|
||||
int *cck_rates, int *ofdm_rates, struct iwm_node *in)
|
||||
{
|
||||
int lowest_present_ofdm = 100;
|
||||
@ -253,7 +253,7 @@ iwm_mvm_ack_rates(struct iwm_softc *sc, int is2ghz,
|
||||
}
|
||||
|
||||
static 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;
|
||||
@ -305,8 +305,8 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
|
||||
* XXX This workaround makes the firmware behave more correctly once
|
||||
* we are associated, regularly giving us statistics notifications,
|
||||
* as well as signaling missed beacons to us.
|
||||
* Since we only call iwm_mvm_mac_ctxt_add() and
|
||||
* iwm_mvm_mac_ctxt_changed() when already authenticating or
|
||||
* Since we only call iwm_mac_ctxt_add() and
|
||||
* iwm_mac_ctxt_changed() when already authenticating or
|
||||
* associating, ni->ni_bssid should always make sense here.
|
||||
*/
|
||||
if (ivp->iv_auth) {
|
||||
@ -325,7 +325,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
|
||||
} else {
|
||||
is2ghz = 1;
|
||||
}
|
||||
iwm_mvm_ack_rates(sc, is2ghz, &cck_ack_rates, &ofdm_ack_rates, in);
|
||||
iwm_ack_rates(sc, is2ghz, &cck_ack_rates, &ofdm_ack_rates, in);
|
||||
cmd->cck_rates = htole32(cck_ack_rates);
|
||||
cmd->ofdm_rates = htole32(ofdm_ack_rates);
|
||||
|
||||
@ -342,7 +342,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
|
||||
*/
|
||||
|
||||
for (i = 0; i < WME_NUM_AC; i++) {
|
||||
uint8_t txf = iwm_mvm_ac_to_tx_fifo[i];
|
||||
uint8_t txf = iwm_ac_to_tx_fifo[i];
|
||||
|
||||
cmd->ac[txf].cw_min = htole16(ivp->queue_params[i].cw_min);
|
||||
cmd->ac[txf].cw_max = htole16(ivp->queue_params[i].cw_max);
|
||||
@ -362,9 +362,9 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_softc *sc, struct iwm_node *in,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_mac_ctxt_send_cmd(struct iwm_softc *sc, struct iwm_mac_ctx_cmd *cmd)
|
||||
iwm_mac_ctxt_send_cmd(struct iwm_softc *sc, struct iwm_mac_ctx_cmd *cmd)
|
||||
{
|
||||
int ret = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_CONTEXT_CMD, IWM_CMD_SYNC,
|
||||
int ret = iwm_send_cmd_pdu(sc, IWM_MAC_CONTEXT_CMD, IWM_CMD_SYNC,
|
||||
sizeof(*cmd), cmd);
|
||||
if (ret)
|
||||
device_printf(sc->sc_dev,
|
||||
@ -377,7 +377,7 @@ iwm_mvm_mac_ctxt_send_cmd(struct iwm_softc *sc, struct iwm_mac_ctx_cmd *cmd)
|
||||
* Fill the specific data for mac context of type station or p2p client
|
||||
*/
|
||||
static 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;
|
||||
@ -444,15 +444,15 @@ iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *sc, struct iwm_node *in,
|
||||
"%s: ni_intval: %d, bi_reciprocal: %d, dtim_interval: %d, dtim_reciprocal: %d\n",
|
||||
__func__,
|
||||
ni->ni_intval,
|
||||
iwm_mvm_reciprocal(ni->ni_intval),
|
||||
iwm_reciprocal(ni->ni_intval),
|
||||
ni->ni_intval * dtim_period,
|
||||
iwm_mvm_reciprocal(ni->ni_intval * dtim_period));
|
||||
iwm_reciprocal(ni->ni_intval * dtim_period));
|
||||
|
||||
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 * dtim_period);
|
||||
ctxt_sta->dtim_reciprocal =
|
||||
htole32(iwm_mvm_reciprocal(ni->ni_intval * dtim_period));
|
||||
htole32(iwm_reciprocal(ni->ni_intval * dtim_period));
|
||||
|
||||
/* 10 = CONN_MAX_LISTEN_INTERVAL */
|
||||
ctxt_sta->listen_interval = htole32(10);
|
||||
@ -462,7 +462,7 @@ iwm_mvm_mac_ctxt_cmd_fill_sta(struct iwm_softc *sc, struct iwm_node *in,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_mac_ctxt_cmd_station(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
iwm_mac_ctxt_cmd_station(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
uint32_t action)
|
||||
{
|
||||
struct ieee80211_node *ni = vap->iv_bss;
|
||||
@ -473,7 +473,7 @@ iwm_mvm_mac_ctxt_cmd_station(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
"%s: called; action=%d\n", __func__, action);
|
||||
|
||||
/* Fill the common data for all mac context types */
|
||||
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 */
|
||||
@ -483,21 +483,21 @@ iwm_mvm_mac_ctxt_cmd_station(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
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_mac_ctxt_send_cmd(sc, &cmd);
|
||||
return iwm_mac_ctxt_send_cmd(sc, &cmd);
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_mac_ctx_send(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
iwm_mac_ctx_send(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
uint32_t action)
|
||||
{
|
||||
return iwm_mvm_mac_ctxt_cmd_station(sc, vap, action);
|
||||
return iwm_mac_ctxt_cmd_station(sc, vap, action);
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
iwm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
{
|
||||
struct iwm_vap *iv = IWM_VAP(vap);
|
||||
int ret;
|
||||
@ -508,7 +508,7 @@ iwm_mvm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
return (EIO);
|
||||
}
|
||||
|
||||
ret = iwm_mvm_mac_ctx_send(sc, vap, IWM_FW_CTXT_ACTION_ADD);
|
||||
ret = iwm_mac_ctx_send(sc, vap, IWM_FW_CTXT_ACTION_ADD);
|
||||
if (ret)
|
||||
return (ret);
|
||||
iv->is_uploaded = 1;
|
||||
@ -516,7 +516,7 @@ iwm_mvm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
iwm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
{
|
||||
struct iwm_vap *iv = IWM_VAP(vap);
|
||||
|
||||
@ -525,12 +525,12 @@ iwm_mvm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
__func__);
|
||||
return (EIO);
|
||||
}
|
||||
return iwm_mvm_mac_ctx_send(sc, vap, IWM_FW_CTXT_ACTION_MODIFY);
|
||||
return iwm_mac_ctx_send(sc, vap, IWM_FW_CTXT_ACTION_MODIFY);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int
|
||||
iwm_mvm_mac_ctxt_remove(struct iwm_softc *sc, struct iwm_node *in)
|
||||
iwm_mac_ctxt_remove(struct iwm_softc *sc, struct iwm_node *in)
|
||||
{
|
||||
struct iwm_mac_ctx_cmd cmd;
|
||||
int ret;
|
||||
@ -547,7 +547,7 @@ iwm_mvm_mac_ctxt_remove(struct iwm_softc *sc, struct iwm_node *in)
|
||||
IWM_DEFAULT_COLOR));
|
||||
cmd.action = htole32(IWM_FW_CTXT_ACTION_REMOVE);
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc,
|
||||
ret = iwm_send_cmd_pdu(sc,
|
||||
IWM_MAC_CONTEXT_CMD, IWM_CMD_SYNC, sizeof(cmd), &cmd);
|
||||
if (ret) {
|
||||
device_printf(sc->sc_dev,
|
||||
|
@ -106,10 +106,10 @@
|
||||
#ifndef __IF_IWM_MAC_CTXT_H__
|
||||
#define __IF_IWM_MAC_CTXT_H__
|
||||
|
||||
extern const uint8_t iwm_mvm_ac_to_tx_fifo[];
|
||||
extern const uint8_t iwm_ac_to_tx_fifo[];
|
||||
|
||||
extern int iwm_mvm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
extern int iwm_mvm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
extern int iwm_mvm_mac_ctxt_remove(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
extern int iwm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
extern int iwm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
extern int iwm_mac_ctxt_remove(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
|
||||
#endif /* __IF_IWM_MAC_CTXT_H__ */
|
||||
|
@ -165,7 +165,7 @@ __FBSDID("$FreeBSD$");
|
||||
* Construct the generic fields of the PHY context command
|
||||
*/
|
||||
static 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));
|
||||
@ -188,7 +188,7 @@ iwm_mvm_phy_ctxt_cmd_hdr(struct iwm_softc *sc, struct iwm_mvm_phy_ctxt *ctxt,
|
||||
* Add the phy configuration to the PHY context command
|
||||
*/
|
||||
static 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)
|
||||
{
|
||||
@ -203,8 +203,8 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *sc,
|
||||
ieee80211_chan2ieee(ic, chan),
|
||||
chains_static,
|
||||
chains_dynamic,
|
||||
iwm_mvm_get_valid_rx_ant(sc),
|
||||
iwm_mvm_get_valid_tx_ant(sc));
|
||||
iwm_get_valid_rx_ant(sc),
|
||||
iwm_get_valid_tx_ant(sc));
|
||||
|
||||
|
||||
cmd->ci.band = IEEE80211_IS_CHAN_2GHZ(chan) ?
|
||||
@ -225,18 +225,18 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *sc,
|
||||
* between the two antennas is sufficiently different to impact
|
||||
* performance.
|
||||
*/
|
||||
if (active_cnt == 1 && iwm_mvm_rx_diversity_allowed(sc)) {
|
||||
if (active_cnt == 1 && iwm_rx_diversity_allowed(sc)) {
|
||||
idle_cnt = 2;
|
||||
active_cnt = 2;
|
||||
}
|
||||
|
||||
cmd->rxchain_info = htole32(iwm_mvm_get_valid_rx_ant(sc) <<
|
||||
cmd->rxchain_info = htole32(iwm_get_valid_rx_ant(sc) <<
|
||||
IWM_PHY_RX_CHAIN_VALID_POS);
|
||||
cmd->rxchain_info |= htole32(idle_cnt << IWM_PHY_RX_CHAIN_CNT_POS);
|
||||
cmd->rxchain_info |= htole32(active_cnt <<
|
||||
IWM_PHY_RX_CHAIN_MIMO_CNT_POS);
|
||||
|
||||
cmd->txchain_info = htole32(iwm_mvm_get_valid_tx_ant(sc));
|
||||
cmd->txchain_info = htole32(iwm_get_valid_tx_ant(sc));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -246,8 +246,8 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_softc *sc,
|
||||
* configuration changed from the previous apply.
|
||||
*/
|
||||
static int
|
||||
iwm_mvm_phy_ctxt_apply(struct iwm_softc *sc,
|
||||
struct iwm_mvm_phy_ctxt *ctxt,
|
||||
iwm_phy_ctxt_apply(struct iwm_softc *sc,
|
||||
struct iwm_phy_ctxt *ctxt,
|
||||
uint8_t chains_static, uint8_t chains_dynamic,
|
||||
uint32_t action, uint32_t apply_time)
|
||||
{
|
||||
@ -260,13 +260,13 @@ iwm_mvm_phy_ctxt_apply(struct iwm_softc *sc,
|
||||
ctxt->channel);
|
||||
|
||||
/* Set the command header fields */
|
||||
iwm_mvm_phy_ctxt_cmd_hdr(sc, ctxt, &cmd, action, apply_time);
|
||||
iwm_phy_ctxt_cmd_hdr(sc, ctxt, &cmd, action, apply_time);
|
||||
|
||||
/* Set the command data */
|
||||
iwm_mvm_phy_ctxt_cmd_data(sc, &cmd, ctxt->channel,
|
||||
iwm_phy_ctxt_cmd_data(sc, &cmd, ctxt->channel,
|
||||
chains_static, chains_dynamic);
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_PHY_CONTEXT_CMD, IWM_CMD_SYNC,
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_PHY_CONTEXT_CMD, IWM_CMD_SYNC,
|
||||
sizeof(struct iwm_phy_context_cmd), &cmd);
|
||||
if (ret) {
|
||||
device_printf(sc->sc_dev,
|
||||
@ -279,7 +279,7 @@ iwm_mvm_phy_ctxt_apply(struct iwm_softc *sc,
|
||||
* Send a command to add a PHY context based on the current HW configuration.
|
||||
*/
|
||||
int
|
||||
iwm_mvm_phy_ctxt_add(struct iwm_softc *sc, struct iwm_mvm_phy_ctxt *ctxt,
|
||||
iwm_phy_ctxt_add(struct iwm_softc *sc, struct iwm_phy_ctxt *ctxt,
|
||||
struct ieee80211_channel *chan,
|
||||
uint8_t chains_static, uint8_t chains_dynamic)
|
||||
{
|
||||
@ -290,7 +290,7 @@ iwm_mvm_phy_ctxt_add(struct iwm_softc *sc, struct iwm_mvm_phy_ctxt *ctxt,
|
||||
__func__,
|
||||
ieee80211_chan2ieee(&sc->sc_ic, chan));
|
||||
|
||||
return iwm_mvm_phy_ctxt_apply(sc, ctxt,
|
||||
return iwm_phy_ctxt_apply(sc, ctxt,
|
||||
chains_static, chains_dynamic, IWM_FW_CTXT_ACTION_ADD, 0);
|
||||
}
|
||||
|
||||
@ -300,8 +300,8 @@ iwm_mvm_phy_ctxt_add(struct iwm_softc *sc, struct iwm_mvm_phy_ctxt *ctxt,
|
||||
* changed.
|
||||
*/
|
||||
int
|
||||
iwm_mvm_phy_ctxt_changed(struct iwm_softc *sc,
|
||||
struct iwm_mvm_phy_ctxt *ctxt, struct ieee80211_channel *chan,
|
||||
iwm_phy_ctxt_changed(struct iwm_softc *sc,
|
||||
struct iwm_phy_ctxt *ctxt, struct ieee80211_channel *chan,
|
||||
uint8_t chains_static, uint8_t chains_dynamic)
|
||||
{
|
||||
ctxt->channel = chan;
|
||||
@ -311,7 +311,7 @@ iwm_mvm_phy_ctxt_changed(struct iwm_softc *sc,
|
||||
__func__,
|
||||
ieee80211_chan2ieee(&sc->sc_ic, chan));
|
||||
|
||||
return iwm_mvm_phy_ctxt_apply(sc, ctxt,
|
||||
return iwm_phy_ctxt_apply(sc, ctxt,
|
||||
chains_static, chains_dynamic, IWM_FW_CTXT_ACTION_MODIFY, 0);
|
||||
}
|
||||
|
||||
|
@ -106,12 +106,12 @@
|
||||
#ifndef __IF_IWM_PHY_CTXT_H__
|
||||
#define __IF_IWM_PHY_CTXT_H__
|
||||
|
||||
extern int iwm_mvm_phy_ctxt_add(struct iwm_softc *sc,
|
||||
struct iwm_mvm_phy_ctxt *ctxt,
|
||||
extern int iwm_phy_ctxt_add(struct iwm_softc *sc,
|
||||
struct iwm_phy_ctxt *ctxt,
|
||||
struct ieee80211_channel *chan,
|
||||
uint8_t chains_static, uint8_t chains_dynamic);
|
||||
extern int iwm_mvm_phy_ctxt_changed(struct iwm_softc *sc,
|
||||
struct iwm_mvm_phy_ctxt *ctxt, struct ieee80211_channel *chan,
|
||||
extern int iwm_phy_ctxt_changed(struct iwm_softc *sc,
|
||||
struct iwm_phy_ctxt *ctxt, struct ieee80211_channel *chan,
|
||||
uint8_t chains_static, uint8_t chains_dynamic);
|
||||
|
||||
#endif /* __IF_IWM_PHY_CTXT_H__ */
|
||||
|
@ -153,12 +153,12 @@ TUNABLE_INT("hw.iwm.power_scheme", &iwm_power_scheme);
|
||||
#define IWM_POWER_KEEP_ALIVE_PERIOD_SEC 25
|
||||
|
||||
static 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)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD,
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD,
|
||||
0, sizeof(struct iwm_beacon_filter_cmd), cmd);
|
||||
|
||||
if (!ret) {
|
||||
@ -200,14 +200,14 @@ iwm_mvm_beacon_filter_send_cmd(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *sc,
|
||||
iwm_beacon_filter_set_cqm_params(struct iwm_softc *sc,
|
||||
struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd)
|
||||
{
|
||||
cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled);
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_power_log(struct iwm_softc *sc, struct iwm_mac_power_cmd *cmd)
|
||||
iwm_power_log(struct iwm_softc *sc, struct iwm_mac_power_cmd *cmd)
|
||||
{
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD,
|
||||
"Sending power table command on mac id 0x%X for "
|
||||
@ -232,7 +232,7 @@ iwm_mvm_power_log(struct iwm_softc *sc, struct iwm_mac_power_cmd *cmd)
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
iwm_mvm_power_is_radar(struct iwm_softc *sc)
|
||||
iwm_power_is_radar(struct iwm_softc *sc)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct ieee80211_channel *chan;
|
||||
@ -248,7 +248,7 @@ iwm_mvm_power_is_radar(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_power_config_skip_dtim(struct iwm_softc *sc,
|
||||
iwm_power_config_skip_dtim(struct iwm_softc *sc,
|
||||
struct iwm_mac_power_cmd *cmd)
|
||||
{
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
@ -260,7 +260,7 @@ iwm_mvm_power_config_skip_dtim(struct iwm_softc *sc,
|
||||
cmd->skip_dtim_periods = 0;
|
||||
cmd->flags &= ~htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK);
|
||||
|
||||
if (iwm_mvm_power_is_radar(sc))
|
||||
if (iwm_power_is_radar(sc))
|
||||
return;
|
||||
|
||||
if (dtimper >= 10)
|
||||
@ -278,7 +278,7 @@ iwm_mvm_power_config_skip_dtim(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static void
|
||||
iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
iwm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
struct iwm_mac_power_cmd *cmd)
|
||||
{
|
||||
struct ieee80211vap *vap = &ivp->iv_vap;
|
||||
@ -317,34 +317,34 @@ iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
|
||||
cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK);
|
||||
|
||||
iwm_mvm_power_config_skip_dtim(sc, cmd);
|
||||
iwm_power_config_skip_dtim(sc, cmd);
|
||||
|
||||
cmd->rx_data_timeout =
|
||||
htole32(IWM_MVM_DEFAULT_PS_RX_DATA_TIMEOUT);
|
||||
htole32(IWM_DEFAULT_PS_RX_DATA_TIMEOUT);
|
||||
cmd->tx_data_timeout =
|
||||
htole32(IWM_MVM_DEFAULT_PS_TX_DATA_TIMEOUT);
|
||||
htole32(IWM_DEFAULT_PS_TX_DATA_TIMEOUT);
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_power_send_cmd(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
struct iwm_mac_power_cmd cmd = {};
|
||||
|
||||
iwm_mvm_power_build_cmd(sc, ivp, &cmd);
|
||||
iwm_mvm_power_log(sc, &cmd);
|
||||
iwm_power_build_cmd(sc, ivp, &cmd);
|
||||
iwm_power_log(sc, &cmd);
|
||||
|
||||
return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0,
|
||||
return iwm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0,
|
||||
sizeof(cmd), &cmd);
|
||||
}
|
||||
|
||||
static int
|
||||
_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
_iwm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
struct iwm_beacon_filter_cmd *cmd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
iwm_mvm_beacon_filter_set_cqm_params(sc, ivp, cmd);
|
||||
ret = iwm_mvm_beacon_filter_send_cmd(sc, cmd);
|
||||
iwm_beacon_filter_set_cqm_params(sc, ivp, cmd);
|
||||
ret = iwm_beacon_filter_send_cmd(sc, cmd);
|
||||
|
||||
if (!ret)
|
||||
sc->sc_bf.bf_enabled = 1;
|
||||
@ -353,23 +353,23 @@ _iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
struct iwm_beacon_filter_cmd cmd = {
|
||||
IWM_BF_CMD_CONFIG_DEFAULTS,
|
||||
.bf_enable_beacon_filter = htole32(1),
|
||||
};
|
||||
|
||||
return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd);
|
||||
return _iwm_enable_beacon_filter(sc, ivp, &cmd);
|
||||
}
|
||||
|
||||
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 ret;
|
||||
|
||||
ret = iwm_mvm_beacon_filter_send_cmd(sc, &cmd);
|
||||
ret = iwm_beacon_filter_send_cmd(sc, &cmd);
|
||||
if (ret == 0)
|
||||
sc->sc_bf.bf_enabled = 0;
|
||||
|
||||
@ -377,7 +377,7 @@ iwm_mvm_disable_beacon_filter(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_power_set_ps(struct iwm_softc *sc)
|
||||
iwm_power_set_ps(struct iwm_softc *sc)
|
||||
{
|
||||
struct ieee80211vap *vap;
|
||||
boolean_t disable_ps;
|
||||
@ -397,7 +397,7 @@ iwm_mvm_power_set_ps(struct iwm_softc *sc)
|
||||
boolean_t old_ps_disabled = sc->sc_ps_disabled;
|
||||
|
||||
sc->sc_ps_disabled = disable_ps;
|
||||
ret = iwm_mvm_power_update_device(sc);
|
||||
ret = iwm_power_update_device(sc);
|
||||
if (ret) {
|
||||
sc->sc_ps_disabled = old_ps_disabled;
|
||||
return ret;
|
||||
@ -408,7 +408,7 @@ iwm_mvm_power_set_ps(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_power_set_ba(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
struct iwm_beacon_filter_cmd cmd = {
|
||||
IWM_BF_CMD_CONFIG_DEFAULTS,
|
||||
@ -427,49 +427,49 @@ iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
}
|
||||
sc->sc_bf.ba_enabled = !sc->sc_ps_disabled && bss_conf_ps;
|
||||
|
||||
return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd);
|
||||
return _iwm_enable_beacon_filter(sc, ivp, &cmd);
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_power_update_ps(struct iwm_softc *sc)
|
||||
iwm_power_update_ps(struct iwm_softc *sc)
|
||||
{
|
||||
struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps);
|
||||
int ret;
|
||||
|
||||
ret = iwm_mvm_power_set_ps(sc);
|
||||
ret = iwm_power_set_ps(sc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (vap != NULL)
|
||||
return iwm_mvm_power_set_ba(sc, IWM_VAP(vap));
|
||||
return iwm_power_set_ba(sc, IWM_VAP(vap));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_power_update_mac(struct iwm_softc *sc)
|
||||
iwm_power_update_mac(struct iwm_softc *sc)
|
||||
{
|
||||
struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps);
|
||||
int ret;
|
||||
|
||||
ret = iwm_mvm_power_set_ps(sc);
|
||||
ret = iwm_power_set_ps(sc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (vap != NULL) {
|
||||
ret = iwm_mvm_power_send_cmd(sc, IWM_VAP(vap));
|
||||
ret = iwm_power_send_cmd(sc, IWM_VAP(vap));
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (vap != NULL)
|
||||
return iwm_mvm_power_set_ba(sc, IWM_VAP(vap));
|
||||
return iwm_power_set_ba(sc, IWM_VAP(vap));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
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 = 0,
|
||||
@ -484,6 +484,6 @@ iwm_mvm_power_update_device(struct iwm_softc *sc)
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD,
|
||||
"Sending device power command with flags = 0x%X\n", cmd.flags);
|
||||
|
||||
return iwm_mvm_send_cmd_pdu(sc,
|
||||
return iwm_send_cmd_pdu(sc,
|
||||
IWM_POWER_TABLE_CMD, 0, sizeof(cmd), &cmd);
|
||||
}
|
||||
|
@ -90,11 +90,11 @@
|
||||
#ifndef __IF_IWM_POWER_H__
|
||||
#define __IF_IWM_POWER_H__
|
||||
|
||||
extern int iwm_mvm_power_update_device(struct iwm_softc *sc);
|
||||
extern int iwm_mvm_power_update_mac(struct iwm_softc *sc);
|
||||
extern int iwm_mvm_power_update_ps(struct iwm_softc *sc);
|
||||
extern int iwm_mvm_enable_beacon_filter(struct iwm_softc *sc,
|
||||
extern int iwm_power_update_device(struct iwm_softc *sc);
|
||||
extern int iwm_power_update_mac(struct iwm_softc *sc);
|
||||
extern int iwm_power_update_ps(struct iwm_softc *sc);
|
||||
extern int iwm_enable_beacon_filter(struct iwm_softc *sc,
|
||||
struct iwm_vap *ivp);
|
||||
extern int iwm_mvm_disable_beacon_filter(struct iwm_softc *sc);
|
||||
extern int iwm_disable_beacon_filter(struct iwm_softc *sc);
|
||||
|
||||
#endif /* __IF_IWM_POWER_H__ */
|
||||
|
@ -166,12 +166,12 @@ __FBSDID("$FreeBSD$");
|
||||
#define IWM_SPARSE_EBS_SCAN_RATIO 1
|
||||
|
||||
static 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;
|
||||
|
||||
rx_ant = iwm_mvm_get_valid_rx_ant(sc);
|
||||
rx_ant = iwm_get_valid_rx_ant(sc);
|
||||
rx_chain = rx_ant << IWM_PHY_RX_CHAIN_VALID_POS;
|
||||
rx_chain |= rx_ant << IWM_PHY_RX_CHAIN_FORCE_MIMO_SEL_POS;
|
||||
rx_chain |= rx_ant << IWM_PHY_RX_CHAIN_FORCE_SEL_POS;
|
||||
@ -180,7 +180,7 @@ iwm_mvm_scan_rx_chain(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
iwm_mvm_scan_rxon_flags(struct ieee80211_channel *c)
|
||||
iwm_scan_rxon_flags(struct ieee80211_channel *c)
|
||||
{
|
||||
if (IEEE80211_IS_CHAN_2GHZ(c))
|
||||
return htole32(IWM_PHY_BAND_24);
|
||||
@ -189,7 +189,7 @@ iwm_mvm_scan_rxon_flags(struct ieee80211_channel *c)
|
||||
}
|
||||
|
||||
static 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;
|
||||
@ -197,7 +197,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_softc *sc, int flags, int no_cck)
|
||||
for (i = 0, ind = sc->sc_scan_last_antenna;
|
||||
i < IWM_RATE_MCS_ANT_NUM; i++) {
|
||||
ind = (ind + 1) % IWM_RATE_MCS_ANT_NUM;
|
||||
if (iwm_mvm_get_valid_tx_ant(sc) & (1 << ind)) {
|
||||
if (iwm_get_valid_tx_ant(sc) & (1 << ind)) {
|
||||
sc->sc_scan_last_antenna = ind;
|
||||
break;
|
||||
}
|
||||
@ -212,7 +212,7 @@ iwm_mvm_scan_rate_n_flags(struct iwm_softc *sc, int flags, int no_cck)
|
||||
}
|
||||
|
||||
static inline boolean_t
|
||||
iwm_mvm_rrm_scan_needed(struct iwm_softc *sc)
|
||||
iwm_rrm_scan_needed(struct iwm_softc *sc)
|
||||
{
|
||||
/* require rrm scan whenever the fw supports it */
|
||||
return iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT);
|
||||
@ -220,7 +220,7 @@ iwm_mvm_rrm_scan_needed(struct iwm_softc *sc)
|
||||
|
||||
#ifdef IWM_DEBUG
|
||||
static const char *
|
||||
iwm_mvm_ebs_status_str(enum iwm_scan_ebs_status status)
|
||||
iwm_ebs_status_str(enum iwm_scan_ebs_status status)
|
||||
{
|
||||
switch (status) {
|
||||
case IWM_SCAN_EBS_SUCCESS:
|
||||
@ -235,14 +235,14 @@ iwm_mvm_ebs_status_str(enum iwm_scan_ebs_status status)
|
||||
}
|
||||
|
||||
static const char *
|
||||
iwm_mvm_offload_status_str(enum iwm_scan_offload_complete_status status)
|
||||
iwm_offload_status_str(enum iwm_scan_offload_complete_status status)
|
||||
{
|
||||
return (status == IWM_SCAN_OFFLOAD_ABORTED) ? "aborted" : "completed";
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
iwm_mvm_rx_lmac_scan_complete_notif(struct iwm_softc *sc,
|
||||
iwm_rx_lmac_scan_complete_notif(struct iwm_softc *sc,
|
||||
struct iwm_rx_packet *pkt)
|
||||
{
|
||||
struct iwm_periodic_scan_complete *scan_notif = (void *)pkt->data;
|
||||
@ -258,8 +258,8 @@ iwm_mvm_rx_lmac_scan_complete_notif(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Regular scan %s, EBS status %s (FW)\n",
|
||||
iwm_mvm_offload_status_str(scan_notif->status),
|
||||
iwm_mvm_ebs_status_str(scan_notif->ebs_status));
|
||||
iwm_offload_status_str(scan_notif->status),
|
||||
iwm_ebs_status_str(scan_notif->ebs_status));
|
||||
|
||||
sc->last_ebs_successful =
|
||||
scan_notif->ebs_status == IWM_SCAN_EBS_SUCCESS ||
|
||||
@ -268,7 +268,7 @@ iwm_mvm_rx_lmac_scan_complete_notif(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
void
|
||||
iwm_mvm_rx_umac_scan_complete_notif(struct iwm_softc *sc,
|
||||
iwm_rx_umac_scan_complete_notif(struct iwm_softc *sc,
|
||||
struct iwm_rx_packet *pkt)
|
||||
{
|
||||
struct iwm_umac_scan_complete *notif = (void *)pkt->data;
|
||||
@ -276,8 +276,8 @@ iwm_mvm_rx_umac_scan_complete_notif(struct iwm_softc *sc,
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_SCAN,
|
||||
"Scan completed, uid %u, status %s, EBS status %s\n",
|
||||
le32toh(notif->uid),
|
||||
iwm_mvm_offload_status_str(notif->status),
|
||||
iwm_mvm_ebs_status_str(notif->ebs_status));
|
||||
iwm_offload_status_str(notif->status),
|
||||
iwm_ebs_status_str(notif->ebs_status));
|
||||
|
||||
if (notif->ebs_status != IWM_SCAN_EBS_SUCCESS &&
|
||||
notif->ebs_status != IWM_SCAN_EBS_INACTIVE)
|
||||
@ -285,7 +285,7 @@ iwm_mvm_rx_umac_scan_complete_notif(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_scan_skip_channel(struct ieee80211_channel *c)
|
||||
iwm_scan_skip_channel(struct ieee80211_channel *c)
|
||||
{
|
||||
if (IEEE80211_IS_CHAN_2GHZ(c) && IEEE80211_IS_CHAN_B(c))
|
||||
return 0;
|
||||
@ -296,7 +296,7 @@ iwm_mvm_scan_skip_channel(struct ieee80211_channel *c)
|
||||
}
|
||||
|
||||
static 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;
|
||||
@ -340,7 +340,7 @@ iwm_mvm_lmac_scan_fill_channels(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static 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;
|
||||
@ -379,7 +379,7 @@ iwm_mvm_umac_scan_fill_channels(struct iwm_softc *sc,
|
||||
}
|
||||
|
||||
static 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 ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
|
||||
@ -431,7 +431,7 @@ iwm_mvm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq)
|
||||
preq->band_data[0].len = htole16(frm - pos);
|
||||
remain -= frm - pos;
|
||||
|
||||
if (iwm_mvm_rrm_scan_needed(sc)) {
|
||||
if (iwm_rrm_scan_needed(sc)) {
|
||||
if (remain < 3)
|
||||
return ENOBUFS;
|
||||
*frm++ = IEEE80211_ELEMID_DSPARMS;
|
||||
@ -475,7 +475,7 @@ iwm_mvm_fill_probe_req(struct iwm_softc *sc, struct iwm_scan_probe_req *preq)
|
||||
}
|
||||
|
||||
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 ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
|
||||
@ -502,8 +502,8 @@ iwm_mvm_config_umac_scan(struct iwm_softc *sc)
|
||||
if (scan_config == NULL)
|
||||
return ENOMEM;
|
||||
|
||||
scan_config->tx_chains = htole32(iwm_mvm_get_valid_tx_ant(sc));
|
||||
scan_config->rx_chains = htole32(iwm_mvm_get_valid_rx_ant(sc));
|
||||
scan_config->tx_chains = htole32(iwm_get_valid_tx_ant(sc));
|
||||
scan_config->rx_chains = htole32(iwm_get_valid_rx_ant(sc));
|
||||
scan_config->legacy_rates = htole32(rates |
|
||||
IWM_SCAN_CONFIG_SUPPORTED_RATE(rates));
|
||||
|
||||
@ -533,7 +533,7 @@ iwm_mvm_config_umac_scan(struct iwm_softc *sc)
|
||||
* Catch other channels, in case we have 900MHz channels or
|
||||
* something in the chanlist.
|
||||
*/
|
||||
if (iwm_mvm_scan_skip_channel(c))
|
||||
if (iwm_scan_skip_channel(c))
|
||||
continue;
|
||||
scan_config->channel_array[nchan++] =
|
||||
ieee80211_mhz2ieee(c->ic_freq, 0);
|
||||
@ -566,7 +566,7 @@ iwm_mvm_config_umac_scan(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
iwm_mvm_scan_use_ebs(struct iwm_softc *sc)
|
||||
iwm_scan_use_ebs(struct iwm_softc *sc)
|
||||
{
|
||||
const struct iwm_ucode_capabilities *capa = &sc->sc_fw.ucode_capa;
|
||||
|
||||
@ -581,7 +581,7 @@ iwm_mvm_scan_use_ebs(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_scan_size(struct iwm_softc *sc)
|
||||
iwm_scan_size(struct iwm_softc *sc)
|
||||
{
|
||||
int base_size;
|
||||
|
||||
@ -604,7 +604,7 @@ iwm_mvm_scan_size(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
iwm_umac_scan(struct iwm_softc *sc)
|
||||
{
|
||||
struct iwm_host_cmd hcmd = {
|
||||
.id = iwm_cmd_id(IWM_SCAN_REQ_UMAC, IWM_ALWAYS_LONG_GROUP, 0),
|
||||
@ -620,7 +620,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
uint8_t channel_flags, i, nssid;
|
||||
int ret;
|
||||
|
||||
req_len = iwm_mvm_scan_size(sc);
|
||||
req_len = iwm_scan_size(sc);
|
||||
if (req_len > IWM_MAX_CMD_PAYLOAD_SIZE)
|
||||
return ENOMEM;
|
||||
req = malloc(req_len, M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
@ -638,7 +638,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
IWM_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE;
|
||||
if (!iwm_fw_has_api(sc, IWM_UCODE_TLV_API_ADAPTIVE_DWELL))
|
||||
general_flags |= IWM_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL;
|
||||
if (iwm_mvm_rrm_scan_needed(sc))
|
||||
if (iwm_rrm_scan_needed(sc))
|
||||
general_flags |= IWM_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED;
|
||||
if (nssid != 0)
|
||||
general_flags |= IWM_UMAC_SCAN_GEN_FLAGS_PRE_CONNECT;
|
||||
@ -646,7 +646,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
general_flags |= IWM_UMAC_SCAN_GEN_FLAGS_PASSIVE;
|
||||
|
||||
channel_flags = 0;
|
||||
if (iwm_mvm_scan_use_ebs(sc))
|
||||
if (iwm_scan_use_ebs(sc))
|
||||
channel_flags = IWM_SCAN_CHANNEL_FLAG_EBS |
|
||||
IWM_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
||||
IWM_SCAN_CHANNEL_FLAG_CACHE_ADD;
|
||||
@ -664,7 +664,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
req->v7.adwell_max_budget = htole16(300);
|
||||
req->v7.scan_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
|
||||
req->v7.channel.flags = channel_flags;
|
||||
req->v7.channel.count = iwm_mvm_umac_scan_fill_channels(sc,
|
||||
req->v7.channel.count = iwm_umac_scan_fill_channels(sc,
|
||||
(struct iwm_scan_channel_cfg_umac *)req->v7.data, nssid);
|
||||
|
||||
tail = (void *)((char *)&req->v7.data +
|
||||
@ -677,7 +677,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
req->v1.extended_dwell = 90;
|
||||
req->v1.scan_priority = htole32(IWM_SCAN_PRIORITY_HIGH);
|
||||
req->v1.channel.flags = channel_flags;
|
||||
req->v1.channel.count = iwm_mvm_umac_scan_fill_channels(sc,
|
||||
req->v1.channel.count = iwm_umac_scan_fill_channels(sc,
|
||||
(struct iwm_scan_channel_cfg_umac *)req->v1.data, nssid);
|
||||
|
||||
tail = (void *)((char *)&req->v1.data +
|
||||
@ -695,7 +695,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
/* XXX debug */
|
||||
}
|
||||
|
||||
ret = iwm_mvm_fill_probe_req(sc, &tail->preq);
|
||||
ret = iwm_fill_probe_req(sc, &tail->preq);
|
||||
if (ret) {
|
||||
free(req, M_DEVBUF);
|
||||
return ret;
|
||||
@ -714,7 +714,7 @@ iwm_mvm_umac_scan(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_lmac_scan(struct iwm_softc *sc)
|
||||
iwm_lmac_scan(struct iwm_softc *sc)
|
||||
{
|
||||
struct iwm_host_cmd hcmd = {
|
||||
.id = IWM_SCAN_OFFLOAD_REQUEST_CMD,
|
||||
@ -731,7 +731,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_SCAN,
|
||||
"Handling ieee80211 scan request\n");
|
||||
|
||||
req_len = iwm_mvm_scan_size(sc);
|
||||
req_len = iwm_scan_size(sc);
|
||||
if (req_len > IWM_MAX_CMD_PAYLOAD_SIZE)
|
||||
return ENOMEM;
|
||||
req = malloc(req_len, M_DEVBUF, M_NOWAIT | M_ZERO);
|
||||
@ -750,17 +750,17 @@ 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);
|
||||
if (iwm_mvm_rrm_scan_needed(sc))
|
||||
req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED);
|
||||
req->scan_flags = htole32(IWM_LMAC_SCAN_FLAG_PASS_ALL |
|
||||
IWM_LMAC_SCAN_FLAG_ITER_COMPLETE |
|
||||
IWM_LMAC_SCAN_FLAG_EXTENDED_DWELL);
|
||||
if (iwm_rrm_scan_needed(sc))
|
||||
req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAGS_RRM_ENABLED);
|
||||
|
||||
req->flags = iwm_mvm_scan_rxon_flags(sc->sc_ic.ic_scan->ss_chans[0]);
|
||||
req->flags = iwm_scan_rxon_flags(sc->sc_ic.ic_scan->ss_chans[0]);
|
||||
|
||||
req->filter_flags =
|
||||
htole32(IWM_MAC_FILTER_ACCEPT_GRP | IWM_MAC_FILTER_IN_BEACON);
|
||||
@ -769,14 +769,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. */
|
||||
@ -791,14 +791,14 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
|
||||
}
|
||||
if (nssid != 0) {
|
||||
req->scan_flags |=
|
||||
htole32(IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION);
|
||||
htole32(IWM_LMAC_SCAN_FLAG_PRE_CONNECTION);
|
||||
} else
|
||||
req->scan_flags |= htole32(IWM_MVM_LMAC_SCAN_FLAG_PASSIVE);
|
||||
req->scan_flags |= htole32(IWM_LMAC_SCAN_FLAG_PASSIVE);
|
||||
|
||||
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, nssid);
|
||||
|
||||
ret = iwm_mvm_fill_probe_req(sc,
|
||||
ret = iwm_fill_probe_req(sc,
|
||||
(struct iwm_scan_probe_req *)(req->data +
|
||||
(sizeof(struct iwm_scan_channel_cfg_lmac) *
|
||||
sc->sc_fw.ucode_capa.n_scan_channels)));
|
||||
@ -811,7 +811,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
|
||||
req->schedule[0].iterations = 1;
|
||||
req->schedule[0].full_scan_mul = 1;
|
||||
|
||||
if (iwm_mvm_scan_use_ebs(sc)) {
|
||||
if (iwm_scan_use_ebs(sc)) {
|
||||
req->channel_opt[0].flags =
|
||||
htole16(IWM_SCAN_CHANNEL_FLAG_EBS |
|
||||
IWM_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
||||
@ -836,7 +836,7 @@ iwm_mvm_lmac_scan(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_lmac_scan_abort(struct iwm_softc *sc)
|
||||
iwm_lmac_scan_abort(struct iwm_softc *sc)
|
||||
{
|
||||
int ret;
|
||||
struct iwm_host_cmd hcmd = {
|
||||
@ -847,7 +847,7 @@ iwm_mvm_lmac_scan_abort(struct iwm_softc *sc)
|
||||
};
|
||||
uint32_t status;
|
||||
|
||||
ret = iwm_mvm_send_cmd_status(sc, &hcmd, &status);
|
||||
ret = iwm_send_cmd_status(sc, &hcmd, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -868,7 +868,7 @@ iwm_mvm_lmac_scan_abort(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_umac_scan_abort(struct iwm_softc *sc)
|
||||
iwm_umac_scan_abort(struct iwm_softc *sc)
|
||||
{
|
||||
struct iwm_umac_scan_abort cmd = {};
|
||||
int uid, ret;
|
||||
@ -878,7 +878,7 @@ iwm_mvm_umac_scan_abort(struct iwm_softc *sc)
|
||||
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Sending scan abort, uid %u\n", uid);
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc,
|
||||
ret = iwm_send_cmd_pdu(sc,
|
||||
iwm_cmd_id(IWM_SCAN_ABORT_UMAC,
|
||||
IWM_ALWAYS_LONG_GROUP, 0),
|
||||
0, sizeof(cmd), &cmd);
|
||||
@ -887,7 +887,7 @@ iwm_mvm_umac_scan_abort(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_scan_stop_wait(struct iwm_softc *sc)
|
||||
iwm_scan_stop_wait(struct iwm_softc *sc)
|
||||
{
|
||||
struct iwm_notification_wait wait_scan_done;
|
||||
static const uint16_t scan_done_notif[] = { IWM_SCAN_COMPLETE_UMAC,
|
||||
@ -901,9 +901,9 @@ iwm_mvm_scan_stop_wait(struct iwm_softc *sc)
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "Preparing to stop scan\n");
|
||||
|
||||
if (iwm_fw_has_capa(sc, IWM_UCODE_TLV_CAPA_UMAC_SCAN))
|
||||
ret = iwm_mvm_umac_scan_abort(sc);
|
||||
ret = iwm_umac_scan_abort(sc);
|
||||
else
|
||||
ret = iwm_mvm_lmac_scan_abort(sc);
|
||||
ret = iwm_lmac_scan_abort(sc);
|
||||
|
||||
if (ret) {
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "couldn't stop scan\n");
|
||||
|
@ -106,13 +106,13 @@
|
||||
#ifndef __IF_IWN_SCAN_H__
|
||||
#define __IF_IWN_SCAN_H__
|
||||
|
||||
extern int iwm_mvm_lmac_scan(struct iwm_softc *);
|
||||
extern int iwm_mvm_config_umac_scan(struct iwm_softc *);
|
||||
extern int iwm_mvm_umac_scan(struct iwm_softc *);
|
||||
extern int iwm_mvm_scan_stop_wait(struct iwm_softc *);
|
||||
extern void iwm_mvm_rx_lmac_scan_complete_notif(struct iwm_softc *,
|
||||
extern int iwm_lmac_scan(struct iwm_softc *);
|
||||
extern int iwm_config_umac_scan(struct iwm_softc *);
|
||||
extern int iwm_umac_scan(struct iwm_softc *);
|
||||
extern int iwm_scan_stop_wait(struct iwm_softc *);
|
||||
extern void iwm_rx_lmac_scan_complete_notif(struct iwm_softc *,
|
||||
struct iwm_rx_packet *);
|
||||
extern void iwm_mvm_rx_umac_scan_complete_notif(struct iwm_softc *,
|
||||
extern void iwm_rx_umac_scan_complete_notif(struct iwm_softc *,
|
||||
struct iwm_rx_packet *);
|
||||
|
||||
#endif /* __IF_IWN_SCAN_H__ */
|
||||
|
@ -196,7 +196,7 @@ sf_full_timeout[IWM_SF_NUM_SCENARIO][IWM_SF_NUM_TIMEOUT_TYPES] = {
|
||||
};
|
||||
|
||||
static 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;
|
||||
@ -244,7 +244,7 @@ iwm_mvm_fill_sf_command(struct iwm_softc *sc, struct iwm_sf_cfg_cmd *sf_cmd,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_sf_config(struct iwm_softc *sc, struct ieee80211_node *ni,
|
||||
iwm_sf_config(struct iwm_softc *sc, struct ieee80211_node *ni,
|
||||
enum iwm_sf_state new_state)
|
||||
{
|
||||
struct iwm_sf_cfg_cmd sf_cmd = {
|
||||
@ -266,13 +266,13 @@ iwm_mvm_sf_config(struct iwm_softc *sc, struct ieee80211_node *ni,
|
||||
|
||||
switch (new_state) {
|
||||
case IWM_SF_UNINIT:
|
||||
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, ni);
|
||||
iwm_fill_sf_command(sc, &sf_cmd, ni);
|
||||
break;
|
||||
case IWM_SF_INIT_OFF:
|
||||
iwm_mvm_fill_sf_command(sc, &sf_cmd, NULL);
|
||||
iwm_fill_sf_command(sc, &sf_cmd, NULL);
|
||||
break;
|
||||
default:
|
||||
device_printf(sc->sc_dev,
|
||||
@ -281,7 +281,7 @@ iwm_mvm_sf_config(struct iwm_softc *sc, struct ieee80211_node *ni,
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_SF_CFG_CMD, IWM_CMD_ASYNC,
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_REPLY_SF_CFG_CMD, IWM_CMD_ASYNC,
|
||||
sizeof(sf_cmd), &sf_cmd);
|
||||
if (!ret)
|
||||
sc->sf_state = new_state;
|
||||
@ -295,7 +295,7 @@ iwm_mvm_sf_config(struct iwm_softc *sc, struct ieee80211_node *ni,
|
||||
* and set new state accordingly.
|
||||
*/
|
||||
int
|
||||
iwm_mvm_sf_update(struct iwm_softc *sc, struct ieee80211vap *changed_vif,
|
||||
iwm_sf_update(struct iwm_softc *sc, struct ieee80211vap *changed_vif,
|
||||
boolean_t remove_vif)
|
||||
{
|
||||
enum iwm_sf_state new_state;
|
||||
@ -326,5 +326,5 @@ iwm_mvm_sf_update(struct iwm_softc *sc, struct ieee80211vap *changed_vif,
|
||||
/* If there are multiple active macs - change to SF_UNINIT */
|
||||
new_state = IWM_SF_UNINIT;
|
||||
}
|
||||
return iwm_mvm_sf_config(sc, ni, new_state);
|
||||
return iwm_sf_config(sc, ni, new_state);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@
|
||||
#ifndef __IF_IWM_SF_H__
|
||||
#define __IF_IWM_SF_H__
|
||||
|
||||
extern int iwm_mvm_sf_update(struct iwm_softc *sc,
|
||||
extern int iwm_sf_update(struct iwm_softc *sc,
|
||||
struct ieee80211vap *changed_vif,
|
||||
boolean_t remove_vif);
|
||||
|
||||
|
@ -136,19 +136,19 @@ __FBSDID("$FreeBSD$");
|
||||
* support both API versions.
|
||||
*/
|
||||
static inline int
|
||||
iwm_mvm_add_sta_cmd_size(struct iwm_softc *sc)
|
||||
iwm_add_sta_cmd_size(struct iwm_softc *sc)
|
||||
{
|
||||
return sc->cfg->mqrx_supported ? sizeof(struct iwm_mvm_add_sta_cmd) :
|
||||
sizeof(struct iwm_mvm_add_sta_cmd_v7);
|
||||
return sc->cfg->mqrx_supported ? sizeof(struct iwm_add_sta_cmd) :
|
||||
sizeof(struct iwm_add_sta_cmd_v7);
|
||||
}
|
||||
|
||||
/* send station add/update command to firmware */
|
||||
int
|
||||
iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
iwm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
boolean_t update)
|
||||
{
|
||||
struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap);
|
||||
struct iwm_mvm_add_sta_cmd add_sta_cmd = {
|
||||
struct iwm_add_sta_cmd add_sta_cmd = {
|
||||
.sta_id = IWM_STATION_ID,
|
||||
.mac_id_n_color =
|
||||
htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)),
|
||||
@ -165,7 +165,7 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
int ac;
|
||||
for (ac = 0; ac < WME_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);
|
||||
}
|
||||
@ -176,8 +176,8 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
htole32(mpdu_dens << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT);
|
||||
|
||||
status = IWM_ADD_STA_SUCCESS;
|
||||
ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA,
|
||||
iwm_mvm_add_sta_cmd_size(sc),
|
||||
ret = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA,
|
||||
iwm_add_sta_cmd_size(sc),
|
||||
&add_sta_cmd, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -196,21 +196,21 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in)
|
||||
iwm_add_sta(struct iwm_softc *sc, struct iwm_node *in)
|
||||
{
|
||||
return iwm_mvm_sta_send_to_fw(sc, in, FALSE);
|
||||
return iwm_sta_send_to_fw(sc, in, FALSE);
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in)
|
||||
iwm_update_sta(struct iwm_softc *sc, struct iwm_node *in)
|
||||
{
|
||||
return iwm_mvm_sta_send_to_fw(sc, in, TRUE);
|
||||
return iwm_sta_send_to_fw(sc, in, TRUE);
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain)
|
||||
iwm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain)
|
||||
{
|
||||
struct iwm_mvm_add_sta_cmd cmd = {};
|
||||
struct iwm_add_sta_cmd cmd = {};
|
||||
int ret;
|
||||
uint32_t status;
|
||||
|
||||
@ -222,8 +222,8 @@ iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain)
|
||||
cmd.station_flags_msk = htole32(IWM_STA_FLG_DRAIN_FLOW);
|
||||
|
||||
status = IWM_ADD_STA_SUCCESS;
|
||||
ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA,
|
||||
iwm_mvm_add_sta_cmd_size(sc),
|
||||
ret = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA,
|
||||
iwm_add_sta_cmd_size(sc),
|
||||
&cmd, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -249,14 +249,14 @@ iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain)
|
||||
* only).
|
||||
*/
|
||||
static int
|
||||
iwm_mvm_rm_sta_common(struct iwm_softc *sc)
|
||||
iwm_rm_sta_common(struct iwm_softc *sc)
|
||||
{
|
||||
struct iwm_mvm_rm_sta_cmd rm_sta_cmd = {
|
||||
struct iwm_rm_sta_cmd rm_sta_cmd = {
|
||||
.sta_id = IWM_STATION_ID,
|
||||
};
|
||||
int ret;
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_REMOVE_STA, 0,
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_REMOVE_STA, 0,
|
||||
sizeof(rm_sta_cmd), &rm_sta_cmd);
|
||||
if (ret) {
|
||||
device_printf(sc->sc_dev,
|
||||
@ -268,20 +268,20 @@ iwm_mvm_rm_sta_common(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
iwm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
boolean_t is_assoc)
|
||||
{
|
||||
uint32_t tfd_queue_msk = 0;
|
||||
int ret;
|
||||
int ac;
|
||||
|
||||
ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), TRUE);
|
||||
ret = iwm_drain_sta(sc, IWM_VAP(vap), TRUE);
|
||||
if (ret)
|
||||
return ret;
|
||||
for (ac = 0; ac < WME_NUM_AC; ac++) {
|
||||
tfd_queue_msk |= htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]);
|
||||
tfd_queue_msk |= htole32(1 << iwm_ac_to_tx_fifo[ac]);
|
||||
}
|
||||
ret = iwm_mvm_flush_tx_path(sc, tfd_queue_msk, IWM_CMD_SYNC);
|
||||
ret = iwm_flush_tx_path(sc, tfd_queue_msk, IWM_CMD_SYNC);
|
||||
if (ret)
|
||||
return ret;
|
||||
#ifdef notyet /* function not yet implemented */
|
||||
@ -290,7 +290,7 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), FALSE);
|
||||
ret = iwm_drain_sta(sc, IWM_VAP(vap), FALSE);
|
||||
|
||||
/* if we are associated - we can't remove the AP STA now */
|
||||
if (is_assoc)
|
||||
@ -298,24 +298,24 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
|
||||
/* XXX wait until STA is drained */
|
||||
|
||||
ret = iwm_mvm_rm_sta_common(sc);
|
||||
ret = iwm_rm_sta_common(sc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
iwm_mvm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
iwm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap)
|
||||
{
|
||||
/* XXX wait until STA is drained */
|
||||
|
||||
return iwm_mvm_rm_sta_common(sc);
|
||||
return iwm_rm_sta_common(sc);
|
||||
}
|
||||
|
||||
static 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 cmd;
|
||||
struct iwm_add_sta_cmd cmd;
|
||||
int ret;
|
||||
uint32_t status;
|
||||
|
||||
@ -331,8 +331,8 @@ iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta,
|
||||
if (addr)
|
||||
IEEE80211_ADDR_COPY(cmd.addr, addr);
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA,
|
||||
iwm_mvm_add_sta_cmd_size(sc),
|
||||
ret = iwm_send_cmd_pdu_status(sc, IWM_ADD_STA,
|
||||
iwm_add_sta_cmd_size(sc),
|
||||
&cmd, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -351,31 +351,31 @@ 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 ret;
|
||||
|
||||
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);
|
||||
|
||||
/* Map Aux queue to fifo - needs to happen before adding Aux station */
|
||||
ret = iwm_enable_txq(sc, IWM_AUX_STA_ID, IWM_MVM_AUX_QUEUE,
|
||||
IWM_MVM_TX_FIFO_MCAST);
|
||||
ret = iwm_enable_txq(sc, IWM_AUX_STA_ID, IWM_AUX_QUEUE,
|
||||
IWM_TX_FIFO_MCAST);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = iwm_mvm_add_int_sta_common(sc, &sc->sc_aux_sta, NULL,
|
||||
ret = iwm_add_int_sta_common(sc, &sc->sc_aux_sta, NULL,
|
||||
IWM_MAC_INDEX_AUX, 0);
|
||||
|
||||
if (ret) {
|
||||
memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta));
|
||||
sc->sc_aux_sta.sta_id = IWM_MVM_STATION_COUNT;
|
||||
sc->sc_aux_sta.sta_id = IWM_STATION_COUNT;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void iwm_mvm_del_aux_sta(struct iwm_softc *sc)
|
||||
void iwm_del_aux_sta(struct iwm_softc *sc)
|
||||
{
|
||||
memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta));
|
||||
sc->sc_aux_sta.sta_id = IWM_MVM_STATION_COUNT;
|
||||
sc->sc_aux_sta.sta_id = IWM_STATION_COUNT;
|
||||
}
|
||||
|
@ -88,14 +88,14 @@
|
||||
* keeps the fw's station table up to date with the ADD_STA command. Stations
|
||||
* can be removed by the REMOVE_STA command.
|
||||
*
|
||||
* All the data related to a station is held in the structure %iwl_mvm_sta
|
||||
* All the data related to a station is held in the structure %iwl_sta
|
||||
* which is embed in the mac80211's %ieee80211_sta (in the drv_priv) area.
|
||||
* This data includes the index of the station in the fw, per tid information
|
||||
* (sequence numbers, Block-ack state machine, etc...). The stations are
|
||||
* created and deleted by the %sta_state callback from %ieee80211_ops.
|
||||
*
|
||||
* The driver holds a map: %fw_id_to_mac_id that allows to fetch a
|
||||
* %ieee80211_sta (and the %iwl_mvm_sta embedded into it) based on a fw
|
||||
* %ieee80211_sta (and the %iwl_sta embedded into it) based on a fw
|
||||
* station index. That way, the driver is able to get the tid related data in
|
||||
* O(1) in time sensitive paths (Tx / Tx response / BA notification). These
|
||||
* paths are triggered by the fw, and the driver needs to get a pointer to the
|
||||
@ -133,8 +133,8 @@
|
||||
* The FW needs a few internal stations that are not reflected in
|
||||
* mac80211, such as broadcast station in AP / GO mode, or AUX sta for
|
||||
* scanning and P2P device (during the GO negotiation).
|
||||
* For these kind of stations we have %iwl_mvm_int_sta struct which holds the
|
||||
* data relevant for them from both %iwl_mvm_sta and %ieee80211_sta.
|
||||
* For these kind of stations we have %iwl_int_sta struct which holds the
|
||||
* data relevant for them from both %iwl_sta and %ieee80211_sta.
|
||||
* Usually the data for these stations is static, so no locking is required,
|
||||
* and no TID data as this is also not needed.
|
||||
* One thing to note, is that these stations have an ID in the fw, but not
|
||||
@ -150,7 +150,7 @@
|
||||
/**
|
||||
* DOC: station table - AP Station in STA mode
|
||||
*
|
||||
* %iwl_mvm_vif includes the index of the AP station in the fw's STA table:
|
||||
* %iwl_vif includes the index of the AP station in the fw's STA table:
|
||||
* %ap_sta_id. To get the point to the corresponding %ieee80211_sta,
|
||||
* &fw_id_to_mac_id can be used. Due to the way the fw works, we must not remove
|
||||
* the AP station from the fw before setting the MAC context as unassociated.
|
||||
@ -173,10 +173,10 @@
|
||||
* the fw. In order to do so, we track the non-AMPDU packets for each station.
|
||||
* If mac80211 removes a STA and if it still has non-AMPDU packets pending in
|
||||
* the queues, we mark this station as %EBUSY in %fw_id_to_mac_id, and drop all
|
||||
* the frames for this STA (%iwl_mvm_rm_sta). When the last frame is dropped
|
||||
* the frames for this STA (%iwl_rm_sta). When the last frame is dropped
|
||||
* (we know about it with its Tx response), we remove the station in fw and set
|
||||
* it as %NULL in %fw_id_to_mac_id: this is the purpose of
|
||||
* %iwl_mvm_sta_drained_wk.
|
||||
* %iwl_sta_drained_wk.
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -186,14 +186,14 @@
|
||||
* driver, we require mac80211 to reconfigure the driver. Since the private
|
||||
* data of the stations is embed in mac80211's %ieee80211_sta, that data will
|
||||
* not be zeroed and needs to be reinitialized manually.
|
||||
* %IWL_MVM_STATUS_IN_HW_RESTART is set during restart and that will hint us
|
||||
* %IWL_STATUS_IN_HW_RESTART is set during restart and that will hint us
|
||||
* that we must not allocate a new sta_id but reuse the previous one. This
|
||||
* means that the stations being re-added after the reset will have the same
|
||||
* place in the fw as before the reset. We do need to zero the %fw_id_to_mac_id
|
||||
* map, since the stations aren't in the fw any more. Internal stations that
|
||||
* are not added by mac80211 will be re-added in the init flow that is called
|
||||
* after the restart: mac80211 call's %iwl_mvm_mac_start which calls to
|
||||
* %iwl_mvm_up.
|
||||
* after the restart: mac80211 call's %iwl_mac_start which calls to
|
||||
* %iwl_up.
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -206,18 +206,18 @@
|
||||
* @flags: if update==true, this marks what is being changed via ORs of values
|
||||
* from enum iwm_sta_modify_flag. Otherwise, this is ignored.
|
||||
*/
|
||||
extern int iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
extern int iwm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in,
|
||||
boolean_t update);
|
||||
extern int iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in);
|
||||
extern int iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in);
|
||||
extern int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
extern int iwm_add_sta(struct iwm_softc *sc, struct iwm_node *in);
|
||||
extern int iwm_update_sta(struct iwm_softc *sc, struct iwm_node *in);
|
||||
extern int iwm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap,
|
||||
boolean_t is_assoc);
|
||||
extern int iwm_mvm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
extern int iwm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap);
|
||||
|
||||
extern int iwm_mvm_add_aux_sta(struct iwm_softc *sc);
|
||||
extern void iwm_mvm_del_aux_sta(struct iwm_softc *sc);
|
||||
extern int iwm_add_aux_sta(struct iwm_softc *sc);
|
||||
extern void iwm_del_aux_sta(struct iwm_softc *sc);
|
||||
|
||||
extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
extern int iwm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
boolean_t drain);
|
||||
|
||||
#endif /* __IF_IWM_STA_H__ */
|
||||
|
@ -162,7 +162,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define TU_TO_HZ(tu) (((uint64_t)(tu) * 1024 * hz) / 1000000)
|
||||
|
||||
static void
|
||||
iwm_mvm_te_clear_data(struct iwm_softc *sc)
|
||||
iwm_te_clear_data(struct iwm_softc *sc)
|
||||
{
|
||||
sc->sc_time_event_uid = 0;
|
||||
sc->sc_time_event_duration = 0;
|
||||
@ -178,7 +178,7 @@ iwm_mvm_te_clear_data(struct iwm_softc *sc)
|
||||
* @notif: the notification data corresponding the time event data.
|
||||
*/
|
||||
static void
|
||||
iwm_mvm_te_handle_notif(struct iwm_softc *sc,
|
||||
iwm_te_handle_notif(struct iwm_softc *sc,
|
||||
struct iwm_time_event_notif *notif)
|
||||
{
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_TE,
|
||||
@ -202,7 +202,7 @@ iwm_mvm_te_handle_notif(struct iwm_softc *sc,
|
||||
"TE ended - current time %d, estimated end %d\n",
|
||||
ticks, sc->sc_time_event_end_ticks);
|
||||
|
||||
iwm_mvm_te_clear_data(sc);
|
||||
iwm_te_clear_data(sc);
|
||||
} else if (le32toh(notif->action) & IWM_TE_V2_NOTIF_HOST_EVENT_START) {
|
||||
sc->sc_time_event_end_ticks =
|
||||
ticks + TU_TO_HZ(sc->sc_time_event_duration);
|
||||
@ -215,7 +215,7 @@ iwm_mvm_te_handle_notif(struct iwm_softc *sc,
|
||||
* The Rx handler for time event notifications
|
||||
*/
|
||||
void
|
||||
iwm_mvm_rx_time_event_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
iwm_rx_time_event_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
{
|
||||
struct iwm_time_event_notif *notif = (void *)pkt->data;
|
||||
|
||||
@ -224,11 +224,11 @@ iwm_mvm_rx_time_event_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt)
|
||||
le32toh(notif->unique_id),
|
||||
le32toh(notif->action));
|
||||
|
||||
iwm_mvm_te_handle_notif(sc, notif);
|
||||
iwm_te_handle_notif(sc, notif);
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_te_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
iwm_te_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
void *data)
|
||||
{
|
||||
struct iwm_time_event_notif *resp;
|
||||
@ -259,7 +259,7 @@ iwm_mvm_te_notif(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
}
|
||||
|
||||
static int
|
||||
iwm_mvm_time_event_response(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
iwm_time_event_response(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
void *data)
|
||||
{
|
||||
struct iwm_time_event_resp *resp;
|
||||
@ -292,7 +292,7 @@ iwm_mvm_time_event_response(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
|
||||
/* XXX Use the te_data function argument properly, like in iwlwifi's code. */
|
||||
|
||||
static int
|
||||
iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
iwm_time_event_send_add(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
void *te_data, struct iwm_time_event_cmd *te_cmd)
|
||||
{
|
||||
static const uint16_t time_event_response[] = { IWM_TIME_EVENT_CMD };
|
||||
@ -316,9 +316,9 @@ iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
iwm_init_notification_wait(sc->sc_notif_wait, &wait_time_event,
|
||||
time_event_response,
|
||||
nitems(time_event_response),
|
||||
iwm_mvm_time_event_response, /*te_data*/NULL);
|
||||
iwm_time_event_response, /*te_data*/NULL);
|
||||
|
||||
ret = iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0, sizeof(*te_cmd),
|
||||
ret = iwm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0, sizeof(*te_cmd),
|
||||
te_cmd);
|
||||
if (ret) {
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_TE,
|
||||
@ -343,7 +343,7 @@ iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
}
|
||||
|
||||
void
|
||||
iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
iwm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
uint32_t duration, uint32_t max_delay, boolean_t wait_for_notif)
|
||||
{
|
||||
const uint16_t te_notif_response[] = { IWM_TIME_EVENT_NOTIFICATION };
|
||||
@ -373,7 +373,7 @@ iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
IWM_T2_V2_START_IMMEDIATELY);
|
||||
|
||||
if (!wait_for_notif) {
|
||||
iwm_mvm_time_event_send_add(sc, ivp, /*te_data*/NULL, &time_cmd);
|
||||
iwm_time_event_send_add(sc, ivp, /*te_data*/NULL, &time_cmd);
|
||||
DELAY(100);
|
||||
sc->sc_flags |= IWM_FLAG_TE_ACTIVE;
|
||||
return;
|
||||
@ -385,10 +385,10 @@ iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
*/
|
||||
iwm_init_notification_wait(sc->sc_notif_wait, &wait_te_notif,
|
||||
te_notif_response, nitems(te_notif_response),
|
||||
iwm_mvm_te_notif, /*te_data*/NULL);
|
||||
iwm_te_notif, /*te_data*/NULL);
|
||||
|
||||
/* If TE was sent OK - wait for the notification that started */
|
||||
if (iwm_mvm_time_event_send_add(sc, ivp, /*te_data*/NULL, &time_cmd)) {
|
||||
if (iwm_time_event_send_add(sc, ivp, /*te_data*/NULL, &time_cmd)) {
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_TE,
|
||||
"%s: Failed to add TE to protect session\n", __func__);
|
||||
iwm_remove_notification(sc->sc_notif_wait, &wait_te_notif);
|
||||
@ -406,7 +406,7 @@ iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
}
|
||||
|
||||
void
|
||||
iwm_mvm_stop_session_protection(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
iwm_stop_session_protection(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
{
|
||||
struct iwm_time_event_cmd time_cmd = {};
|
||||
|
||||
@ -421,9 +421,9 @@ iwm_mvm_stop_session_protection(struct iwm_softc *sc, struct iwm_vap *ivp)
|
||||
|
||||
IWM_DPRINTF(sc, IWM_DEBUG_TE,
|
||||
"%s: Removing TE 0x%x\n", __func__, le32toh(time_cmd.id));
|
||||
if (iwm_mvm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0, sizeof(time_cmd),
|
||||
if (iwm_send_cmd_pdu(sc, IWM_TIME_EVENT_CMD, 0, sizeof(time_cmd),
|
||||
&time_cmd) == 0)
|
||||
iwm_mvm_te_clear_data(sc);
|
||||
iwm_te_clear_data(sc);
|
||||
|
||||
DELAY(100);
|
||||
}
|
||||
|
@ -107,11 +107,11 @@
|
||||
#ifndef __IF_IWM_TIME_EVENT_H__
|
||||
#define __IF_IWM_TIME_EVENT_H__
|
||||
|
||||
extern void iwm_mvm_rx_time_event_notif(struct iwm_softc *sc,
|
||||
extern void iwm_rx_time_event_notif(struct iwm_softc *sc,
|
||||
struct iwm_rx_packet *pkt);
|
||||
extern void iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
extern void iwm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp,
|
||||
uint32_t duration, uint32_t max_delay, boolean_t wait_for_notif);
|
||||
extern void iwm_mvm_stop_session_protection(struct iwm_softc *sc,
|
||||
extern void iwm_stop_session_protection(struct iwm_softc *sc,
|
||||
struct iwm_vap *ivp);
|
||||
|
||||
#endif /* __IF_IWM_TIME_EVENT_H__ */
|
||||
|
@ -169,7 +169,7 @@ __FBSDID("$FreeBSD$");
|
||||
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 = NULL;
|
||||
struct iwm_device_cmd *cmd;
|
||||
@ -346,7 +346,7 @@ iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
|
||||
|
||||
/* iwlwifi: mvm/utils.c */
|
||||
int
|
||||
iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id,
|
||||
iwm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id,
|
||||
uint32_t flags, uint16_t len, const void *data)
|
||||
{
|
||||
struct iwm_host_cmd cmd = {
|
||||
@ -361,7 +361,7 @@ iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id,
|
||||
|
||||
/* iwlwifi: mvm/utils.c */
|
||||
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;
|
||||
@ -402,7 +402,7 @@ iwm_mvm_send_cmd_status(struct iwm_softc *sc,
|
||||
|
||||
/* iwlwifi/mvm/utils.c */
|
||||
int
|
||||
iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id,
|
||||
iwm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id,
|
||||
uint16_t len, const void *data, uint32_t *status)
|
||||
{
|
||||
struct iwm_host_cmd cmd = {
|
||||
@ -411,7 +411,7 @@ iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id,
|
||||
.data = { data, },
|
||||
};
|
||||
|
||||
return iwm_mvm_send_cmd_status(sc, &cmd, status);
|
||||
return iwm_send_cmd_status(sc, &cmd, status);
|
||||
}
|
||||
|
||||
void
|
||||
@ -490,7 +490,7 @@ iwm_dma_contig_free(struct iwm_dma_info *dma)
|
||||
}
|
||||
|
||||
/**
|
||||
* iwm_mvm_send_lq_cmd() - Send link quality command
|
||||
* iwm_send_lq_cmd() - Send link quality command
|
||||
* @init: This command is sent as part of station initialization right
|
||||
* after station has been added.
|
||||
*
|
||||
@ -500,7 +500,7 @@ iwm_dma_contig_free(struct iwm_dma_info *dma)
|
||||
* progress.
|
||||
*/
|
||||
int
|
||||
iwm_mvm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq, boolean_t init)
|
||||
iwm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq, boolean_t init)
|
||||
{
|
||||
struct iwm_host_cmd cmd = {
|
||||
.id = IWM_LQ_CMD,
|
||||
@ -509,16 +509,16 @@ iwm_mvm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq, boolean_t init)
|
||||
.data = { lq, },
|
||||
};
|
||||
|
||||
if (lq->sta_id == IWM_MVM_STATION_COUNT)
|
||||
if (lq->sta_id == IWM_STATION_COUNT)
|
||||
return EINVAL;
|
||||
|
||||
return iwm_send_cmd(sc, &cmd);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc)
|
||||
iwm_rx_diversity_allowed(struct iwm_softc *sc)
|
||||
{
|
||||
if (num_of_ant(iwm_mvm_get_valid_rx_ant(sc)) == 1)
|
||||
if (num_of_ant(iwm_get_valid_rx_ant(sc)) == 1)
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
|
@ -107,12 +107,12 @@
|
||||
#define __IF_IWM_UTIL_H__
|
||||
|
||||
extern int iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd);
|
||||
extern int iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id,
|
||||
extern int iwm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id,
|
||||
uint32_t flags, uint16_t len, const void *data);
|
||||
|
||||
extern int iwm_mvm_send_cmd_status(struct iwm_softc *sc,
|
||||
extern int iwm_send_cmd_status(struct iwm_softc *sc,
|
||||
struct iwm_host_cmd *cmd, uint32_t *status);
|
||||
extern int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id,
|
||||
extern int iwm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id,
|
||||
uint16_t len, const void *data, uint32_t *status);
|
||||
extern void iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd);
|
||||
|
||||
@ -120,18 +120,18 @@ extern int iwm_dma_contig_alloc(bus_dma_tag_t tag, struct iwm_dma_info *dma,
|
||||
bus_size_t size, bus_size_t alignment);
|
||||
extern void iwm_dma_contig_free(struct iwm_dma_info *);
|
||||
|
||||
extern int iwm_mvm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq,
|
||||
extern int iwm_send_lq_cmd(struct iwm_softc *sc, struct iwm_lq_cmd *lq,
|
||||
boolean_t init);
|
||||
|
||||
extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc);
|
||||
extern boolean_t iwm_rx_diversity_allowed(struct iwm_softc *sc);
|
||||
|
||||
extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx);
|
||||
extern int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo);
|
||||
extern int iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk,
|
||||
extern int iwm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk,
|
||||
uint32_t flags);
|
||||
|
||||
static inline uint8_t
|
||||
iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc)
|
||||
iwm_get_valid_tx_ant(struct iwm_softc *sc)
|
||||
{
|
||||
return sc->nvm_data && sc->nvm_data->valid_tx_ant ?
|
||||
sc->sc_fw.valid_tx_ant & sc->nvm_data->valid_tx_ant :
|
||||
@ -139,7 +139,7 @@ iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static inline uint8_t
|
||||
iwm_mvm_get_valid_rx_ant(struct iwm_softc *sc)
|
||||
iwm_get_valid_rx_ant(struct iwm_softc *sc)
|
||||
{
|
||||
return sc->nvm_data && sc->nvm_data->valid_rx_ant ?
|
||||
sc->sc_fw.valid_rx_ant & sc->nvm_data->valid_rx_ant :
|
||||
@ -147,12 +147,12 @@ iwm_mvm_get_valid_rx_ant(struct iwm_softc *sc)
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
iwm_mvm_get_phy_config(struct iwm_softc *sc)
|
||||
iwm_get_phy_config(struct iwm_softc *sc)
|
||||
{
|
||||
uint32_t phy_config = ~(IWM_FW_PHY_CFG_TX_CHAIN |
|
||||
IWM_FW_PHY_CFG_RX_CHAIN);
|
||||
uint32_t valid_rx_ant = iwm_mvm_get_valid_rx_ant(sc);
|
||||
uint32_t valid_tx_ant = iwm_mvm_get_valid_tx_ant(sc);
|
||||
uint32_t valid_rx_ant = iwm_get_valid_rx_ant(sc);
|
||||
uint32_t valid_tx_ant = iwm_get_valid_tx_ant(sc);
|
||||
|
||||
phy_config |= valid_tx_ant << IWM_FW_PHY_CFG_TX_CHAIN_POS |
|
||||
valid_rx_ant << IWM_FW_PHY_CFG_RX_CHAIN_POS;
|
||||
|
@ -1814,29 +1814,29 @@ struct iwm_agn_scd_bc_tbl {
|
||||
*/
|
||||
|
||||
/* Maximum number of Tx queues. */
|
||||
#define IWM_MVM_MAX_QUEUES 31
|
||||
#define IWM_MAX_QUEUES 31
|
||||
|
||||
/* Tx queue numbers */
|
||||
enum {
|
||||
IWM_MVM_OFFCHANNEL_QUEUE = 8,
|
||||
IWM_MVM_CMD_QUEUE = 9,
|
||||
IWM_MVM_AUX_QUEUE = 15,
|
||||
IWM_OFFCHANNEL_QUEUE = 8,
|
||||
IWM_CMD_QUEUE = 9,
|
||||
IWM_AUX_QUEUE = 15,
|
||||
};
|
||||
|
||||
enum iwm_mvm_tx_fifo {
|
||||
IWM_MVM_TX_FIFO_BK = 0,
|
||||
IWM_MVM_TX_FIFO_BE,
|
||||
IWM_MVM_TX_FIFO_VI,
|
||||
IWM_MVM_TX_FIFO_VO,
|
||||
IWM_MVM_TX_FIFO_MCAST = 5,
|
||||
IWM_MVM_TX_FIFO_CMD = 7,
|
||||
enum iwm_tx_fifo {
|
||||
IWM_TX_FIFO_BK = 0,
|
||||
IWM_TX_FIFO_BE,
|
||||
IWM_TX_FIFO_VI,
|
||||
IWM_TX_FIFO_VO,
|
||||
IWM_TX_FIFO_MCAST = 5,
|
||||
IWM_TX_FIFO_CMD = 7,
|
||||
};
|
||||
|
||||
#define IWM_MVM_STATION_COUNT 16
|
||||
#define IWM_STATION_COUNT 16
|
||||
|
||||
/* commands */
|
||||
enum {
|
||||
IWM_MVM_ALIVE = 0x1,
|
||||
IWM_ALIVE = 0x1,
|
||||
IWM_REPLY_ERROR = 0x2,
|
||||
|
||||
IWM_INIT_COMPLETE_NOTIF = 0x4,
|
||||
@ -2218,7 +2218,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)
|
||||
@ -2276,14 +2276,14 @@ struct iwm_umac_alive {
|
||||
uint32_t dbg_print_buff_addr;
|
||||
} __packed; /* UMAC_ALIVE_DATA_API_S_VER_2 */
|
||||
|
||||
struct iwm_mvm_alive_resp_v3 {
|
||||
struct iwm_alive_resp_v3 {
|
||||
uint16_t status;
|
||||
uint16_t flags;
|
||||
struct iwm_lmac_alive lmac_data;
|
||||
struct iwm_umac_alive umac_data;
|
||||
} __packed; /* ALIVE_RES_API_S_VER_3 */
|
||||
|
||||
struct iwm_mvm_alive_resp {
|
||||
struct iwm_alive_resp {
|
||||
uint16_t status;
|
||||
uint16_t flags;
|
||||
struct iwm_lmac_alive lmac_data[2];
|
||||
@ -2622,7 +2622,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
|
||||
@ -2846,7 +2846,7 @@ enum iwm_rx_phy_flags {
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwm_mvm_rx_status - written by fw for each Rx packet
|
||||
* enum iwm_rx_status - written by fw for each Rx packet
|
||||
* @IWM_RX_MPDU_RES_STATUS_CRC_OK: CRC is fine
|
||||
* @IWM_RX_MPDU_RES_STATUS_OVERRUN_OK: there was no RXE overflow
|
||||
* @IWM_RX_MPDU_RES_STATUS_SRC_STA_FOUND:
|
||||
@ -2877,7 +2877,7 @@ enum iwm_rx_phy_flags {
|
||||
* @IWM_RX_MPDU_RES_STATUS_FILTERING_MSK:
|
||||
* @IWM_RX_MPDU_RES_STATUS2_FILTERING_MSK:
|
||||
*/
|
||||
enum iwm_mvm_rx_status {
|
||||
enum iwm_rx_status {
|
||||
IWM_RX_MPDU_RES_STATUS_CRC_OK = (1 << 0),
|
||||
IWM_RX_MPDU_RES_STATUS_OVERRUN_OK = (1 << 1),
|
||||
IWM_RX_MPDU_RES_STATUS_SRC_STA_FOUND = (1 << 2),
|
||||
@ -3086,14 +3086,14 @@ struct iwm_mcast_filter_cmd {
|
||||
/***********************************
|
||||
* Statistics API
|
||||
***********************************/
|
||||
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;
|
||||
@ -3102,7 +3102,7 @@ struct iwm_mvm_statistics_div {
|
||||
uint32_t reserved2;
|
||||
} __packed; /* IWM_STATISTICS_SLOW_DIV_API_S_VER_2 */
|
||||
|
||||
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
|
||||
@ -3136,7 +3136,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;
|
||||
@ -3159,7 +3159,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;
|
||||
@ -3172,7 +3172,7 @@ struct iwm_mvm_statistics_rx_ht_phy {
|
||||
uint32_t unsupport_mcs;
|
||||
} __packed; /* IWM_STATISTICS_HT_RX_PHY_API_S_VER_1 */
|
||||
|
||||
struct iwm_mvm_statistics_tx_non_phy {
|
||||
struct iwm_statistics_tx_non_phy {
|
||||
uint32_t preamble_cnt;
|
||||
uint32_t rx_detected_cnt;
|
||||
uint32_t bt_prio_defer_cnt;
|
||||
@ -3191,7 +3191,7 @@ struct iwm_mvm_statistics_tx_non_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;
|
||||
@ -3207,7 +3207,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];
|
||||
@ -3218,14 +3218,14 @@ 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_mvm_statistics_tx_non_phy general;
|
||||
struct iwm_mvm_statistics_tx_non_phy_agg agg;
|
||||
struct iwm_mvm_statistics_tx_channel_width channel_width;
|
||||
struct iwm_statistics_tx {
|
||||
struct iwm_statistics_tx_non_phy general;
|
||||
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;
|
||||
@ -3236,15 +3236,15 @@ 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_v8 {
|
||||
struct iwm_statistics_general_v8 {
|
||||
uint32_t radio_temperature;
|
||||
uint32_t 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 slow_div;
|
||||
struct iwm_statistics_div slow_div;
|
||||
uint32_t rx_enable_counter;
|
||||
/*
|
||||
* num_of_sos_states:
|
||||
@ -3259,7 +3259,7 @@ struct iwm_mvm_statistics_general_v8 {
|
||||
uint8_t beacon_filter_current_energy;
|
||||
uint8_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;
|
||||
uint64_t rx_time;
|
||||
uint64_t on_time_rf;
|
||||
uint64_t on_time_scan;
|
||||
@ -3269,11 +3269,11 @@ struct iwm_mvm_statistics_general_v8 {
|
||||
uint8_t reserved[4 - (IWM_NUM_MAC_INDEX % 4)];
|
||||
} __packed; /* IWM_STATISTICS_GENERAL_API_S_VER_8 */
|
||||
|
||||
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 */
|
||||
|
||||
/*
|
||||
@ -3286,9 +3286,9 @@ struct iwm_mvm_statistics_rx {
|
||||
|
||||
struct iwm_notif_statistics_v10 {
|
||||
uint32_t flag;
|
||||
struct iwm_mvm_statistics_rx rx;
|
||||
struct iwm_mvm_statistics_tx tx;
|
||||
struct iwm_mvm_statistics_general_v8 general;
|
||||
struct iwm_statistics_rx rx;
|
||||
struct iwm_statistics_tx tx;
|
||||
struct iwm_statistics_general_v8 general;
|
||||
} __packed; /* IWM_STATISTICS_NTFY_API_S_VER_10 */
|
||||
|
||||
#define IWM_STATISTICS_FLG_CLEAR 0x1
|
||||
@ -3677,7 +3677,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;
|
||||
@ -4754,11 +4754,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)
|
||||
@ -4785,9 +4785,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;
|
||||
@ -4814,7 +4814,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
|
||||
@ -4827,7 +4827,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;
|
||||
@ -4861,7 +4861,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;
|
||||
@ -4888,7 +4888,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
|
||||
@ -4900,7 +4900,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;
|
||||
@ -4922,7 +4922,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
|
||||
*/
|
||||
@ -5082,30 +5082,30 @@ struct iwm_scan_channel_opt {
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* iwm_mvm_lmac_scan_flags
|
||||
* @IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL: pass all beacons and probe responses
|
||||
* iwm_lmac_scan_flags
|
||||
* @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
|
||||
* @IWM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
|
||||
*/
|
||||
enum iwm_mvm_lmac_scan_flags {
|
||||
IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL = (1 << 0),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_PASSIVE = (1 << 1),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION = (1 << 2),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE = (1 << 3),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = (1 << 4),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_FRAGMENTED = (1 << 5),
|
||||
IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED = (1 << 6),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL = (1 << 7),
|
||||
IWM_MVM_LMAC_SCAN_FLAG_MATCH = (1 << 9),
|
||||
enum iwm_lmac_scan_flags {
|
||||
IWM_LMAC_SCAN_FLAG_PASS_ALL = (1 << 0),
|
||||
IWM_LMAC_SCAN_FLAG_PASSIVE = (1 << 1),
|
||||
IWM_LMAC_SCAN_FLAG_PRE_CONNECTION = (1 << 2),
|
||||
IWM_LMAC_SCAN_FLAG_ITER_COMPLETE = (1 << 3),
|
||||
IWM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = (1 << 4),
|
||||
IWM_LMAC_SCAN_FLAG_FRAGMENTED = (1 << 5),
|
||||
IWM_LMAC_SCAN_FLAGS_RRM_ENABLED = (1 << 6),
|
||||
IWM_LMAC_SCAN_FLAG_EXTENDED_DWELL = (1 << 7),
|
||||
IWM_LMAC_SCAN_FLAG_MATCH = (1 << 9),
|
||||
};
|
||||
|
||||
enum iwm_scan_priority {
|
||||
@ -5124,7 +5124,7 @@ enum iwm_scan_priority {
|
||||
* @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
|
||||
@ -5316,10 +5316,10 @@ struct iwm_lmac_scan_complete_notif {
|
||||
/* 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
|
||||
|
||||
enum iwm_scan_config_flags {
|
||||
IWM_SCAN_CONFIG_FLAG_ACTIVATE = (1 << 0),
|
||||
@ -5847,7 +5847,7 @@ enum iwm_sta_sleep_flag {
|
||||
#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
|
||||
@ -5857,7 +5857,7 @@ enum iwm_sta_sleep_flag {
|
||||
* @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;
|
||||
@ -5876,7 +5876,7 @@ struct iwm_mvm_keyinfo {
|
||||
#define IWM_ADD_STA_BAID_SHIFT 8
|
||||
|
||||
/**
|
||||
* struct iwl_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
|
||||
* struct iwl_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
|
||||
* ( REPLY_ADD_STA = 0x18 )
|
||||
* @add_modify: see &enum iwl_sta_mode
|
||||
* @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD)
|
||||
@ -5916,7 +5916,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;
|
||||
@ -5957,7 +5957,7 @@ enum iwm_sta_type {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwm_mvm_add_sta_cmd - Add/modify a station in the fw's sta table.
|
||||
* struct iwm_add_sta_cmd - Add/modify a station in the fw's sta table.
|
||||
* ( REPLY_ADD_STA = 0x18 )
|
||||
* @add_modify: see &enum iwm_sta_mode
|
||||
* @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD)
|
||||
@ -6003,7 +6003,7 @@ enum iwm_sta_type {
|
||||
* 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 {
|
||||
struct iwm_add_sta_cmd {
|
||||
uint8_t add_modify;
|
||||
uint8_t awake_acs;
|
||||
uint16_t tid_disable_tx;
|
||||
@ -6030,7 +6030,7 @@ struct iwm_mvm_add_sta_cmd {
|
||||
} __packed; /* ADD_STA_CMD_API_S_VER_10 */
|
||||
|
||||
/**
|
||||
* 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
|
||||
@ -6041,7 +6041,7 @@ struct iwm_mvm_add_sta_cmd {
|
||||
* @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;
|
||||
@ -6054,14 +6054,14 @@ struct iwm_mvm_add_sta_key_cmd {
|
||||
} __packed; /* IWM_ADD_MODIFY_STA_KEY_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* enum iwm_mvm_add_sta_rsp_status - status in the response to ADD_STA command
|
||||
* enum iwm_add_sta_rsp_status - status in the response to ADD_STA command
|
||||
* @IWM_ADD_STA_SUCCESS: operation was executed successfully
|
||||
* @IWM_ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
|
||||
* @IWM_ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session
|
||||
* @IWM_ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station
|
||||
* that doesn't exist.
|
||||
*/
|
||||
enum iwm_mvm_add_sta_rsp_status {
|
||||
enum iwm_add_sta_rsp_status {
|
||||
IWM_ADD_STA_SUCCESS = 0x1,
|
||||
IWM_ADD_STA_STATIONS_OVERLOAD = 0x2,
|
||||
IWM_ADD_STA_IMMEDIATE_BA_FAILURE = 0x4,
|
||||
@ -6069,17 +6069,17 @@ enum iwm_mvm_add_sta_rsp_status {
|
||||
};
|
||||
|
||||
/**
|
||||
* 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:
|
||||
@ -6089,7 +6089,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];
|
||||
@ -6099,7 +6099,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;
|
||||
@ -6108,13 +6108,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 */
|
||||
|
||||
/*
|
||||
|
@ -312,8 +312,8 @@ struct iwm_rx_ring {
|
||||
|
||||
#define IWM_CMD_RESP_MAX PAGE_SIZE
|
||||
|
||||
#define IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS 500
|
||||
#define IWM_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS 400
|
||||
#define IWM_TE_SESSION_PROTECTION_MAX_TIME_MS 500
|
||||
#define IWM_TE_SESSION_PROTECTION_MIN_TIME_MS 400
|
||||
|
||||
/*
|
||||
* Command headers are in iwl-trans.h, which is full of all
|
||||
@ -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;
|
||||
@ -358,7 +358,7 @@ struct iwm_vap {
|
||||
int (*iv_newstate)(struct ieee80211vap *,
|
||||
enum ieee80211_state, int);
|
||||
|
||||
struct iwm_mvm_phy_ctxt *phy_ctxt;
|
||||
struct iwm_phy_ctxt *phy_ctxt;
|
||||
|
||||
uint16_t id;
|
||||
uint16_t color;
|
||||
@ -443,7 +443,7 @@ struct iwm_softc {
|
||||
uint32_t scd_base_addr;
|
||||
|
||||
/* 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;
|
||||
|
||||
@ -507,7 +507,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_v10 sc_stats;
|
||||
int sc_noise;
|
||||
|
Loading…
x
Reference in New Issue
Block a user