Lines Matching refs:rt2x00dev
19 void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, in rt2x00lib_config_intf() argument
60 if (mac || (!rt2x00dev->intf_ap_count && !rt2x00dev->intf_sta_count)) in rt2x00lib_config_intf()
62 if (bssid || (!rt2x00dev->intf_ap_count && !rt2x00dev->intf_sta_count)) in rt2x00lib_config_intf()
65 rt2x00dev->ops->lib->config_intf(rt2x00dev, intf, &conf, flags); in rt2x00lib_config_intf()
68 void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, in rt2x00lib_config_erp() argument
90 rt2x00dev->aid = bss_conf->assoc ? bss_conf->aid : 0; in rt2x00lib_config_erp()
91 rt2x00dev->last_beacon = bss_conf->sync_tsf; in rt2x00lib_config_erp()
94 rt2x00dev->beacon_int = bss_conf->beacon_int; in rt2x00lib_config_erp()
99 rt2x00dev->ops->lib->config_erp(rt2x00dev, &erp, changed); in rt2x00lib_config_erp()
102 void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, in rt2x00lib_config_antenna() argument
105 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00lib_config_antenna()
106 struct antenna_setup *def = &rt2x00dev->default_ant; in rt2x00lib_config_antenna()
107 struct antenna_setup *active = &rt2x00dev->link.ant.active; in rt2x00lib_config_antenna()
145 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) in rt2x00lib_config_antenna()
146 rt2x00queue_stop_queue(rt2x00dev->rx); in rt2x00lib_config_antenna()
153 rt2x00dev->ops->lib->config_ant(rt2x00dev, &config); in rt2x00lib_config_antenna()
155 rt2x00link_reset_tuner(rt2x00dev, true); in rt2x00lib_config_antenna()
159 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) in rt2x00lib_config_antenna()
160 rt2x00queue_start_queue(rt2x00dev->rx); in rt2x00lib_config_antenna()
163 static u16 rt2x00ht_center_channel(struct rt2x00_dev *rt2x00dev, in rt2x00ht_center_channel() argument
166 struct hw_mode_spec *spec = &rt2x00dev->spec; in rt2x00ht_center_channel()
191 void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, in rt2x00lib_config() argument
207 set_bit(CONFIG_HT_DISABLED, &rt2x00dev->flags); in rt2x00lib_config()
209 clear_bit(CONFIG_HT_DISABLED, &rt2x00dev->flags); in rt2x00lib_config()
212 set_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags); in rt2x00lib_config()
213 hw_value = rt2x00ht_center_channel(rt2x00dev, conf); in rt2x00lib_config()
215 clear_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags); in rt2x00lib_config()
220 &rt2x00dev->spec.channels[hw_value], in rt2x00lib_config()
224 &rt2x00dev->spec.channels_info[hw_value], in rt2x00lib_config()
228 rt2x00dev->rf_channel = libconf.rf.channel; in rt2x00lib_config()
231 if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_PS_AUTOWAKE) && in rt2x00lib_config()
233 cancel_delayed_work_sync(&rt2x00dev->autowakeup_work); in rt2x00lib_config()
238 rt2x00dev->ops->lib->config(rt2x00dev, &libconf, ieee80211_flags); in rt2x00lib_config()
241 set_bit(CONFIG_POWERSAVING, &rt2x00dev->flags); in rt2x00lib_config()
243 clear_bit(CONFIG_POWERSAVING, &rt2x00dev->flags); in rt2x00lib_config()
246 set_bit(CONFIG_MONITORING, &rt2x00dev->flags); in rt2x00lib_config()
248 clear_bit(CONFIG_MONITORING, &rt2x00dev->flags); in rt2x00lib_config()
250 rt2x00dev->curr_band = conf->chandef.chan->band; in rt2x00lib_config()
251 rt2x00dev->curr_freq = conf->chandef.chan->center_freq; in rt2x00lib_config()
252 rt2x00dev->tx_power = conf->power_level; in rt2x00lib_config()
253 rt2x00dev->short_retry = conf->short_frame_max_tx_count; in rt2x00lib_config()
254 rt2x00dev->long_retry = conf->long_frame_max_tx_count; in rt2x00lib_config()
261 rt2x00link_reset_tuner(rt2x00dev, false); in rt2x00lib_config()
263 if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) && in rt2x00lib_config()
264 rt2x00_has_cap_flag(rt2x00dev, REQUIRE_PS_AUTOWAKE) && in rt2x00lib_config()
267 beacon_diff = (long)jiffies - (long)rt2x00dev->last_beacon; in rt2x00lib_config()
268 beacon_int = msecs_to_jiffies(rt2x00dev->beacon_int); in rt2x00lib_config()
274 queue_delayed_work(rt2x00dev->workqueue, in rt2x00lib_config()
275 &rt2x00dev->autowakeup_work, in rt2x00lib_config()