Lines Matching refs:ah

61 	struct ath5k_hw *ah = hw->priv;
64 if (WARN_ON(qnum >= ah->ah_capabilities.cap_queues.q_tx_num)) {
69 ath5k_tx_queue(hw, skb, &ah->txqs[qnum], control);
76 struct ath5k_hw *ah = hw->priv;
80 mutex_lock(&ah->lock);
84 && (ah->num_ap_vifs + ah->num_adhoc_vifs) >= ATH_BCBUF) {
94 if (ah->num_adhoc_vifs ||
95 (ah->nvifs && vif->type == NL80211_IFTYPE_ADHOC)) {
96 ATH5K_ERR(ah, "Only one single ad-hoc interface is allowed.\n");
113 ah->nvifs++;
114 ATH5K_DBG(ah, ATH5K_DEBUG_MODE, "add interface mode %d\n", avf->opmode);
122 WARN_ON(list_empty(&ah->bcbuf));
123 avf->bbuf = list_first_entry(&ah->bcbuf, struct ath5k_buf,
129 if (!ah->bslot[slot]) {
134 BUG_ON(ah->bslot[avf->bslot] != NULL);
135 ah->bslot[avf->bslot] = vif;
137 ah->num_ap_vifs++;
139 ah->num_adhoc_vifs++;
141 ah->num_mesh_vifs++;
147 ath5k_hw_set_lladdr(ah, vif->addr);
149 ath5k_update_bssid_mask_and_opmode(ah, vif);
152 mutex_unlock(&ah->lock);
161 struct ath5k_hw *ah = hw->priv;
165 mutex_lock(&ah->lock);
166 ah->nvifs--;
169 ath5k_txbuf_free_skb(ah, avf->bbuf);
170 list_add_tail(&avf->bbuf->list, &ah->bcbuf);
172 if (ah->bslot[i] == vif) {
173 ah->bslot[i] = NULL;
180 ah->num_ap_vifs--;
182 ah->num_adhoc_vifs--;
184 ah->num_mesh_vifs--;
186 ath5k_update_bssid_mask_and_opmode(ah, NULL);
187 mutex_unlock(&ah->lock);
197 struct ath5k_hw *ah = hw->priv;
202 mutex_lock(&ah->lock);
205 ret = ath5k_chan_set(ah, &conf->chandef);
211 (ah->ah_txpower.txp_requested != conf->power_level)) {
212 ah->ah_txpower.txp_requested = conf->power_level;
215 ath5k_hw_set_txpower_limit(ah, (conf->power_level * 2));
219 ah->ah_retry_long = conf->long_frame_max_tx_count;
220 ah->ah_retry_short = conf->short_frame_max_tx_count;
222 for (i = 0; i < ah->ah_capabilities.cap_queues.q_tx_num; i++)
223 ath5k_hw_set_tx_retry_limits(ah, i);
243 ath5k_hw_set_antenna_mode(ah, ah->ah_ant_mode);
246 mutex_unlock(&ah->lock);
256 struct ath5k_hw *ah = hw->priv;
257 struct ath_common *common = ath5k_hw_common(ah);
259 mutex_lock(&ah->lock);
265 ath5k_hw_set_bssid(ah);
269 ah->bintval = bss_conf->beacon_int;
274 ah->ah_short_slot = bss_conf->use_short_slot;
275 slot_time = ath5k_hw_get_default_slottime(ah) +
276 3 * ah->ah_coverage_class;
277 ath5k_hw_set_ifs_intervals(ah, slot_time);
283 ah->assoc = vif->cfg.assoc;
285 ah->assoc = ath5k_any_vif_assoc(ah);
287 if (ah->opmode == NL80211_IFTYPE_STATION)
288 ath5k_set_beacon_filter(hw, ah->assoc);
289 ath5k_hw_set_ledstate(ah, ah->assoc ?
292 ATH5K_DBG(ah, ATH5K_DEBUG_ANY,
296 ath5k_hw_set_bssid(ah);
302 spin_lock_bh(&ah->block);
304 spin_unlock_bh(&ah->block);
308 ah->enable_beacon = bss_conf->enable_beacon;
312 ath5k_beacon_config(ah);
314 mutex_unlock(&ah->lock);
340 /* ath5k_hw_set_mcast_filterindex(ah,
375 struct ath5k_hw *ah = hw->priv;
379 mutex_lock(&ah->lock);
390 rfilt = (ath5k_hw_get_rx_filter(ah) & (AR5K_RX_FILTER_PHYERR)) |
406 if ((*new_flags & FIF_BCN_PRBRESP_PROMISC) || (ah->nvifs > 1))
420 switch (ah->opmode) {
433 if (ah->assoc)
444 ah->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
457 ath5k_hw_set_rx_filter(ah, rfilt);
460 ath5k_hw_set_mcast_filter(ah, mfilt[0], mfilt[1]);
463 ah->filter_flags = rfilt;
465 ah->fif_filter_flags = *new_flags;
467 mutex_unlock(&ah->lock);
476 struct ath5k_hw *ah = hw->priv;
477 struct ath_common *common = ath5k_hw_common(ah);
507 mutex_lock(&ah->lock);
530 mutex_unlock(&ah->lock);
540 struct ath5k_hw *ah = hw->priv;
541 if (!ah->assoc)
542 ath5k_hw_set_ledstate(ah, AR5K_LED_SCAN);
549 struct ath5k_hw *ah = hw->priv;
550 ath5k_hw_set_ledstate(ah, ah->assoc ?
559 struct ath5k_hw *ah = hw->priv;
562 ath5k_hw_update_mib_counters(ah);
564 stats->dot11ACKFailureCount = ah->stats.ack_fail;
565 stats->dot11RTSFailureCount = ah->stats.rts_fail;
566 stats->dot11RTSSuccessCount = ah->stats.rts_ok;
567 stats->dot11FCSErrorCount = ah->stats.fcs_error;
578 struct ath5k_hw *ah = hw->priv;
582 if (queue >= ah->ah_capabilities.cap_queues.q_tx_num)
585 mutex_lock(&ah->lock);
587 ath5k_hw_get_tx_queueprops(ah, queue, &qi);
594 ATH5K_DBG(ah, ATH5K_DEBUG_ANY,
600 if (ath5k_hw_set_tx_queueprops(ah, queue, &qi)) {
601 ATH5K_ERR(ah,
605 ath5k_hw_reset_tx_queue(ah, queue);
607 mutex_unlock(&ah->lock);
616 struct ath5k_hw *ah = hw->priv;
618 return ath5k_hw_get_tsf64(ah);
625 struct ath5k_hw *ah = hw->priv;
627 ath5k_hw_set_tsf64(ah, tsf);
634 struct ath5k_hw *ah = hw->priv;
640 if (ah->opmode == NL80211_IFTYPE_ADHOC)
641 ath5k_beacon_update_timers(ah, 0);
643 ath5k_hw_reset_tsf(ah);
650 struct ath5k_hw *ah = hw->priv;
652 struct ath_common *common = ath5k_hw_common(ah);
662 ah->survey.time += cc->cycles / div;
663 ah->survey.time_busy += cc->rx_busy / div;
664 ah->survey.time_rx += cc->rx_frame / div;
665 ah->survey.time_tx += cc->tx_frame / div;
670 memcpy(survey, &ah->survey, sizeof(*survey));
673 survey->noise = ah->ah_noise_floor;
698 struct ath5k_hw *ah = hw->priv;
700 mutex_lock(&ah->lock);
701 ath5k_hw_set_coverage_class(ah, coverage_class);
702 mutex_unlock(&ah->lock);
709 struct ath5k_hw *ah = hw->priv;
712 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_A);
714 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_B);
716 ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
726 struct ath5k_hw *ah = hw->priv;
728 switch (ah->ah_ant_mode) {
743 struct ath5k_hw *ah = hw->priv;
745 *tx = ah->txqs[AR5K_TX_QUEUE_ID_DATA_MIN].txq_max;
754 struct ath5k_hw *ah = hw->priv;
765 for (qnum = 0; qnum < ARRAY_SIZE(ah->txqs); qnum++) {
766 if (!ah->txqs[qnum].setup)
768 if (ah->txqs[qnum].qnum < AR5K_TX_QUEUE_ID_DATA_MIN ||
769 ah->txqs[qnum].qnum > AR5K_TX_QUEUE_ID_DATA_MAX)
772 ah->txqs[qnum].txq_max = tx;
773 if (ah->txqs[qnum].txq_len >= ah->txqs[qnum].txq_max)
774 ieee80211_stop_queue(hw, ah->txqs[qnum].qnum);