From: Andrew Lunn Date: Sat, 12 Dec 2009 22:39:44 +0000 (+0100) Subject: Staging: batman-adv: Always receive when discarding. X-Git-Tag: firefly_0821_release~9833^2~2832^2~1^2~320 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4088c7ca57b6dbe25683bb16f25233cce373996c;p=firefly-linux-kernel-4.4.55.git Staging: batman-adv: Always receive when discarding. It does not matter if the interface is to be activated or not, we must read the packet in order that it be discarded. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index decf67fa944c..6a8d73d51357 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -1177,8 +1177,7 @@ static int discard_one_packet(struct batman_if *batman_if, { int result = -EAGAIN; - if ((batman_if->if_active == IF_TO_BE_ACTIVATED) - && (batman_if->raw_sock)) { + if (batman_if->raw_sock) { result = receive_raw_packet(batman_if->raw_sock, packet_buff, PACKBUFF_SIZE);