Lines Matching refs:rt2x00dev
30 static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, in rt2x00mac_tx_rts_cts() argument
45 skb = dev_alloc_skb(data_length + rt2x00dev->hw->extra_tx_headroom); in rt2x00mac_tx_rts_cts()
47 rt2x00_warn(rt2x00dev, "Failed to create RTS/CTS frame\n"); in rt2x00mac_tx_rts_cts()
51 skb_reserve(skb, rt2x00dev->hw->extra_tx_headroom); in rt2x00mac_tx_rts_cts()
80 data_length += rt2x00crypto_tx_overhead(rt2x00dev, skb); in rt2x00mac_tx_rts_cts()
83 ieee80211_ctstoself_get(rt2x00dev->hw, tx_info->control.vif, in rt2x00mac_tx_rts_cts()
87 ieee80211_rts_get(rt2x00dev->hw, tx_info->control.vif, in rt2x00mac_tx_rts_cts()
94 rt2x00_warn(rt2x00dev, "Failed to send RTS/CTS frame\n"); in rt2x00mac_tx_rts_cts()
104 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_tx() local
115 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_tx()
122 rt2x00_has_cap_flag(rt2x00dev, REQUIRE_ATIM_QUEUE)) in rt2x00mac_tx()
125 queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); in rt2x00mac_tx()
127 rt2x00_err(rt2x00dev, in rt2x00mac_tx()
142 if (!rt2x00dev->ops->hw->set_rts_threshold && in rt2x00mac_tx()
158 if (rt2x00mac_tx_rts_cts(rt2x00dev, queue, skb)) in rt2x00mac_tx()
174 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_start() local
176 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_start()
179 return rt2x00lib_start(rt2x00dev); in rt2x00mac_start()
185 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_stop() local
187 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_stop()
190 rt2x00lib_stop(rt2x00dev); in rt2x00mac_stop()
197 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_add_interface() local
199 struct data_queue *queue = rt2x00dev->bcn; in rt2x00mac_add_interface()
207 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || in rt2x00mac_add_interface()
208 !test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) in rt2x00mac_add_interface()
232 rt2x00dev->intf_ap_count++; in rt2x00mac_add_interface()
234 rt2x00dev->intf_sta_count++; in rt2x00mac_add_interface()
248 rt2x00lib_config_intf(rt2x00dev, intf, vif->type, in rt2x00mac_add_interface()
256 rt2x00dev->packet_filter = 0; in rt2x00mac_add_interface()
265 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_remove_interface() local
273 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || in rt2x00mac_remove_interface()
274 (vif->type == NL80211_IFTYPE_AP && !rt2x00dev->intf_ap_count) || in rt2x00mac_remove_interface()
275 (vif->type != NL80211_IFTYPE_AP && !rt2x00dev->intf_sta_count)) in rt2x00mac_remove_interface()
279 rt2x00dev->intf_ap_count--; in rt2x00mac_remove_interface()
281 rt2x00dev->intf_sta_count--; in rt2x00mac_remove_interface()
293 rt2x00lib_config_intf(rt2x00dev, intf, in rt2x00mac_remove_interface()
300 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_config() local
307 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_config()
317 rt2x00queue_stop_queue(rt2x00dev->rx); in rt2x00mac_config()
320 mutex_lock(&rt2x00dev->conf_mutex); in rt2x00mac_config()
326 rt2x00lib_config(rt2x00dev, conf, changed); in rt2x00mac_config()
335 rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant); in rt2x00mac_config()
337 mutex_unlock(&rt2x00dev->conf_mutex); in rt2x00mac_config()
340 rt2x00queue_start_queue(rt2x00dev->rx); in rt2x00mac_config()
351 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_configure_filter() local
380 if (!rt2x00_has_cap_control_filters(rt2x00dev)) { in rt2x00mac_configure_filter()
384 if (!rt2x00_has_cap_control_filter_pspoll(rt2x00dev)) { in rt2x00mac_configure_filter()
389 rt2x00dev->packet_filter = *total_flags; in rt2x00mac_configure_filter()
391 rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags); in rt2x00mac_configure_filter()
412 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_set_tim() local
414 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) in rt2x00mac_set_tim()
418 rt2x00dev->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in rt2x00mac_set_tim()
419 rt2x00mac_set_tim_iter, rt2x00dev); in rt2x00mac_set_tim()
422 ieee80211_queue_work(rt2x00dev->hw, &rt2x00dev->intf_work); in rt2x00mac_set_tim()
450 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_set_key() local
451 int (*set_key) (struct rt2x00_dev *rt2x00dev, in rt2x00mac_set_key()
459 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_set_key()
462 if (!rt2x00_has_cap_hw_crypto(rt2x00dev)) in rt2x00mac_set_key()
478 crypto.bssidx = rt2x00lib_get_bssidx(rt2x00dev, vif); in rt2x00mac_set_key()
482 if (crypto.cipher == CIPHER_TKIP && rt2x00_is_usb(rt2x00dev)) in rt2x00mac_set_key()
518 set_key = rt2x00dev->ops->lib->config_pairwise_key; in rt2x00mac_set_key()
520 set_key = rt2x00dev->ops->lib->config_shared_key; in rt2x00mac_set_key()
525 return set_key(rt2x00dev, &crypto, key); in rt2x00mac_set_key()
534 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_sw_scan_start() local
535 set_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags); in rt2x00mac_sw_scan_start()
536 rt2x00link_stop_tuner(rt2x00dev); in rt2x00mac_sw_scan_start()
543 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_sw_scan_complete() local
544 clear_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags); in rt2x00mac_sw_scan_complete()
545 rt2x00link_start_tuner(rt2x00dev); in rt2x00mac_sw_scan_complete()
552 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_get_stats() local
559 memcpy(stats, &rt2x00dev->low_level_stats, sizeof(*stats)); in rt2x00mac_get_stats()
570 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_bss_info_changed() local
577 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_bss_info_changed()
584 rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL, in rt2x00mac_bss_info_changed()
593 rt2x00dev->intf_beaconing--; in rt2x00mac_bss_info_changed()
596 if (rt2x00dev->intf_beaconing == 0) { in rt2x00mac_bss_info_changed()
601 rt2x00queue_stop_queue(rt2x00dev->bcn); in rt2x00mac_bss_info_changed()
608 rt2x00queue_clear_beacon(rt2x00dev, vif); in rt2x00mac_bss_info_changed()
610 rt2x00dev->intf_beaconing++; in rt2x00mac_bss_info_changed()
616 if (rt2x00_is_usb(rt2x00dev)) in rt2x00mac_bss_info_changed()
617 rt2x00queue_update_beacon(rt2x00dev, vif); in rt2x00mac_bss_info_changed()
619 if (rt2x00dev->intf_beaconing == 1) { in rt2x00mac_bss_info_changed()
624 rt2x00queue_start_queue(rt2x00dev->bcn); in rt2x00mac_bss_info_changed()
637 rt2x00dev->link.count = 0; in rt2x00mac_bss_info_changed()
640 rt2x00dev->intf_associated++; in rt2x00mac_bss_info_changed()
642 rt2x00dev->intf_associated--; in rt2x00mac_bss_info_changed()
644 rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated); in rt2x00mac_bss_info_changed()
646 clear_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags); in rt2x00mac_bss_info_changed()
655 set_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags); in rt2x00mac_bss_info_changed()
664 rt2x00lib_config_erp(rt2x00dev, intf, bss_conf, changes); in rt2x00mac_bss_info_changed()
672 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_conf_tx() local
675 queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx); in rt2x00mac_conf_tx()
696 rt2x00_dbg(rt2x00dev, in rt2x00mac_conf_tx()
707 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_rfkill_poll() local
708 bool active = !!rt2x00dev->ops->lib->rfkill_poll(rt2x00dev); in rt2x00mac_rfkill_poll()
717 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_flush() local
720 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) in rt2x00mac_flush()
723 tx_queue_for_each(rt2x00dev, queue) in rt2x00mac_flush()
730 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_set_antenna() local
731 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00mac_set_antenna()
732 struct antenna_setup *def = &rt2x00dev->default_ant; in rt2x00mac_set_antenna()
767 rt2x00lib_config_antenna(rt2x00dev, setup); in rt2x00mac_set_antenna()
775 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_get_antenna() local
776 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00mac_get_antenna()
777 struct antenna_setup *active = &rt2x00dev->link.ant.active; in rt2x00mac_get_antenna()
798 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_get_ringparam() local
801 tx_queue_for_each(rt2x00dev, queue) { in rt2x00mac_get_ringparam()
806 *rx = rt2x00dev->rx->length; in rt2x00mac_get_ringparam()
807 *rx_max = rt2x00dev->rx->limit; in rt2x00mac_get_ringparam()
813 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00mac_tx_frames_pending() local
816 tx_queue_for_each(rt2x00dev, queue) { in rt2x00mac_tx_frames_pending()