aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-09 06:49:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-12 14:19:38 -0400
commit177958e9679c23537411066cc41b205635dacb14 (patch)
tree9c5b4cebbe1cf1ba17a45b9aa660cde82619a958
parent3789d59c24cb142e4590492c3b5137a7c3dec352 (diff)
mac80211: remove tx_sync
When the station state callback was added, this was no longer needed in theory. With the iwlwifi changes to remove use of it landing, we can kill the entire tx-sync framework again, RIP. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/net/mac80211.h41
-rw-r--r--net/mac80211/driver-ops.h35
-rw-r--r--net/mac80211/driver-trace.h43
-rw-r--r--net/mac80211/ieee80211_i.h1
-rw-r--r--net/mac80211/mlme.c41
5 files changed, 0 insertions, 161 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f7917f765cb..44e4dfcb572 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1766,20 +1766,6 @@ enum ieee80211_ampdu_mlme_action {
1766}; 1766};
1767 1767
1768/** 1768/**
1769 * enum ieee80211_tx_sync_type - TX sync type
1770 * @IEEE80211_TX_SYNC_AUTH: sync TX for authentication
1771 * (and possibly also before direct probe)
1772 * @IEEE80211_TX_SYNC_ASSOC: sync TX for association
1773 * @IEEE80211_TX_SYNC_ACTION: sync TX for action frame
1774 * (not implemented yet)
1775 */
1776enum ieee80211_tx_sync_type {
1777 IEEE80211_TX_SYNC_AUTH,
1778 IEEE80211_TX_SYNC_ASSOC,
1779 IEEE80211_TX_SYNC_ACTION,
1780};
1781
1782/**
1783 * enum ieee80211_frame_release_type - frame release reason 1769 * enum ieee80211_frame_release_type - frame release reason
1784 * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll 1770 * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll
1785 * @IEEE80211_FRAME_RELEASE_UAPSD: frame(s) released due to 1771 * @IEEE80211_FRAME_RELEASE_UAPSD: frame(s) released due to
@@ -1889,26 +1875,6 @@ enum ieee80211_frame_release_type {
1889 * of the bss parameters has changed when a call is made. The callback 1875 * of the bss parameters has changed when a call is made. The callback
1890 * can sleep. 1876 * can sleep.
1891 * 1877 *
1892 * @tx_sync: Called before a frame is sent to an AP/GO. In the GO case, the
1893 * driver should sync with the GO's powersaving so the device doesn't
1894 * transmit the frame while the GO is asleep. In the regular AP case
1895 * it may be used by drivers for devices implementing other restrictions
1896 * on talking to APs, e.g. due to regulatory enforcement or just HW
1897 * restrictions.
1898 * This function is called for every authentication, association and
1899 * action frame separately since applications might attempt to auth
1900 * with multiple APs before chosing one to associate to. If it returns
1901 * an error, the corresponding authentication, association or frame
1902 * transmission is aborted and reported as having failed. It is always
1903 * called after tuning to the correct channel.
1904 * The callback might be called multiple times before @finish_tx_sync
1905 * (but @finish_tx_sync will be called once for each) but in practice
1906 * this is unlikely to happen. It can also refuse in that case if the
1907 * driver cannot handle that situation.
1908 * This callback can sleep.
1909 * @finish_tx_sync: Called as a counterpart to @tx_sync, unless that returned
1910 * an error. This callback can sleep.
1911 *
1912 * @prepare_multicast: Prepare for multicast filter configuration. 1878 * @prepare_multicast: Prepare for multicast filter configuration.
1913 * This callback is optional, and its return value is passed 1879 * This callback is optional, and its return value is passed
1914 * to configure_filter(). This callback must be atomic. 1880 * to configure_filter(). This callback must be atomic.
@@ -2180,13 +2146,6 @@ struct ieee80211_ops {
2180 struct ieee80211_bss_conf *info, 2146 struct ieee80211_bss_conf *info,
2181 u32 changed); 2147 u32 changed);
2182 2148
2183 int (*tx_sync)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2184 const u8 *bssid, enum ieee80211_tx_sync_type type);
2185 void (*finish_tx_sync)(struct ieee80211_hw *hw,
2186 struct ieee80211_vif *vif,
2187 const u8 *bssid,
2188 enum ieee80211_tx_sync_type type);
2189
2190 u64 (*prepare_multicast)(struct ieee80211_hw *hw, 2149 u64 (*prepare_multicast)(struct ieee80211_hw *hw,
2191 struct netdev_hw_addr_list *mc_list); 2150 struct netdev_hw_addr_list *mc_list);
2192 void (*configure_filter)(struct ieee80211_hw *hw, 2151 void (*configure_filter)(struct ieee80211_hw *hw,
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 70dfb6415c2..af4691fed64 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -168,41 +168,6 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local,
168 trace_drv_return_void(local); 168 trace_drv_return_void(local);
169} 169}
170 170
171static inline int drv_tx_sync(struct ieee80211_local *local,
172 struct ieee80211_sub_if_data *sdata,
173 const u8 *bssid,
174 enum ieee80211_tx_sync_type type)
175{
176 int ret = 0;
177
178 might_sleep();
179
180 check_sdata_in_driver(sdata);
181
182 trace_drv_tx_sync(local, sdata, bssid, type);
183 if (local->ops->tx_sync)
184 ret = local->ops->tx_sync(&local->hw, &sdata->vif,
185 bssid, type);
186 trace_drv_return_int(local, ret);
187 return ret;
188}
189
190static inline void drv_finish_tx_sync(struct ieee80211_local *local,
191 struct ieee80211_sub_if_data *sdata,
192 const u8 *bssid,
193 enum ieee80211_tx_sync_type type)
194{
195 might_sleep();
196
197 check_sdata_in_driver(sdata);
198
199 trace_drv_finish_tx_sync(local, sdata, bssid, type);
200 if (local->ops->finish_tx_sync)
201 local->ops->finish_tx_sync(&local->hw, &sdata->vif,
202 bssid, type);
203 trace_drv_return_void(local);
204}
205
206static inline u64 drv_prepare_multicast(struct ieee80211_local *local, 171static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
207 struct netdev_hw_addr_list *mc_list) 172 struct netdev_hw_addr_list *mc_list)
208{ 173{
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 384e2f08c18..7034209ad3f 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -308,49 +308,6 @@ TRACE_EVENT(drv_bss_info_changed,
308 ) 308 )
309); 309);
310 310
311DECLARE_EVENT_CLASS(tx_sync_evt,
312 TP_PROTO(struct ieee80211_local *local,
313 struct ieee80211_sub_if_data *sdata,
314 const u8 *bssid,
315 enum ieee80211_tx_sync_type type),
316 TP_ARGS(local, sdata, bssid, type),
317
318 TP_STRUCT__entry(
319 LOCAL_ENTRY
320 VIF_ENTRY
321 __array(char, bssid, ETH_ALEN)
322 __field(u32, sync_type)
323 ),
324
325 TP_fast_assign(
326 LOCAL_ASSIGN;
327 VIF_ASSIGN;
328 memcpy(__entry->bssid, bssid, ETH_ALEN);
329 __entry->sync_type = type;
330 ),
331
332 TP_printk(
333 LOCAL_PR_FMT VIF_PR_FMT " bssid:%pM type:%d",
334 LOCAL_PR_ARG, VIF_PR_ARG, __entry->bssid, __entry->sync_type
335 )
336);
337
338DEFINE_EVENT(tx_sync_evt, drv_tx_sync,
339 TP_PROTO(struct ieee80211_local *local,
340 struct ieee80211_sub_if_data *sdata,
341 const u8 *bssid,
342 enum ieee80211_tx_sync_type type),
343 TP_ARGS(local, sdata, bssid, type)
344);
345
346DEFINE_EVENT(tx_sync_evt, drv_finish_tx_sync,
347 TP_PROTO(struct ieee80211_local *local,
348 struct ieee80211_sub_if_data *sdata,
349 const u8 *bssid,
350 enum ieee80211_tx_sync_type type),
351 TP_ARGS(local, sdata, bssid, type)
352);
353
354TRACE_EVENT(drv_prepare_multicast, 311TRACE_EVENT(drv_prepare_multicast,
355 TP_PROTO(struct ieee80211_local *local, int mc_count), 312 TP_PROTO(struct ieee80211_local *local, int mc_count),
356 313
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 796b13bfc95..3c62ded64e3 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -388,7 +388,6 @@ struct ieee80211_mgd_auth_data {
388 388
389 u8 key[WLAN_KEY_LEN_WEP104]; 389 u8 key[WLAN_KEY_LEN_WEP104];
390 u8 key_len, key_idx; 390 u8 key_len, key_idx;
391 bool synced;
392 bool done; 391 bool done;
393 392
394 size_t ie_len; 393 size_t ie_len;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c08924aeac0..1d09df248c5 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1770,11 +1770,6 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata,
1770 1770
1771 lockdep_assert_held(&sdata->u.mgd.mtx); 1771 lockdep_assert_held(&sdata->u.mgd.mtx);
1772 1772
1773 if (auth_data->synced)
1774 drv_finish_tx_sync(sdata->local, sdata,
1775 auth_data->bss->bssid,
1776 IEEE80211_TX_SYNC_AUTH);
1777
1778 if (!assoc) { 1773 if (!assoc) {
1779 sta_info_destroy_addr(sdata, auth_data->bss->bssid); 1774 sta_info_destroy_addr(sdata, auth_data->bss->bssid);
1780 1775
@@ -1862,10 +1857,6 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
1862 1857
1863 printk(KERN_DEBUG "%s: authenticated\n", sdata->name); 1858 printk(KERN_DEBUG "%s: authenticated\n", sdata->name);
1864 out: 1859 out:
1865 if (ifmgd->auth_data->synced)
1866 drv_finish_tx_sync(sdata->local, sdata, bssid,
1867 IEEE80211_TX_SYNC_AUTH);
1868 ifmgd->auth_data->synced = false;
1869 ifmgd->auth_data->done = true; 1860 ifmgd->auth_data->done = true;
1870 ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC; 1861 ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
1871 run_again(ifmgd, ifmgd->auth_data->timeout); 1862 run_again(ifmgd, ifmgd->auth_data->timeout);
@@ -2005,11 +1996,6 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata,
2005 1996
2006 lockdep_assert_held(&sdata->u.mgd.mtx); 1997 lockdep_assert_held(&sdata->u.mgd.mtx);
2007 1998
2008 if (assoc_data->synced)
2009 drv_finish_tx_sync(sdata->local, sdata,
2010 assoc_data->bss->bssid,
2011 IEEE80211_TX_SYNC_ASSOC);
2012
2013 if (!assoc) { 1999 if (!assoc) {
2014 sta_info_destroy_addr(sdata, assoc_data->bss->bssid); 2000 sta_info_destroy_addr(sdata, assoc_data->bss->bssid);
2015 2001
@@ -2255,14 +2241,6 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
2255 } else { 2241 } else {
2256 printk(KERN_DEBUG "%s: associated\n", sdata->name); 2242 printk(KERN_DEBUG "%s: associated\n", sdata->name);
2257 2243
2258 /* tell driver about sync done first */
2259 if (assoc_data->synced) {
2260 drv_finish_tx_sync(sdata->local, sdata,
2261 assoc_data->bss->bssid,
2262 IEEE80211_TX_SYNC_ASSOC);
2263 assoc_data->synced = false;
2264 }
2265
2266 if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) { 2244 if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) {
2267 /* oops -- internal error -- send timeout for now */ 2245 /* oops -- internal error -- send timeout for now */
2268 ieee80211_destroy_assoc_data(sdata, true); 2246 ieee80211_destroy_assoc_data(sdata, true);
@@ -2747,14 +2725,6 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
2747 if (WARN_ON_ONCE(!auth_data)) 2725 if (WARN_ON_ONCE(!auth_data))
2748 return -EINVAL; 2726 return -EINVAL;
2749 2727
2750 if (!auth_data->synced) {
2751 int ret = drv_tx_sync(local, sdata, auth_data->bss->bssid,
2752 IEEE80211_TX_SYNC_AUTH);
2753 if (ret)
2754 return ret;
2755 }
2756 auth_data->synced = true;
2757
2758 auth_data->tries++; 2728 auth_data->tries++;
2759 2729
2760 if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { 2730 if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) {
@@ -2811,14 +2781,6 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata)
2811 2781
2812 lockdep_assert_held(&sdata->u.mgd.mtx); 2782 lockdep_assert_held(&sdata->u.mgd.mtx);
2813 2783
2814 if (!assoc_data->synced) {
2815 int ret = drv_tx_sync(local, sdata, assoc_data->bss->bssid,
2816 IEEE80211_TX_SYNC_ASSOC);
2817 if (ret)
2818 return ret;
2819 }
2820 assoc_data->synced = true;
2821
2822 assoc_data->tries++; 2784 assoc_data->tries++;
2823 if (assoc_data->tries > IEEE80211_ASSOC_MAX_TRIES) { 2785 if (assoc_data->tries > IEEE80211_ASSOC_MAX_TRIES) {
2824 printk(KERN_DEBUG "%s: association with %pM timed out\n", 2786 printk(KERN_DEBUG "%s: association with %pM timed out\n",
@@ -3245,9 +3207,6 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
3245 3207
3246 err = ieee80211_probe_auth(sdata); 3208 err = ieee80211_probe_auth(sdata);
3247 if (err) { 3209 if (err) {
3248 if (auth_data->synced)
3249 drv_finish_tx_sync(local, sdata, req->bss->bssid,
3250 IEEE80211_TX_SYNC_AUTH);
3251 sta_info_destroy_addr(sdata, req->bss->bssid); 3210 sta_info_destroy_addr(sdata, req->bss->bssid);
3252 goto err_clear; 3211 goto err_clear;
3253 } 3212 }