Skip to content

Commit 42f9bcf

Browse files
Philipp Hortmanngregkh
authored andcommitted
staging: rtl8192e: Remove unsupported mode IW_MODE_MESH
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_MESH 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_MESH. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/54230361abba9f33827eac9bf5074dd9f62d787b.1691908402.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 31a14cb commit 42f9bcf

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

drivers/staging/rtl8192e/rtllib.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ static inline void *netdev_priv_rsl(struct net_device *dev)
8989
#define HIGH_QUEUE 7
9090
#define BEACON_QUEUE 8
9191

92-
#ifndef IW_MODE_MESH
93-
#define IW_MODE_MESH 7
94-
#endif
95-
9692
#define IE_CISCO_FLAG_POSITION 0x08
9793
#define SUPPORT_CKIP_MIC 0x08
9894
#define SUPPORT_CKIP_PK 0x10

drivers/staging/rtl8192e/rtllib_rx.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,17 +1013,15 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, u16 fc,
10131013
}
10141014
}
10151015

1016-
if (ieee->iw_mode != IW_MODE_MESH) {
1017-
/* packets from our adapter are dropped (echo) */
1018-
if (!memcmp(src, ieee->dev->dev_addr, ETH_ALEN))
1019-
return -1;
1016+
/* packets from our adapter are dropped (echo) */
1017+
if (!memcmp(src, ieee->dev->dev_addr, ETH_ALEN))
1018+
return -1;
10201019

1021-
/* {broad,multi}cast packets to our BSS go through */
1022-
if (is_multicast_ether_addr(dst)) {
1023-
if (memcmp(bssid, ieee->current_network.bssid,
1024-
ETH_ALEN))
1025-
return -1;
1026-
}
1020+
/* {broad,multi}cast packets to our BSS go through */
1021+
if (is_multicast_ether_addr(dst)) {
1022+
if (memcmp(bssid, ieee->current_network.bssid,
1023+
ETH_ALEN))
1024+
return -1;
10271025
}
10281026
return 0;
10291027
}
@@ -1499,8 +1497,6 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
14991497
case IW_MODE_MONITOR:
15001498
ret = rtllib_rx_Monitor(ieee, skb, rx_stats);
15011499
break;
1502-
case IW_MODE_MESH:
1503-
break;
15041500
default:
15051501
netdev_info(ieee->dev, "%s: ERR iw mode!!!\n", __func__);
15061502
break;

0 commit comments

Comments
 (0)