mac80211: remove offchannel_tx API
authorJohannes Berg <johannes.berg@intel.com>
Sat, 23 Jul 2011 17:24:48 +0000 (10:24 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Aug 2011 20:04:05 +0000 (16:04 -0400)
For iwlwifi, I decided not to use this API since
it just increased the complexity for little gain.
Since nobody else intends to use it, let's kill
it again. If anybody later needs to have it, we
can always revive it then.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/driver-ops.h
net/mac80211/ieee80211_i.h
net/mac80211/status.c

index f8096bb944652c8d25a2715cfd800188e3b3b84e..2f01d84ca52f2d690eae5f6fd432a92e7b747288 100644 (file)
@@ -1895,11 +1895,6 @@ enum ieee80211_tx_sync_type {
  *     ieee80211_remain_on_channel_expired(). This callback may sleep.
  * @cancel_remain_on_channel: Requests that an ongoing off-channel period is
  *     aborted before it expires. This callback may sleep.
- * @offchannel_tx: Transmit frame on another channel, wait for a response
- *     and return. Reliable TX status must be reported for the frame. If the
- *     return value is 1, then the @remain_on_channel will be used with a
- *     regular transmission (if supported.)
- * @offchannel_tx_cancel_wait: cancel wait associated with offchannel TX
  *
  * @set_ringparam: Set tx and rx ring sizes.
  *
@@ -2018,11 +2013,6 @@ struct ieee80211_ops {
                                 enum nl80211_channel_type channel_type,
                                 int duration);
        int (*cancel_remain_on_channel)(struct ieee80211_hw *hw);
-       int (*offchannel_tx)(struct ieee80211_hw *hw, struct sk_buff *skb,
-                            struct ieee80211_channel *chan,
-                            enum nl80211_channel_type channel_type,
-                            unsigned int wait);
-       int (*offchannel_tx_cancel_wait)(struct ieee80211_hw *hw);
        int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx);
        void (*get_ringparam)(struct ieee80211_hw *hw,
                              u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
index 3d1b091d9b2ece8d632537a443867939db80706b..c1fa5775cef2d4bcfbe044862f46a2e988c880c2 100644 (file)
@@ -1898,33 +1898,6 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
 
        *cookie = (unsigned long) skb;
 
-       if (is_offchan && local->ops->offchannel_tx) {
-               int ret;
-
-               IEEE80211_SKB_CB(skb)->band = chan->band;
-
-               mutex_lock(&local->mtx);
-
-               if (local->hw_offchan_tx_cookie) {
-                       mutex_unlock(&local->mtx);
-                       return -EBUSY;
-               }
-
-               /* TODO: bitrate control, TX processing? */
-               ret = drv_offchannel_tx(local, skb, chan, channel_type, wait);
-
-               if (ret == 0)
-                       local->hw_offchan_tx_cookie = *cookie;
-               mutex_unlock(&local->mtx);
-
-               /*
-                * Allow driver to return 1 to indicate it wants to have the
-                * frame transmitted with a remain_on_channel + regular TX.
-                */
-               if (ret != 1)
-                       return ret;
-       }
-
        if (is_offchan && local->ops->remain_on_channel) {
                unsigned int duration;
                int ret;
@@ -2011,18 +1984,6 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
 
        mutex_lock(&local->mtx);
 
-       if (local->ops->offchannel_tx_cancel_wait &&
-           local->hw_offchan_tx_cookie == cookie) {
-               ret = drv_offchannel_tx_cancel_wait(local);
-
-               if (!ret)
-                       local->hw_offchan_tx_cookie = 0;
-
-               mutex_unlock(&local->mtx);
-
-               return ret;
-       }
-
        if (local->ops->cancel_remain_on_channel) {
                cookie ^= 2;
                ret = ieee80211_cancel_remain_on_channel_hw(local, cookie);
index 1425380983f7055980245d2dede8aa1bfeddf116..9001ff331f0a6efa6c6e1234a7975e4f255d775e 100644 (file)
@@ -590,37 +590,6 @@ static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
        return ret;
 }
 
-static inline int drv_offchannel_tx(struct ieee80211_local *local,
-                                   struct sk_buff *skb,
-                                   struct ieee80211_channel *chan,
-                                   enum nl80211_channel_type channel_type,
-                                   unsigned int wait)
-{
-       int ret;
-
-       might_sleep();
-
-       trace_drv_offchannel_tx(local, skb, chan, channel_type, wait);
-       ret = local->ops->offchannel_tx(&local->hw, skb, chan,
-                                       channel_type, wait);
-       trace_drv_return_int(local, ret);
-
-       return ret;
-}
-
-static inline int drv_offchannel_tx_cancel_wait(struct ieee80211_local *local)
-{
-       int ret;
-
-       might_sleep();
-
-       trace_drv_offchannel_tx_cancel_wait(local);
-       ret = local->ops->offchannel_tx_cancel_wait(&local->hw);
-       trace_drv_return_int(local, ret);
-
-       return ret;
-}
-
 static inline int drv_set_ringparam(struct ieee80211_local *local,
                                    u32 tx, u32 rx)
 {
index 400c09bea63904e933900b27c4dd244c41819b38..286ac5dbeeeacc7af98f7135b1f730513fb4dabf 100644 (file)
@@ -1002,7 +1002,6 @@ struct ieee80211_local {
        unsigned int hw_roc_duration;
        u32 hw_roc_cookie;
        bool hw_roc_for_tx;
-       unsigned long hw_offchan_tx_cookie;
 
        /* dummy netdev for use w/ NAPI */
        struct net_device napi_dev;
index 1658efaa2e8eef4b042ec05ffd875cbd0d3c6ec1..a89cca3491b4c71a2aa17bed5a099b906b6c7d17 100644 (file)
@@ -345,9 +345,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
                        local->hw_roc_skb_for_status = NULL;
                }
 
-               if (cookie == local->hw_offchan_tx_cookie)
-                       local->hw_offchan_tx_cookie = 0;
-
                cfg80211_mgmt_tx_status(
                        skb->dev, cookie, skb->data, skb->len,
                        !!(info->flags & IEEE80211_TX_STAT_ACK), GFP_ATOMIC);