mac80211: pass block ack session timeout to to driver
[linux-2.6-block.git] / drivers / net / wireless / st / cw1200 / sta.h
CommitLineData
a910e4a9
SP
1/*
2 * Mac80211 STA interface for ST-Ericsson CW1200 mac80211 drivers
3 *
4 * Copyright (c) 2010, ST-Ericsson
5 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef STA_H_INCLUDED
13#define STA_H_INCLUDED
14
15/* ******************************************************************** */
16/* mac80211 API */
17
18int cw1200_start(struct ieee80211_hw *dev);
19void cw1200_stop(struct ieee80211_hw *dev);
20int cw1200_add_interface(struct ieee80211_hw *dev,
21 struct ieee80211_vif *vif);
22void cw1200_remove_interface(struct ieee80211_hw *dev,
23 struct ieee80211_vif *vif);
24int cw1200_change_interface(struct ieee80211_hw *dev,
25 struct ieee80211_vif *vif,
26 enum nl80211_iftype new_type,
27 bool p2p);
28int cw1200_config(struct ieee80211_hw *dev, u32 changed);
29void cw1200_configure_filter(struct ieee80211_hw *dev,
30 unsigned int changed_flags,
31 unsigned int *total_flags,
32 u64 multicast);
33int cw1200_conf_tx(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
34 u16 queue, const struct ieee80211_tx_queue_params *params);
35int cw1200_get_stats(struct ieee80211_hw *dev,
36 struct ieee80211_low_level_stats *stats);
37int cw1200_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
38 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
39 struct ieee80211_key_conf *key);
40
41int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
42
77be2c54
EG
43void cw1200_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
44 u32 queues, bool drop);
a910e4a9
SP
45
46u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
47 struct netdev_hw_addr_list *mc_list);
48
49int cw1200_set_pm(struct cw1200_common *priv, const struct wsm_set_pm *arg);
50
51/* ******************************************************************** */
52/* WSM callbacks */
53
54void cw1200_join_complete_cb(struct cw1200_common *priv,
55 struct wsm_join_complete *arg);
56
57/* ******************************************************************** */
58/* WSM events */
59
60void cw1200_free_event_queue(struct cw1200_common *priv);
61void cw1200_event_handler(struct work_struct *work);
62void cw1200_bss_loss_work(struct work_struct *work);
63void cw1200_bss_params_work(struct work_struct *work);
64void cw1200_keep_alive_work(struct work_struct *work);
65void cw1200_tx_failure_work(struct work_struct *work);
66
67void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv, int init, int good,
68 int bad);
69static inline void cw1200_cqm_bssloss_sm(struct cw1200_common *priv,
70 int init, int good, int bad)
71{
72 spin_lock(&priv->bss_loss_lock);
73 __cw1200_cqm_bssloss_sm(priv, init, good, bad);
74 spin_unlock(&priv->bss_loss_lock);
75}
76
77/* ******************************************************************** */
78/* Internal API */
79
80int cw1200_setup_mac(struct cw1200_common *priv);
81void cw1200_join_timeout(struct work_struct *work);
82void cw1200_unjoin_work(struct work_struct *work);
83void cw1200_join_complete_work(struct work_struct *work);
84void cw1200_wep_key_work(struct work_struct *work);
85void cw1200_update_listening(struct cw1200_common *priv, bool enabled);
86void cw1200_update_filtering(struct cw1200_common *priv);
87void cw1200_update_filtering_work(struct work_struct *work);
88void cw1200_set_beacon_wakeup_period_work(struct work_struct *work);
89int cw1200_enable_listening(struct cw1200_common *priv);
90int cw1200_disable_listening(struct cw1200_common *priv);
91int cw1200_set_uapsd_param(struct cw1200_common *priv,
92 const struct wsm_edca_params *arg);
93void cw1200_ba_work(struct work_struct *work);
94void cw1200_ba_timer(unsigned long arg);
95
96/* AP stuffs */
97int cw1200_set_tim(struct ieee80211_hw *dev, struct ieee80211_sta *sta,
98 bool set);
99int cw1200_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
100 struct ieee80211_sta *sta);
101int cw1200_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
102 struct ieee80211_sta *sta);
103void cw1200_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
104 enum sta_notify_cmd notify_cmd,
105 struct ieee80211_sta *sta);
106void cw1200_bss_info_changed(struct ieee80211_hw *dev,
107 struct ieee80211_vif *vif,
108 struct ieee80211_bss_conf *info,
109 u32 changed);
110int cw1200_ampdu_action(struct ieee80211_hw *hw,
111 struct ieee80211_vif *vif,
50ea05ef 112 struct ieee80211_ampdu_params *params);
a910e4a9
SP
113
114void cw1200_suspend_resume(struct cw1200_common *priv,
115 struct wsm_suspend_resume *arg);
116void cw1200_set_tim_work(struct work_struct *work);
117void cw1200_set_cts_work(struct work_struct *work);
118void cw1200_multicast_start_work(struct work_struct *work);
119void cw1200_multicast_stop_work(struct work_struct *work);
120void cw1200_mcast_timeout(unsigned long arg);
121
122#endif