staging: rtl8192e: Remove unsupported mode IW_MODE_MASTER
Tasklet irq_rx_tasklet is scheduled when hw is receiving frames. Function _rtl92e_irq_rx_tasklet() is then called which calls then _rtl92e_rx_normal(). In _rtl92e_rx_normal() all frames are processed by rtllib_rx(). When ieee->iw_mode is IW_MODE_MASTER the function returns 0. The calling function then calls: dev_kfree_skb_any() which clears the skb. So the driver clears all packets received in this mode. Remove dead code in mode IW_MODE_MASTER. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/9cd4574e4cfe0a2d7afce03c9b868757e215a23c.1691908402.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6a83264945
commit
2b632f7f4a
|
@ -59,10 +59,6 @@ static void _rtl92e_update_msr(struct net_device *dev)
|
|||
if (priv->rtllib->link_state == MAC80211_LINKED)
|
||||
msr |= MSR_LINK_ADHOC;
|
||||
break;
|
||||
case IW_MODE_MASTER:
|
||||
if (priv->rtllib->link_state == MAC80211_LINKED)
|
||||
msr |= MSR_LINK_MASTER;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -118,8 +118,7 @@ void rtl92e_ips_enter(struct net_device *dev)
|
|||
|
||||
rt_state = priv->rtllib->rf_power_state;
|
||||
if (rt_state == rf_on && !psc->bSwRfProcessing &&
|
||||
(priv->rtllib->link_state != MAC80211_LINKED) &&
|
||||
(priv->rtllib->iw_mode != IW_MODE_MASTER)) {
|
||||
(priv->rtllib->link_state != MAC80211_LINKED)) {
|
||||
psc->eInactivePowerState = rf_off;
|
||||
_rtl92e_ps_update_rf_state(dev);
|
||||
}
|
||||
|
@ -210,8 +209,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
|
|||
|
||||
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
|
||||
(priv->rtllib->link_state == MAC80211_LINKED))
|
||||
|| (priv->rtllib->iw_mode == IW_MODE_ADHOC) ||
|
||||
(priv->rtllib->iw_mode == IW_MODE_MASTER))
|
||||
|| (priv->rtllib->iw_mode == IW_MODE_ADHOC))
|
||||
return;
|
||||
|
||||
if (psc->bLeisurePs) {
|
||||
|
|
|
@ -363,8 +363,7 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo,
|
|||
}
|
||||
|
||||
memset(posHTInfo, 0, *len);
|
||||
if ((ieee->iw_mode == IW_MODE_ADHOC) ||
|
||||
(ieee->iw_mode == IW_MODE_MASTER)) {
|
||||
if (ieee->iw_mode == IW_MODE_ADHOC) {
|
||||
pHTInfoEle->ControlChl = ieee->current_network.channel;
|
||||
pHTInfoEle->ExtChlOffset = ((!pHT->bRegBW40MHz) ?
|
||||
HT_EXTCHNL_OFFSET_NO_EXT :
|
||||
|
|
|
@ -182,15 +182,7 @@ 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_MASTER) {
|
||||
if (TxRxSelect == TX_DIR) {
|
||||
search_dir[DIR_DOWN] = true;
|
||||
search_dir[DIR_BI_DIR] = true;
|
||||
} else {
|
||||
search_dir[DIR_UP] = true;
|
||||
search_dir[DIR_BI_DIR] = true;
|
||||
}
|
||||
} else if (ieee->iw_mode == IW_MODE_ADHOC) {
|
||||
if (ieee->iw_mode == IW_MODE_ADHOC) {
|
||||
if (TxRxSelect == TX_DIR)
|
||||
search_dir[DIR_UP] = true;
|
||||
else
|
||||
|
@ -311,9 +303,7 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
|
|||
(&ieee->Tx_TS_Admit_List) :
|
||||
(&ieee->Rx_TS_Admit_List);
|
||||
|
||||
Dir = (ieee->iw_mode == IW_MODE_MASTER) ?
|
||||
((TxRxSelect == TX_DIR) ? DIR_DOWN : DIR_UP) :
|
||||
((TxRxSelect == TX_DIR) ? DIR_UP : DIR_DOWN);
|
||||
Dir = ((TxRxSelect == TX_DIR) ? DIR_UP : DIR_DOWN);
|
||||
|
||||
if (!list_empty(pUnusedList)) {
|
||||
(*ppTS) = list_entry(pUnusedList->next,
|
||||
|
|
|
@ -1496,7 +1496,6 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
|
|||
case IW_MODE_INFRA:
|
||||
ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats);
|
||||
break;
|
||||
case IW_MODE_MASTER:
|
||||
case IW_MODE_REPEAT:
|
||||
break;
|
||||
case IW_MODE_MONITOR:
|
||||
|
@ -2682,8 +2681,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,
|
|||
netdev_dbg(ieee->dev, "received PROBE REQUEST (%d)\n",
|
||||
WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)));
|
||||
if ((ieee->softmac_features & IEEE_SOFTMAC_PROBERS) &&
|
||||
((ieee->iw_mode == IW_MODE_ADHOC ||
|
||||
ieee->iw_mode == IW_MODE_MASTER) &&
|
||||
(ieee->iw_mode == IW_MODE_ADHOC &&
|
||||
ieee->link_state == MAC80211_LINKED))
|
||||
rtllib_rx_probe_rq(ieee, skb);
|
||||
break;
|
||||
|
|
|
@ -935,8 +935,7 @@ static struct sk_buff *rtllib_assoc_resp(struct rtllib_device *ieee, u8 *dest)
|
|||
ether_addr_copy(assoc->header.addr1, dest);
|
||||
ether_addr_copy(assoc->header.addr3, ieee->dev->dev_addr);
|
||||
ether_addr_copy(assoc->header.addr2, ieee->dev->dev_addr);
|
||||
assoc->capability = cpu_to_le16(ieee->iw_mode == IW_MODE_MASTER ?
|
||||
WLAN_CAPABILITY_ESS : WLAN_CAPABILITY_IBSS);
|
||||
assoc->capability = cpu_to_le16(WLAN_CAPABILITY_IBSS);
|
||||
|
||||
assoc->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
|
||||
|
||||
|
@ -2248,8 +2247,6 @@ rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
|
|||
netdev_dbg(ieee->dev,
|
||||
"Received authentication response");
|
||||
rtllib_rx_auth_resp(ieee, skb);
|
||||
} else if (ieee->iw_mode == IW_MODE_MASTER) {
|
||||
rtllib_rx_auth_rq(ieee, skb);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -2309,9 +2306,6 @@ inline int rtllib_rx_frame_softmac(struct rtllib_device *ieee,
|
|||
break;
|
||||
case RTLLIB_STYPE_ASSOC_REQ:
|
||||
case RTLLIB_STYPE_REASSOC_REQ:
|
||||
if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) &&
|
||||
ieee->iw_mode == IW_MODE_MASTER)
|
||||
rtllib_rx_assoc_rq(ieee, skb);
|
||||
break;
|
||||
case RTLLIB_STYPE_AUTH:
|
||||
rtllib_rx_auth(ieee, skb, rx_stats);
|
||||
|
@ -2807,9 +2801,6 @@ void rtllib_start_protocol(struct rtllib_device *ieee)
|
|||
case IW_MODE_ADHOC:
|
||||
rtllib_start_ibss(ieee);
|
||||
break;
|
||||
case IW_MODE_MASTER:
|
||||
rtllib_start_master_bss(ieee);
|
||||
break;
|
||||
case IW_MODE_MONITOR:
|
||||
rtllib_start_monitor_mode(ieee);
|
||||
break;
|
||||
|
|
|
@ -51,8 +51,7 @@ 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 ||
|
||||
ieee->iw_mode == IW_MODE_MASTER)
|
||||
if (ieee->iw_mode == IW_MODE_ADHOC)
|
||||
if (ieee->link_state == MAC80211_LINKED) {
|
||||
rtllib_stop_send_beacons(ieee);
|
||||
rtllib_start_send_beacons(ieee);
|
||||
|
@ -125,10 +124,6 @@ int rtllib_wx_set_wap(struct rtllib_device *ieee,
|
|||
|
||||
mutex_lock(&ieee->wx_mutex);
|
||||
/* use ifconfig hw ether */
|
||||
if (ieee->iw_mode == IW_MODE_MASTER) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (temp->sa_family != ARPHRD_ETHER) {
|
||||
ret = -EINVAL;
|
||||
|
@ -366,7 +361,7 @@ 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 || ieee->iw_mode == IW_MODE_MASTER)
|
||||
if (ieee->iw_mode == IW_MODE_ADHOC)
|
||||
rtllib_start_send_beacons(ieee);
|
||||
|
||||
rtllib_wake_all_queues(ieee);
|
||||
|
|
|
@ -463,8 +463,6 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
|
|||
}
|
||||
if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
|
||||
tcb_desc->bUseShortPreamble = true;
|
||||
if (ieee->iw_mode == IW_MODE_MASTER)
|
||||
goto NO_PROTECTION;
|
||||
return;
|
||||
NO_PROTECTION:
|
||||
tcb_desc->bRTSEnable = false;
|
||||
|
|
Loading…
Reference in New Issue