[PATCH 3/7] Staging: batman-adv: stop persistent warnings if a device is deactivated.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this change we spam the kernel log on every packet received on
any other interface when an interface has been added, but is not yet
active, ie UP.

Signed-off-by: Simon Wunderlich <siwu@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Lunn <andrew@xxxxxxx>
---
 drivers/staging/batman-adv/routing.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index 1ff2a7a..26320d5 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -1177,12 +1177,8 @@ static int discard_one_packet(struct batman_if *batman_if,
 {
 	int result = -EAGAIN;
 
-	if (batman_if->if_active != IF_TO_BE_ACTIVATED) {
-		printk(KERN_WARNING
-		       "batman-adv:Could not read from deactivated interface %s!\n",
-		       batman_if->dev);
-	} else {
-		if (batman_if->raw_sock)
+	if ((batman_if->if_active == IF_TO_BE_ACTIVATED) 
+		&& (batman_if->raw_sock)) {
 			result = receive_raw_packet(batman_if->raw_sock,
 						    packet_buff,
 						    PACKBUFF_SIZE);
-- 
1.6.5.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux