Skip to content

Commit

Permalink
Staging: batman-adv: stop persistent warnings if a device is deactiva…
Browse files Browse the repository at this point in the history
…ted.

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@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andrew Lunn authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 4efe0b0 commit da6b9ba
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/staging/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da6b9ba

Please sign in to comment.