diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 80 |
1 files changed, 65 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 780ac5eac501..753a245c5ad1 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "wmi.h" | 32 | #include "wmi.h" |
33 | 33 | ||
34 | #define ATH_STA_SHORT_CALINTERVAL 1000 /* 1 second */ | 34 | #define ATH_STA_SHORT_CALINTERVAL 1000 /* 1 second */ |
35 | #define ATH_AP_SHORT_CALINTERVAL 100 /* 100 ms */ | ||
35 | #define ATH_ANI_POLLINTERVAL 100 /* 100 ms */ | 36 | #define ATH_ANI_POLLINTERVAL 100 /* 100 ms */ |
36 | #define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */ | 37 | #define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */ |
37 | #define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */ | 38 | #define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */ |
@@ -204,8 +205,50 @@ struct ath9k_htc_target_stats { | |||
204 | __be32 ht_tx_xretries; | 205 | __be32 ht_tx_xretries; |
205 | } __packed; | 206 | } __packed; |
206 | 207 | ||
208 | #define ATH9K_HTC_MAX_VIF 2 | ||
209 | #define ATH9K_HTC_MAX_BCN_VIF 2 | ||
210 | |||
211 | #define INC_VIF(_priv, _type) do { \ | ||
212 | switch (_type) { \ | ||
213 | case NL80211_IFTYPE_STATION: \ | ||
214 | _priv->num_sta_vif++; \ | ||
215 | break; \ | ||
216 | case NL80211_IFTYPE_ADHOC: \ | ||
217 | _priv->num_ibss_vif++; \ | ||
218 | break; \ | ||
219 | case NL80211_IFTYPE_AP: \ | ||
220 | _priv->num_ap_vif++; \ | ||
221 | break; \ | ||
222 | default: \ | ||
223 | break; \ | ||
224 | } \ | ||
225 | } while (0) | ||
226 | |||
227 | #define DEC_VIF(_priv, _type) do { \ | ||
228 | switch (_type) { \ | ||
229 | case NL80211_IFTYPE_STATION: \ | ||
230 | _priv->num_sta_vif--; \ | ||
231 | break; \ | ||
232 | case NL80211_IFTYPE_ADHOC: \ | ||
233 | _priv->num_ibss_vif--; \ | ||
234 | break; \ | ||
235 | case NL80211_IFTYPE_AP: \ | ||
236 | _priv->num_ap_vif--; \ | ||
237 | break; \ | ||
238 | default: \ | ||
239 | break; \ | ||
240 | } \ | ||
241 | } while (0) | ||
242 | |||
207 | struct ath9k_htc_vif { | 243 | struct ath9k_htc_vif { |
208 | u8 index; | 244 | u8 index; |
245 | u16 seq_no; | ||
246 | bool beacon_configured; | ||
247 | }; | ||
248 | |||
249 | struct ath9k_vif_iter_data { | ||
250 | const u8 *hw_macaddr; | ||
251 | u8 mask[ETH_ALEN]; | ||
209 | }; | 252 | }; |
210 | 253 | ||
211 | #define ATH9K_HTC_MAX_STA 8 | 254 | #define ATH9K_HTC_MAX_STA 8 |
@@ -310,10 +353,8 @@ struct ath_led { | |||
310 | 353 | ||
311 | struct htc_beacon_config { | 354 | struct htc_beacon_config { |
312 | u16 beacon_interval; | 355 | u16 beacon_interval; |
313 | u16 listen_interval; | ||
314 | u16 dtim_period; | 356 | u16 dtim_period; |
315 | u16 bmiss_timeout; | 357 | u16 bmiss_timeout; |
316 | u8 dtim_count; | ||
317 | }; | 358 | }; |
318 | 359 | ||
319 | struct ath_btcoex { | 360 | struct ath_btcoex { |
@@ -333,13 +374,12 @@ void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv); | |||
333 | #define OP_SCANNING BIT(1) | 374 | #define OP_SCANNING BIT(1) |
334 | #define OP_LED_ASSOCIATED BIT(2) | 375 | #define OP_LED_ASSOCIATED BIT(2) |
335 | #define OP_LED_ON BIT(3) | 376 | #define OP_LED_ON BIT(3) |
336 | #define OP_PREAMBLE_SHORT BIT(4) | 377 | #define OP_ENABLE_BEACON BIT(4) |
337 | #define OP_PROTECT_ENABLE BIT(5) | 378 | #define OP_LED_DEINIT BIT(5) |
338 | #define OP_ASSOCIATED BIT(6) | 379 | #define OP_BT_PRIORITY_DETECTED BIT(6) |
339 | #define OP_ENABLE_BEACON BIT(7) | 380 | #define OP_BT_SCAN BIT(7) |
340 | #define OP_LED_DEINIT BIT(8) | 381 | #define OP_ANI_RUNNING BIT(8) |
341 | #define OP_BT_PRIORITY_DETECTED BIT(9) | 382 | #define OP_TSF_RESET BIT(9) |
342 | #define OP_BT_SCAN BIT(10) | ||
343 | 383 | ||
344 | struct ath9k_htc_priv { | 384 | struct ath9k_htc_priv { |
345 | struct device *dev; | 385 | struct device *dev; |
@@ -358,15 +398,24 @@ struct ath9k_htc_priv { | |||
358 | enum htc_endpoint_id data_vi_ep; | 398 | enum htc_endpoint_id data_vi_ep; |
359 | enum htc_endpoint_id data_vo_ep; | 399 | enum htc_endpoint_id data_vo_ep; |
360 | 400 | ||
401 | u8 vif_slot; | ||
402 | u8 mon_vif_idx; | ||
403 | u8 sta_slot; | ||
404 | u8 vif_sta_pos[ATH9K_HTC_MAX_VIF]; | ||
405 | u8 num_ibss_vif; | ||
406 | u8 num_sta_vif; | ||
407 | u8 num_ap_vif; | ||
408 | |||
361 | u16 op_flags; | 409 | u16 op_flags; |
362 | u16 curtxpow; | 410 | u16 curtxpow; |
363 | u16 txpowlimit; | 411 | u16 txpowlimit; |
364 | u16 nvifs; | 412 | u16 nvifs; |
365 | u16 nstations; | 413 | u16 nstations; |
366 | u16 seq_no; | ||
367 | u32 bmiss_cnt; | 414 | u32 bmiss_cnt; |
415 | bool rearm_ani; | ||
416 | bool reconfig_beacon; | ||
368 | 417 | ||
369 | struct ath9k_hw_cal_data caldata[ATH9K_NUM_CHANNELS]; | 418 | struct ath9k_hw_cal_data caldata; |
370 | 419 | ||
371 | spinlock_t beacon_lock; | 420 | spinlock_t beacon_lock; |
372 | 421 | ||
@@ -382,7 +431,7 @@ struct ath9k_htc_priv { | |||
382 | struct ath9k_htc_rx rx; | 431 | struct ath9k_htc_rx rx; |
383 | struct tasklet_struct tx_tasklet; | 432 | struct tasklet_struct tx_tasklet; |
384 | struct sk_buff_head tx_queue; | 433 | struct sk_buff_head tx_queue; |
385 | struct delayed_work ath9k_ani_work; | 434 | struct delayed_work ani_work; |
386 | struct work_struct ps_work; | 435 | struct work_struct ps_work; |
387 | struct work_struct fatal_work; | 436 | struct work_struct fatal_work; |
388 | 437 | ||
@@ -424,6 +473,7 @@ void ath9k_htc_reset(struct ath9k_htc_priv *priv); | |||
424 | void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv); | 473 | void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv); |
425 | void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv, | 474 | void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv, |
426 | struct ieee80211_vif *vif); | 475 | struct ieee80211_vif *vif); |
476 | void ath9k_htc_beacon_reconfig(struct ath9k_htc_priv *priv); | ||
427 | void ath9k_htc_swba(struct ath9k_htc_priv *priv, u8 beacon_pending); | 477 | void ath9k_htc_swba(struct ath9k_htc_priv *priv, u8 beacon_pending); |
428 | 478 | ||
429 | void ath9k_htc_rxep(void *priv, struct sk_buff *skb, | 479 | void ath9k_htc_rxep(void *priv, struct sk_buff *skb, |
@@ -436,8 +486,9 @@ void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb, | |||
436 | int ath9k_htc_update_cap_target(struct ath9k_htc_priv *priv); | 486 | int ath9k_htc_update_cap_target(struct ath9k_htc_priv *priv); |
437 | void ath9k_htc_station_work(struct work_struct *work); | 487 | void ath9k_htc_station_work(struct work_struct *work); |
438 | void ath9k_htc_aggr_work(struct work_struct *work); | 488 | void ath9k_htc_aggr_work(struct work_struct *work); |
439 | void ath9k_ani_work(struct work_struct *work);; | 489 | void ath9k_htc_ani_work(struct work_struct *work); |
440 | void ath_start_ani(struct ath9k_htc_priv *priv); | 490 | void ath9k_htc_start_ani(struct ath9k_htc_priv *priv); |
491 | void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv); | ||
441 | 492 | ||
442 | int ath9k_tx_init(struct ath9k_htc_priv *priv); | 493 | int ath9k_tx_init(struct ath9k_htc_priv *priv); |
443 | void ath9k_tx_tasklet(unsigned long data); | 494 | void ath9k_tx_tasklet(unsigned long data); |
@@ -460,7 +511,6 @@ void ath9k_htc_ps_restore(struct ath9k_htc_priv *priv); | |||
460 | void ath9k_ps_work(struct work_struct *work); | 511 | void ath9k_ps_work(struct work_struct *work); |
461 | bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, | 512 | bool ath9k_htc_setpower(struct ath9k_htc_priv *priv, |
462 | enum ath9k_power_mode mode); | 513 | enum ath9k_power_mode mode); |
463 | void ath_update_txpow(struct ath9k_htc_priv *priv); | ||
464 | 514 | ||
465 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv); | 515 | void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv); |
466 | void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw); | 516 | void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw); |