Remove unsupported mode IW_MODE_ADHOC from rtllib_tx.c, rtl819x_TSProc.c, rtl819x_HTProc.c, r8192E_dev.c Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx> --- .../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