Commit | Line | Data |
---|---|---|
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 | ||
18 | int cw1200_start(struct ieee80211_hw *dev); | |
19 | void cw1200_stop(struct ieee80211_hw *dev); | |
20 | int cw1200_add_interface(struct ieee80211_hw *dev, | |
21 | struct ieee80211_vif *vif); | |
22 | void cw1200_remove_interface(struct ieee80211_hw *dev, | |
23 | struct ieee80211_vif *vif); | |
24 | int cw1200_change_interface(struct ieee80211_hw *dev, | |
25 | struct ieee80211_vif *vif, | |
26 | enum nl80211_iftype new_type, | |
27 | bool p2p); | |
28 | int cw1200_config(struct ieee80211_hw *dev, u32 changed); | |
29 | void cw1200_configure_filter(struct ieee80211_hw *dev, | |
30 | unsigned int changed_flags, | |
31 | unsigned int *total_flags, | |
32 | u64 multicast); | |
33 | int cw1200_conf_tx(struct ieee80211_hw *dev, struct ieee80211_vif *vif, | |
34 | u16 queue, const struct ieee80211_tx_queue_params *params); | |
35 | int cw1200_get_stats(struct ieee80211_hw *dev, | |
36 | struct ieee80211_low_level_stats *stats); | |
37 | int 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 | ||
41 | int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value); | |
42 | ||
43 | void cw1200_flush(struct ieee80211_hw *hw, u32 queues, bool drop); | |
44 | ||
45 | u64 cw1200_prepare_multicast(struct ieee80211_hw *hw, | |
46 | struct netdev_hw_addr_list *mc_list); | |
47 | ||
48 | int cw1200_set_pm(struct cw1200_common *priv, const struct wsm_set_pm *arg); | |
49 | ||
50 | /* ******************************************************************** */ | |
51 | /* WSM callbacks */ | |
52 | ||
53 | void cw1200_join_complete_cb(struct cw1200_common *priv, | |
54 | struct wsm_join_complete *arg); | |
55 | ||
56 | /* ******************************************************************** */ | |
57 | /* WSM events */ | |
58 | ||
59 | void cw1200_free_event_queue(struct cw1200_common *priv); | |
60 | void cw1200_event_handler(struct work_struct *work); | |
61 | void cw1200_bss_loss_work(struct work_struct *work); | |
62 | void cw1200_bss_params_work(struct work_struct *work); | |
63 | void cw1200_keep_alive_work(struct work_struct *work); | |
64 | void cw1200_tx_failure_work(struct work_struct *work); | |
65 | ||
66 | void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv, int init, int good, | |
67 | int bad); | |
68 | static inline void cw1200_cqm_bssloss_sm(struct cw1200_common *priv, | |
69 | int init, int good, int bad) | |
70 | { | |
71 | spin_lock(&priv->bss_loss_lock); | |
72 | __cw1200_cqm_bssloss_sm(priv, init, good, bad); | |
73 | spin_unlock(&priv->bss_loss_lock); | |
74 | } | |
75 | ||
76 | /* ******************************************************************** */ | |
77 | /* Internal API */ | |
78 | ||
79 | int cw1200_setup_mac(struct cw1200_common *priv); | |
80 | void cw1200_join_timeout(struct work_struct *work); | |
81 | void cw1200_unjoin_work(struct work_struct *work); | |
82 | void cw1200_join_complete_work(struct work_struct *work); | |
83 | void cw1200_wep_key_work(struct work_struct *work); | |
84 | void cw1200_update_listening(struct cw1200_common *priv, bool enabled); | |
85 | void cw1200_update_filtering(struct cw1200_common *priv); | |
86 | void cw1200_update_filtering_work(struct work_struct *work); | |
87 | void cw1200_set_beacon_wakeup_period_work(struct work_struct *work); | |
88 | int cw1200_enable_listening(struct cw1200_common *priv); | |
89 | int cw1200_disable_listening(struct cw1200_common *priv); | |
90 | int cw1200_set_uapsd_param(struct cw1200_common *priv, | |
91 | const struct wsm_edca_params *arg); | |
92 | void cw1200_ba_work(struct work_struct *work); | |
93 | void cw1200_ba_timer(unsigned long arg); | |
94 | ||
95 | /* AP stuffs */ | |
96 | int cw1200_set_tim(struct ieee80211_hw *dev, struct ieee80211_sta *sta, | |
97 | bool set); | |
98 | int cw1200_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |
99 | struct ieee80211_sta *sta); | |
100 | int cw1200_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |
101 | struct ieee80211_sta *sta); | |
102 | void cw1200_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif, | |
103 | enum sta_notify_cmd notify_cmd, | |
104 | struct ieee80211_sta *sta); | |
105 | void cw1200_bss_info_changed(struct ieee80211_hw *dev, | |
106 | struct ieee80211_vif *vif, | |
107 | struct ieee80211_bss_conf *info, | |
108 | u32 changed); | |
109 | int cw1200_ampdu_action(struct ieee80211_hw *hw, | |
110 | struct ieee80211_vif *vif, | |
111 | enum ieee80211_ampdu_mlme_action action, | |
112 | struct ieee80211_sta *sta, u16 tid, u16 *ssn, | |
113 | u8 buf_size); | |
114 | ||
115 | void cw1200_suspend_resume(struct cw1200_common *priv, | |
116 | struct wsm_suspend_resume *arg); | |
117 | void cw1200_set_tim_work(struct work_struct *work); | |
118 | void cw1200_set_cts_work(struct work_struct *work); | |
119 | void cw1200_multicast_start_work(struct work_struct *work); | |
120 | void cw1200_multicast_stop_work(struct work_struct *work); | |
121 | void cw1200_mcast_timeout(unsigned long arg); | |
122 | ||
123 | #endif |