staging: rtl8192e: Remove constant variable net_promiscuous_md
Remove variable net_promiscuous_md as it is set to 0 and unchanged. The equations result accordingly. Remove dead code. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/84a9865f763feeaaa51ce9abecf76c848e13580e.1696360404.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ff56e82adf
commit
0c82f41811
@ -739,7 +739,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
|
||||
priv->chan = 1;
|
||||
priv->rtllib->mode = WIRELESS_MODE_AUTO;
|
||||
priv->rtllib->iw_mode = IW_MODE_INFRA;
|
||||
priv->rtllib->net_promiscuous_md = false;
|
||||
priv->rtllib->ieee_up = 0;
|
||||
priv->retry_rts = DEFAULT_RETRY_RTS;
|
||||
priv->retry_data = DEFAULT_RETRY_DATA;
|
||||
@ -1030,15 +1029,12 @@ static void _rtl92e_watchdog_wq_cb(void *data)
|
||||
MAC80211_NOLINK) &&
|
||||
(ieee->rf_power_state == rf_on) && !ieee->is_set_key &&
|
||||
(!ieee->proto_stoppping) && !ieee->wx_set_enc) {
|
||||
if ((ieee->pwr_save_ctrl.ReturnPoint ==
|
||||
IPS_CALLBACK_NONE) &&
|
||||
(!ieee->net_promiscuous_md)) {
|
||||
if (ieee->pwr_save_ctrl.ReturnPoint == IPS_CALLBACK_NONE) {
|
||||
rtl92e_ips_enter(dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode ==
|
||||
IW_MODE_INFRA) && (!ieee->net_promiscuous_md)) {
|
||||
if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode == IW_MODE_INFRA)) {
|
||||
if (ieee->link_detect_info.NumRxOkInPeriod > 100 ||
|
||||
ieee->link_detect_info.NumTxOkInPeriod > 100)
|
||||
bBusyTraffic = true;
|
||||
|
@ -209,7 +209,6 @@ static int _rtl92e_wx_set_mode(struct net_device *dev,
|
||||
union iwreq_data *wrqu, char *b)
|
||||
{
|
||||
struct r8192_priv *priv = rtllib_priv(dev);
|
||||
struct rtllib_device *ieee = netdev_priv_rsl(dev);
|
||||
|
||||
enum rt_rf_power_state rt_state;
|
||||
int ret;
|
||||
@ -218,8 +217,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_MONITOR ||
|
||||
ieee->net_promiscuous_md) {
|
||||
if (wrqu->mode == IW_MODE_MONITOR) {
|
||||
if (rt_state == rf_off) {
|
||||
if (priv->rtllib->rf_off_reason >
|
||||
RF_CHANGE_BY_IPS) {
|
||||
|
@ -1253,7 +1253,6 @@ struct rtllib_device {
|
||||
int scan_age;
|
||||
|
||||
int iw_mode; /* operating mode (IW_MODE_*) */
|
||||
bool net_promiscuous_md;
|
||||
|
||||
spinlock_t lock;
|
||||
spinlock_t wpax_suitlist_lock;
|
||||
|
@ -1255,12 +1255,8 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
/*Filter pkt not to me*/
|
||||
multicast = is_multicast_ether_addr(hdr->addr1);
|
||||
unicast = !multicast;
|
||||
if (unicast && !ether_addr_equal(dev->dev_addr, hdr->addr1)) {
|
||||
if (ieee->net_promiscuous_md)
|
||||
bToOtherSTA = true;
|
||||
else
|
||||
goto rx_dropped;
|
||||
}
|
||||
if (unicast && !ether_addr_equal(dev->dev_addr, hdr->addr1))
|
||||
goto rx_dropped;
|
||||
|
||||
/*Filter pkt has too small length */
|
||||
hdrlen = rtllib_rx_get_hdrlen(ieee, skb, rx_stats);
|
||||
|
Loading…
x
Reference in New Issue
Block a user