Commit e5a11a82 authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by John W. Linville

rndis_wlan: set current packet filter to zero on stop

Set current packet filter to zero to block receiving data packets from
device.
Signed-off-by: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7eaab708
...@@ -2530,7 +2530,8 @@ static int rndis_wlan_reset(struct usbnet *usbdev) ...@@ -2530,7 +2530,8 @@ static int rndis_wlan_reset(struct usbnet *usbdev)
if (retval) if (retval)
devwarn(usbdev, "rndis_reset() failed: %d", retval); devwarn(usbdev, "rndis_reset() failed: %d", retval);
/* rndis_reset cleared multicast list, so restore here. */ /* rndis_reset cleared multicast list, so restore here.
(set_multicast_list() also turns on current packet filter) */
set_multicast_list(usbdev); set_multicast_list(usbdev);
queue_delayed_work(priv->workqueue, &priv->stats_work, queue_delayed_work(priv->workqueue, &priv->stats_work,
...@@ -2544,6 +2545,7 @@ static int rndis_wlan_stop(struct usbnet *usbdev) ...@@ -2544,6 +2545,7 @@ static int rndis_wlan_stop(struct usbnet *usbdev)
{ {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
int retval; int retval;
__le32 filter;
devdbg(usbdev, "rndis_wlan_stop"); devdbg(usbdev, "rndis_wlan_stop");
...@@ -2560,6 +2562,12 @@ static int rndis_wlan_stop(struct usbnet *usbdev) ...@@ -2560,6 +2562,12 @@ static int rndis_wlan_stop(struct usbnet *usbdev)
priv->scan_request = NULL; priv->scan_request = NULL;
} }
/* Set current packet filter zero to block receiving data packets from
device. */
filter = 0;
rndis_set_oid(usbdev, OID_GEN_CURRENT_PACKET_FILTER, &filter,
sizeof(filter));
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment