Remove unsupported mode IW_MODE_ADHOC because this mode is only partially
coded in the driver. This patch series removes the unused functions.
Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s)
Transferred this patch over wlan connection of rtl8192e.
Philipp Hortmann (7):
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_tx.c
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_rx.c
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_core.c
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_cam.c
staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_softmac.c
staging: rtl8192e: Remove delayed_work start_ibss_wq
staging: rtl8192e: Remove rtllib_stop_send_beacons
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 44 +--
.../staging/rtl8192e/rtl8192e/r8192E_dev.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 61 +---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 22 +-
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 -
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 6 +-
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 5 +-
drivers/staging/rtl8192e/rtl819x_HTProc.c | 64 +----
drivers/staging/rtl8192e/rtl819x_TSProc.c | 21 +-
drivers/staging/rtl8192e/rtllib.h | 23 --
drivers/staging/rtl8192e/rtllib_rx.c | 38 ---
drivers/staging/rtl8192e/rtllib_softmac.c | 264 +-----------------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 10 -
drivers/staging/rtl8192e/rtllib_tx.c | 11 +-
14 files changed, 22 insertions(+), 550 deletions(-)
--
2.42.0
Remove unsupported mode IW_MODE_ADHOC from rtllib_tx.c, rtl819x_TSProc.c,
rtl819x_HTProc.c, r8192E_dev.c
Signed-off-by: Philipp Hortmann <[email protected]>
---
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 20 +-----------
drivers/staging/rtl8192e/rtl819x_HTProc.c | 32 +------------------
drivers/staging/rtl8192e/rtl819x_TSProc.c | 21 ++++--------
drivers/staging/rtl8192e/rtllib_tx.c | 11 +------
4 files changed, 10 insertions(+), 74 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 95be6fb043dd..fe9f6585266b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -55,10 +55,6 @@ static void _rtl92e_update_msr(struct net_device *dev)
if (priv->rtllib->link_state == MAC80211_LINKED)
msr |= MSR_LINK_MANAGED;
break;
- case IW_MODE_ADHOC:
- if (priv->rtllib->link_state == MAC80211_LINKED)
- msr |= MSR_LINK_ADHOC;
- break;
default:
break;
}
@@ -706,7 +702,6 @@ static void _rtl92e_net_update(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_network *net;
- u16 BcnTimeCfg = 0, BcnCW = 6, BcnIFS = 0xf;
u16 rate_config = 0;
net = &priv->rtllib->current_network;
@@ -715,19 +710,6 @@ static void _rtl92e_net_update(struct net_device *dev)
priv->basic_rate = rate_config &= 0x15f;
rtl92e_writew(dev, BSSIDR, *(u16 *)net->bssid);
rtl92e_writel(dev, BSSIDR + 2, *(u32 *)(net->bssid + 2));
-
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- rtl92e_writew(dev, ATIMWND, 2);
- rtl92e_writew(dev, BCN_DMATIME, 256);
- rtl92e_writew(dev, BCN_INTERVAL, net->beacon_interval);
- rtl92e_writew(dev, BCN_DRV_EARLY_INT, 10);
- rtl92e_writeb(dev, BCN_ERR_THRESH, 100);
-
- BcnTimeCfg |= (BcnCW << BCN_TCFG_CW_SHIFT);
- BcnTimeCfg |= BcnIFS << BCN_TCFG_IFS;
-
- rtl92e_writew(dev, BCN_TCFG, BcnTimeCfg);
- }
}
void rtl92e_link_change(struct net_device *dev)
@@ -749,7 +731,7 @@ void rtl92e_link_change(struct net_device *dev)
}
_rtl92e_update_msr(dev);
- if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) {
+ if (ieee->iw_mode == IW_MODE_INFRA) {
u32 reg;
reg = rtl92e_readl(dev, RCR);
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index f19feea46158..0f14d9eb4fcd 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -352,7 +352,6 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo,
u8 *len, u8 IsEncrypt)
{
- struct rt_hi_throughput *pHT = ieee->ht_info;
struct ht_info_ele *pHTInfoEle = (struct ht_info_ele *)posHTInfo;
if (!posHTInfo || !pHTInfoEle) {
@@ -363,32 +362,7 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo,
}
memset(posHTInfo, 0, *len);
- if (ieee->iw_mode == IW_MODE_ADHOC) {
- pHTInfoEle->ControlChl = ieee->current_network.channel;
- pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz) ?
- HT_EXTCHNL_OFFSET_NO_EXT :
- (ieee->current_network.channel <= 6)
- ? HT_EXTCHNL_OFFSET_UPPER :
- HT_EXTCHNL_OFFSET_LOWER);
- pHTInfoEle->RecommemdedTxWidth = pHT->bRegBW40MHz;
- pHTInfoEle->RIFS = 0;
- pHTInfoEle->PSMPAccessOnly = 0;
- pHTInfoEle->SrvIntGranularity = 0;
- pHTInfoEle->OptMode = pHT->current_op_mode;
- pHTInfoEle->NonGFDevPresent = 0;
- pHTInfoEle->DualBeacon = 0;
- pHTInfoEle->SecondaryBeacon = 0;
- pHTInfoEle->LSigTxopProtectFull = 0;
- pHTInfoEle->PcoActive = 0;
- pHTInfoEle->PcoPhase = 0;
-
- memset(pHTInfoEle->BasicMSC, 0, 16);
-
- *len = 22 + 2;
-
- } else {
- *len = 0;
- }
+ *len = 0;
}
void HTConstructRT2RTAggElement(struct rtllib_device *ieee, u8 *posRT2RTAgg,
@@ -781,10 +755,6 @@ void HTUseDefaultSetting(struct rtllib_device *ieee)
ht_info->bCurShortGI20MHz = ht_info->bRegShortGI20MHz;
ht_info->bCurShortGI40MHz = ht_info->bRegShortGI40MHz;
-
- if (ieee->iw_mode == IW_MODE_ADHOC)
- ieee->current_network.qos_data.active =
- ieee->current_network.qos_data.supported;
ht_info->bCurrent_AMSDU_Support = ht_info->bAMSDU_Support;
ht_info->nCurrent_AMSDU_MaxSize = ht_info->nAMSDU_MaxSize;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 637e22897803..a482acd5ee06 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -181,21 +181,14 @@ static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee,
struct list_head *psearch_list;
struct ts_common_info *pRet = NULL;
- if (ieee->iw_mode == IW_MODE_ADHOC) {
- if (TxRxSelect == TX_DIR)
- search_dir[DIR_UP] = true;
- else
- search_dir[DIR_DOWN] = true;
+ if (TxRxSelect == TX_DIR) {
+ search_dir[DIR_UP] = true;
+ search_dir[DIR_BI_DIR] = true;
+ search_dir[DIR_DIRECT] = true;
} else {
- if (TxRxSelect == TX_DIR) {
- search_dir[DIR_UP] = true;
- search_dir[DIR_BI_DIR] = true;
- search_dir[DIR_DIRECT] = true;
- } else {
- search_dir[DIR_DOWN] = true;
- search_dir[DIR_BI_DIR] = true;
- search_dir[DIR_DIRECT] = true;
- }
+ search_dir[DIR_DOWN] = true;
+ search_dir[DIR_BI_DIR] = true;
+ search_dir[DIR_DIRECT] = true;
}
if (TxRxSelect == TX_DIR)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 9b77d6fa7954..bad01599033b 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -482,8 +482,7 @@ static void rtllib_txrate_selectmode(struct rtllib_device *ieee,
tcb_desc->tx_use_drv_assinged_rate = true;
if (!tcb_desc->tx_dis_rate_fallback ||
!tcb_desc->tx_use_drv_assinged_rate) {
- if (ieee->iw_mode == IW_MODE_INFRA ||
- ieee->iw_mode == IW_MODE_ADHOC)
+ if (ieee->iw_mode == IW_MODE_INFRA)
tcb_desc->ratr_index = 0;
}
}
@@ -677,14 +676,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
ieee->current_network.bssid);
else
ether_addr_copy(header.addr3, dest);
- } else if (ieee->iw_mode == IW_MODE_ADHOC) {
- /* not From/To DS: Addr1 = DA, Addr2 = SA,
- * Addr3 = BSSID
- */
- ether_addr_copy(header.addr1, dest);
- ether_addr_copy(header.addr2, src);
- ether_addr_copy(header.addr3,
- ieee->current_network.bssid);
}
bIsMulticast = is_multicast_ether_addr(header.addr1);
--
2.42.0
Remove unsupported mode IW_MODE_ADHOC from rtl_core.c and further files.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 14 +-------------
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 6 +-----
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 5 ++---
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 9 ---------
5 files changed, 4 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index cbb082d8b89f..03cabf88ce2b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -165,8 +165,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
case rf_off:
- if ((priv->rtllib->iw_mode == IW_MODE_INFRA) ||
- (priv->rtllib->iw_mode == IW_MODE_ADHOC)) {
+ if (priv->rtllib->iw_mode == IW_MODE_INFRA) {
if ((priv->rtllib->rf_off_reason > RF_CHANGE_BY_IPS) ||
(change_source > RF_CHANGE_BY_IPS)) {
if (ieee->link_state == MAC80211_LINKED)
@@ -1088,17 +1087,6 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
schedule_work(&ieee->associate_complete_wq);
- } else if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode ==
- IW_MODE_ADHOC) {
- ieee->set_chan(ieee->dev,
- ieee->current_network.channel);
- ieee->link_change(ieee->dev);
-
- notify_wx_assoc_event(ieee);
-
- rtllib_start_send_beacons(ieee);
-
- netif_carrier_on(ieee->dev);
}
rtl92e_cam_restore(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index dbf765d601b3..561ea68de56a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -1405,8 +1405,6 @@ static void _rtl92e_dm_check_edca_turbo(struct net_device *dev)
unsigned long curTxOkCnt = 0;
unsigned long curRxOkCnt = 0;
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC)
- goto dm_CheckEdcaTurbo_EXIT;
if (priv->rtllib->link_state != MAC80211_LINKED)
goto dm_CheckEdcaTurbo_EXIT;
if (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_DISABLE_EDCA_TURBO)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
index 598bfc0ff3d1..a4da11627199 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
@@ -181,9 +181,6 @@ static bool _rtl92e_ps_set_mode(struct net_device *dev, u8 rtPsMode)
{
struct r8192_priv *priv = rtllib_priv(dev);
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC)
- return false;
-
if (!priv->ps_force)
priv->rtllib->ps = rtPsMode;
if (priv->rtllib->sta_sleep != LPS_IS_WAKE &&
@@ -208,8 +205,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
&priv->rtllib->pwr_save_ctrl;
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
- (priv->rtllib->link_state == MAC80211_LINKED))
- || (priv->rtllib->iw_mode == IW_MODE_ADHOC))
+ (priv->rtllib->link_state == MAC80211_LINKED)))
return;
if (psc->bLeisurePs) {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 189798852568..17e7fcc01f70 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -250,7 +250,7 @@ static int _rtl92e_wx_set_mode(struct net_device *dev,
return 0;
rt_state = priv->rtllib->rf_power_state;
mutex_lock(&priv->wx_mutex);
- if (wrqu->mode == IW_MODE_ADHOC || wrqu->mode == IW_MODE_MONITOR ||
+ if (wrqu->mode == IW_MODE_MONITOR ||
ieee->net_promiscuous_md) {
if (rt_state == rf_off) {
if (priv->rtllib->rf_off_reason >
@@ -844,8 +844,7 @@ static int _rtl92e_wx_set_encode_ext(struct net_device *dev,
idx--;
group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY;
- if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) ||
- (alg == KEY_TYPE_WEP40)) {
+ if ((!group) || (alg == KEY_TYPE_WEP40)) {
if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40))
alg = KEY_TYPE_WEP104;
ieee->pairwise_key_type = alg;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 48703d93df30..2b15251201ec 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -50,12 +50,6 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
}
ieee->current_network.channel = fwrq->m;
ieee->set_chan(ieee->dev, ieee->current_network.channel);
-
- if (ieee->iw_mode == IW_MODE_ADHOC)
- if (ieee->link_state == MAC80211_LINKED) {
- rtllib_stop_send_beacons(ieee);
- rtllib_start_send_beacons(ieee);
- }
}
ret = 0;
@@ -360,9 +354,6 @@ void rtllib_wx_sync_scan_wq(void *data)
ieee->link_detect_info.NumRecvBcnInPeriod = 1;
ieee->link_detect_info.NumRecvDataInPeriod = 1;
}
- if (ieee->iw_mode == IW_MODE_ADHOC)
- rtllib_start_send_beacons(ieee);
-
rtllib_wake_all_queues(ieee);
out:
--
2.42.0
Remove unsupported mode IW_MODE_ADHOC from rtl_cam.c.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 61 +++------------------
1 file changed, 7 insertions(+), 54 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
index 944cc73fb2b6..14b48cacfbbd 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
@@ -33,11 +33,6 @@ void rtl92e_enable_hw_security_config(struct net_device *dev)
(priv->rtllib->auth_mode != 2)) {
SECR_value |= SCR_RxUseDK;
SECR_value |= SCR_TxUseDK;
- } else if ((ieee->iw_mode == IW_MODE_ADHOC) &&
- (ieee->pairwise_key_type & (KEY_TYPE_CCMP |
- KEY_TYPE_TKIP))) {
- SECR_value |= SCR_RxUseDK;
- SECR_value |= SCR_TxUseDK;
}
ieee->hwsec_active = 1;
@@ -157,29 +152,14 @@ void rtl92e_cam_restore(struct net_device *dev)
}
} else if (priv->rtllib->pairwise_key_type == KEY_TYPE_TKIP) {
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- (const u8 *)dev->dev_addr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- } else {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- MacAddr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- }
-
+ rtl92e_set_key(dev, 4, 0,
+ priv->rtllib->pairwise_key_type,
+ MacAddr, 0,
+ (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
} else if (priv->rtllib->pairwise_key_type == KEY_TYPE_CCMP) {
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- (const u8 *)dev->dev_addr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- } else {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type, MacAddr,
- 0, (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- }
+ rtl92e_set_key(dev, 4, 0,
+ priv->rtllib->pairwise_key_type, MacAddr,
+ 0, (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
}
if (priv->rtllib->group_key_type == KEY_TYPE_TKIP) {
@@ -192,19 +172,6 @@ void rtl92e_cam_restore(struct net_device *dev)
(u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0]));
}
}
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- if (priv->rtllib->swcamtable[0].bused) {
- rtl92e_set_key(dev, 0, 0,
- priv->rtllib->group_key_type,
- CAM_CONST_ADDR[0], 0,
- (u32 *)(&priv->rtllib->swcamtable[0].key_buf[0]));
- } else {
- netdev_warn(dev,
- "%s(): ADHOC TKIP: missing key entry.\n",
- __func__);
- return;
- }
- }
} else if (priv->rtllib->group_key_type == KEY_TYPE_CCMP) {
MacAddr = CAM_CONST_BROAD;
for (EntryId = 1; EntryId < 4; EntryId++) {
@@ -215,19 +182,5 @@ void rtl92e_cam_restore(struct net_device *dev)
(u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0]));
}
}
-
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- if (priv->rtllib->swcamtable[0].bused) {
- rtl92e_set_key(dev, 0, 0,
- priv->rtllib->group_key_type,
- CAM_CONST_ADDR[0], 0,
- (u32 *)(&priv->rtllib->swcamtable[0].key_buf[0]));
- } else {
- netdev_warn(dev,
- "%s(): ADHOC CCMP: missing key entry.\n",
- __func__);
- return;
- }
- }
}
}
--
2.42.0
rtllib_start_send_beacons() is removed so no need for
rtllib_stop_send_beacons() anymore.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 -------
drivers/staging/rtl8192e/rtllib.h | 9 ---------
drivers/staging/rtl8192e/rtllib_softmac.c | 21 --------------------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 1 -
4 files changed, 38 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 208c7bfd9bfe..87f5441fbb10 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -458,10 +458,6 @@ static void _rtl92e_prepare_beacon(struct tasklet_struct *t)
pdesc->OWN = 1;
}
-static void _rtl92e_stop_beacon(struct net_device *dev)
-{
-}
-
void rtl92e_config_rate(struct net_device *dev, u16 *rate_config)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -700,8 +696,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->set_bw_mode_handler = rtl92e_set_bw_mode;
priv->rf_set_chan = rtl92e_set_channel;
- priv->rtllib->stop_send_beacons = _rtl92e_stop_beacon;
-
priv->rtllib->sta_wake_up = rtl92e_hw_wakeup;
priv->rtllib->enter_sleep_state = rtl92e_enter_sleep;
priv->rtllib->ps_is_queue_empty = _rtl92e_is_tx_queue_empty;
@@ -1045,7 +1039,6 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
if (ieee->link_state == MAC80211_LINKED) {
mutex_lock(&ieee->wx_mutex);
netdev_info(dev, "ieee->link_state is MAC80211_LINKED\n");
- rtllib_stop_send_beacons(priv->rtllib);
del_timer_sync(&ieee->associate_timer);
cancel_delayed_work(&ieee->associate_retry_wq);
rtllib_stop_scan(ieee);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 410401869ebb..0597dcb759e0 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1495,14 +1495,6 @@ struct rtllib_device {
*/
void (*link_change)(struct net_device *dev);
- /* these two function indicates to the HW when to start
- * and stop to send beacons. This is used when the
- * IEEE_SOFTMAC_BEACONS is not set. For now the
- * stop_send_bacons is NOT guaranteed to be called only
- * after start_send_beacons.
- */
- void (*stop_send_beacons)(struct net_device *dev);
-
/* power save mode related */
void (*sta_wake_up)(struct net_device *dev);
void (*enter_sleep_state)(struct net_device *dev, u64 time);
@@ -1725,7 +1717,6 @@ void rtllib_reset_queue(struct rtllib_device *ieee);
void rtllib_wake_all_queues(struct rtllib_device *ieee);
void rtllib_stop_all_queues(struct rtllib_device *ieee);
struct sk_buff *rtllib_get_beacon(struct rtllib_device *ieee);
-void rtllib_stop_send_beacons(struct rtllib_device *ieee);
void notify_wx_assoc_event(struct rtllib_device *ieee);
void rtllib_ps_tx_ack(struct rtllib_device *ieee, short success);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 4551071e9f1b..982578e1c0af 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -607,26 +607,6 @@ static void rtllib_softmac_scan_wq(void *data)
mutex_unlock(&ieee->scan_mutex);
}
-static void rtllib_beacons_stop(struct rtllib_device *ieee)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&ieee->beacon_lock, flags);
-
- ieee->beacon_txing = 0;
-
- spin_unlock_irqrestore(&ieee->beacon_lock, flags);
- del_timer_sync(&ieee->beacon_timer);
-}
-
-void rtllib_stop_send_beacons(struct rtllib_device *ieee)
-{
- ieee->stop_send_beacons(ieee->dev);
- if (ieee->softmac_features & IEEE_SOFTMAC_BEACONS)
- rtllib_beacons_stop(ieee);
-}
-EXPORT_SYMBOL(rtllib_stop_send_beacons);
-
static void rtllib_softmac_stop_scan(struct rtllib_device *ieee)
{
mutex_lock(&ieee->scan_mutex);
@@ -2326,7 +2306,6 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown)
ieee->rtllib_ips_leave(ieee->dev);
}
- rtllib_stop_send_beacons(ieee);
del_timer_sync(&ieee->associate_timer);
cancel_delayed_work_sync(&ieee->associate_retry_wq);
cancel_delayed_work_sync(&ieee->link_change_wq);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 2b15251201ec..3c7c0f07ab0b 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -310,7 +310,6 @@ void rtllib_wx_sync_scan_wq(void *data)
rtllib_sta_ps_send_null_frame(ieee, 1);
rtllib_stop_all_queues(ieee);
- rtllib_stop_send_beacons(ieee);
ieee->link_state = MAC80211_LINKED_SCANNING;
ieee->link_change(ieee->dev);
/* wait for ps packet to be kicked out successfully */
--
2.42.0