Skip to content

Commit b4ca608

Browse files
jmberg-intellinvjw
authored andcommitted
mac80211: remove offchannel_tx API
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>
1 parent c6baf7f commit b4ca608

5 files changed

Lines changed: 0 additions & 84 deletions

File tree

‎include/net/mac80211.h‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,11 +1895,6 @@ enum ieee80211_tx_sync_type {
18951895
* ieee80211_remain_on_channel_expired(). This callback may sleep.
18961896
* @cancel_remain_on_channel: Requests that an ongoing off-channel period is
18971897
* aborted before it expires. This callback may sleep.
1898-
* @offchannel_tx: Transmit frame on another channel, wait for a response
1899-
* and return. Reliable TX status must be reported for the frame. If the
1900-
* return value is 1, then the @remain_on_channel will be used with a
1901-
* regular transmission (if supported.)
1902-
* @offchannel_tx_cancel_wait: cancel wait associated with offchannel TX
19031898
*
19041899
* @set_ringparam: Set tx and rx ring sizes.
19051900
*
@@ -2018,11 +2013,6 @@ struct ieee80211_ops {
20182013
enum nl80211_channel_type channel_type,
20192014
int duration);
20202015
int (*cancel_remain_on_channel)(struct ieee80211_hw *hw);
2021-
int (*offchannel_tx)(struct ieee80211_hw *hw, struct sk_buff *skb,
2022-
struct ieee80211_channel *chan,
2023-
enum nl80211_channel_type channel_type,
2024-
unsigned int wait);
2025-
int (*offchannel_tx_cancel_wait)(struct ieee80211_hw *hw);
20262016
int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx);
20272017
void (*get_ringparam)(struct ieee80211_hw *hw,
20282018
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);

‎net/mac80211/cfg.c‎

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,33 +1898,6 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
18981898

18991899
*cookie = (unsigned long) skb;
19001900

1901-
if (is_offchan && local->ops->offchannel_tx) {
1902-
int ret;
1903-
1904-
IEEE80211_SKB_CB(skb)->band = chan->band;
1905-
1906-
mutex_lock(&local->mtx);
1907-
1908-
if (local->hw_offchan_tx_cookie) {
1909-
mutex_unlock(&local->mtx);
1910-
return -EBUSY;
1911-
}
1912-
1913-
/* TODO: bitrate control, TX processing? */
1914-
ret = drv_offchannel_tx(local, skb, chan, channel_type, wait);
1915-
1916-
if (ret == 0)
1917-
local->hw_offchan_tx_cookie = *cookie;
1918-
mutex_unlock(&local->mtx);
1919-
1920-
/*
1921-
* Allow driver to return 1 to indicate it wants to have the
1922-
* frame transmitted with a remain_on_channel + regular TX.
1923-
*/
1924-
if (ret != 1)
1925-
return ret;
1926-
}
1927-
19281901
if (is_offchan && local->ops->remain_on_channel) {
19291902
unsigned int duration;
19301903
int ret;
@@ -2011,18 +1984,6 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
20111984

20121985
mutex_lock(&local->mtx);
20131986

2014-
if (local->ops->offchannel_tx_cancel_wait &&
2015-
local->hw_offchan_tx_cookie == cookie) {
2016-
ret = drv_offchannel_tx_cancel_wait(local);
2017-
2018-
if (!ret)
2019-
local->hw_offchan_tx_cookie = 0;
2020-
2021-
mutex_unlock(&local->mtx);
2022-
2023-
return ret;
2024-
}
2025-
20261987
if (local->ops->cancel_remain_on_channel) {
20271988
cookie ^= 2;
20281989
ret = ieee80211_cancel_remain_on_channel_hw(local, cookie);

‎net/mac80211/driver-ops.h‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -590,37 +590,6 @@ static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
590590
return ret;
591591
}
592592

593-
static inline int drv_offchannel_tx(struct ieee80211_local *local,
594-
struct sk_buff *skb,
595-
struct ieee80211_channel *chan,
596-
enum nl80211_channel_type channel_type,
597-
unsigned int wait)
598-
{
599-
int ret;
600-
601-
might_sleep();
602-
603-
trace_drv_offchannel_tx(local, skb, chan, channel_type, wait);
604-
ret = local->ops->offchannel_tx(&local->hw, skb, chan,
605-
channel_type, wait);
606-
trace_drv_return_int(local, ret);
607-
608-
return ret;
609-
}
610-
611-
static inline int drv_offchannel_tx_cancel_wait(struct ieee80211_local *local)
612-
{
613-
int ret;
614-
615-
might_sleep();
616-
617-
trace_drv_offchannel_tx_cancel_wait(local);
618-
ret = local->ops->offchannel_tx_cancel_wait(&local->hw);
619-
trace_drv_return_int(local, ret);
620-
621-
return ret;
622-
}
623-
624593
static inline int drv_set_ringparam(struct ieee80211_local *local,
625594
u32 tx, u32 rx)
626595
{

‎net/mac80211/ieee80211_i.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,6 @@ struct ieee80211_local {
10021002
unsigned int hw_roc_duration;
10031003
u32 hw_roc_cookie;
10041004
bool hw_roc_for_tx;
1005-
unsigned long hw_offchan_tx_cookie;
10061005

10071006
/* dummy netdev for use w/ NAPI */
10081007
struct net_device napi_dev;

‎net/mac80211/status.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
345345
local->hw_roc_skb_for_status = NULL;
346346
}
347347

348-
if (cookie == local->hw_offchan_tx_cookie)
349-
local->hw_offchan_tx_cookie = 0;
350-
351348
cfg80211_mgmt_tx_status(
352349
skb->dev, cookie, skb->data, skb->len,
353350
!!(info->flags & IEEE80211_TX_STAT_ACK), GFP_ATOMIC);

0 commit comments

Comments
 (0)