Lines Matching refs:rt2x00dev

19 static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
34 skb = dev_alloc_skb(data_length + rt2x00dev->hw->extra_tx_headroom);
36 rt2x00_warn(rt2x00dev, "Failed to create RTS/CTS frame\n");
40 skb_reserve(skb, rt2x00dev->hw->extra_tx_headroom);
69 data_length += rt2x00crypto_tx_overhead(rt2x00dev, skb);
72 ieee80211_ctstoself_get(rt2x00dev->hw, tx_info->control.vif,
76 ieee80211_rts_get(rt2x00dev->hw, tx_info->control.vif,
83 rt2x00_warn(rt2x00dev, "Failed to send RTS/CTS frame\n");
93 struct rt2x00_dev *rt2x00dev = hw->priv;
104 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
111 rt2x00_has_cap_flag(rt2x00dev, REQUIRE_ATIM_QUEUE))
114 queue = rt2x00queue_get_tx_queue(rt2x00dev, qid);
116 rt2x00_err(rt2x00dev,
131 if (!rt2x00dev->ops->hw->set_rts_threshold &&
147 if (rt2x00mac_tx_rts_cts(rt2x00dev, queue, skb))
163 struct rt2x00_dev *rt2x00dev = hw->priv;
165 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
168 if (test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) {
173 set_bit(DEVICE_STATE_RESET, &rt2x00dev->flags);
174 rt2x00dev->ops->lib->pre_reset_hw(rt2x00dev);
175 rt2x00lib_stop(rt2x00dev);
177 return rt2x00lib_start(rt2x00dev);
183 struct rt2x00_dev *rt2x00dev = hw->priv;
185 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
188 rt2x00lib_stop(rt2x00dev);
196 struct rt2x00_dev *rt2x00dev = hw->priv;
199 clear_bit(DEVICE_STATE_RESET, &rt2x00dev->flags);
206 struct rt2x00_dev *rt2x00dev = hw->priv;
208 struct data_queue *queue = rt2x00dev->bcn;
216 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
217 !test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags))
241 rt2x00dev->intf_ap_count++;
243 rt2x00dev->intf_sta_count++;
257 rt2x00lib_config_intf(rt2x00dev, intf, vif->type,
265 rt2x00dev->packet_filter = 0;
274 struct rt2x00_dev *rt2x00dev = hw->priv;
282 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
283 (vif->type == NL80211_IFTYPE_AP && !rt2x00dev->intf_ap_count) ||
284 (vif->type != NL80211_IFTYPE_AP && !rt2x00dev->intf_sta_count))
288 rt2x00dev->intf_ap_count--;
290 rt2x00dev->intf_sta_count--;
302 rt2x00lib_config_intf(rt2x00dev, intf,
309 struct rt2x00_dev *rt2x00dev = hw->priv;
316 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
326 rt2x00queue_stop_queue(rt2x00dev->rx);
329 mutex_lock(&rt2x00dev->conf_mutex);
335 rt2x00lib_config(rt2x00dev, conf, changed);
344 rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant);
346 mutex_unlock(&rt2x00dev->conf_mutex);
349 rt2x00queue_start_queue(rt2x00dev->rx);
360 struct rt2x00_dev *rt2x00dev = hw->priv;
389 if (!rt2x00_has_cap_control_filters(rt2x00dev)) {
393 if (!rt2x00_has_cap_control_filter_pspoll(rt2x00dev)) {
398 rt2x00dev->packet_filter = *total_flags;
400 rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags);
421 struct rt2x00_dev *rt2x00dev = hw->priv;
423 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
427 rt2x00dev->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
428 rt2x00mac_set_tim_iter, rt2x00dev);
431 ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->intf_work);
459 struct rt2x00_dev *rt2x00dev = hw->priv;
460 int (*set_key) (struct rt2x00_dev *rt2x00dev,
468 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
472 if (!rt2x00_has_cap_hw_crypto(rt2x00dev) || (sta && sta->mfp))
488 crypto.bssidx = rt2x00lib_get_bssidx(rt2x00dev, vif);
492 if (crypto.cipher == CIPHER_TKIP && rt2x00_is_usb(rt2x00dev))
528 set_key = rt2x00dev->ops->lib->config_pairwise_key;
530 set_key = rt2x00dev->ops->lib->config_shared_key;
535 return set_key(rt2x00dev, &crypto, key);
544 struct rt2x00_dev *rt2x00dev = hw->priv;
545 set_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags);
546 rt2x00link_stop_tuner(rt2x00dev);
553 struct rt2x00_dev *rt2x00dev = hw->priv;
554 clear_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags);
555 rt2x00link_start_tuner(rt2x00dev);
562 struct rt2x00_dev *rt2x00dev = hw->priv;
569 memcpy(stats, &rt2x00dev->low_level_stats, sizeof(*stats));
580 struct rt2x00_dev *rt2x00dev = hw->priv;
587 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
594 rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL,
607 if (test_bit(DEVICE_STATE_RESET, &rt2x00dev->flags) &&
610 rt2x00queue_clear_beacon(rt2x00dev, vif);
614 rt2x00dev->intf_beaconing--;
617 if (rt2x00dev->intf_beaconing == 0) {
622 rt2x00queue_stop_queue(rt2x00dev->bcn);
629 rt2x00queue_clear_beacon(rt2x00dev, vif);
631 rt2x00dev->intf_beaconing++;
637 if (rt2x00_is_usb(rt2x00dev))
638 rt2x00queue_update_beacon(rt2x00dev, vif);
640 if (rt2x00dev->intf_beaconing == 1) {
645 rt2x00queue_start_queue(rt2x00dev->bcn);
658 rt2x00dev->link.count = 0;
661 rt2x00dev->intf_associated++;
663 rt2x00dev->intf_associated--;
665 rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
675 rt2x00lib_config_erp(rt2x00dev, intf, bss_conf, changes);
683 struct rt2x00_dev *rt2x00dev = hw->priv;
686 queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx);
707 rt2x00_dbg(rt2x00dev,
718 struct rt2x00_dev *rt2x00dev = hw->priv;
719 bool active = !!rt2x00dev->ops->lib->rfkill_poll(rt2x00dev);
728 struct rt2x00_dev *rt2x00dev = hw->priv;
731 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
734 set_bit(DEVICE_STATE_FLUSHING, &rt2x00dev->flags);
736 tx_queue_for_each(rt2x00dev, queue)
739 clear_bit(DEVICE_STATE_FLUSHING, &rt2x00dev->flags);
745 struct rt2x00_dev *rt2x00dev = hw->priv;
746 struct link_ant *ant = &rt2x00dev->link.ant;
747 struct antenna_setup *def = &rt2x00dev->default_ant;
782 rt2x00lib_config_antenna(rt2x00dev, setup);
790 struct rt2x00_dev *rt2x00dev = hw->priv;
791 struct link_ant *ant = &rt2x00dev->link.ant;
792 struct antenna_setup *active = &rt2x00dev->link.ant.active;
813 struct rt2x00_dev *rt2x00dev = hw->priv;
816 tx_queue_for_each(rt2x00dev, queue) {
821 *rx = rt2x00dev->rx->length;
822 *rx_max = rt2x00dev->rx->limit;
828 struct rt2x00_dev *rt2x00dev = hw->priv;
831 tx_queue_for_each(rt2x00dev, queue) {