Skip to content

Commit

Permalink
beceem: reserve one queue for bit-bucket
Browse files Browse the repository at this point in the history
This preserves the semantics of the original driver (unclassified packets
are dropped), but does it in a clean way; and fixes crash when packet
is sent to offline device.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
  • Loading branch information
Stephen Hemminger committed Nov 1, 2010
1 parent 3644c1a commit 0980f2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/staging/bcm/InterfaceInit.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id)
PS_INTERFACE_ADAPTER psIntfAdapter;
struct net_device *ndev;

ndev = alloc_etherdev_mq(sizeof(MINI_ADAPTER), NO_OF_QUEUES);
/* Reserve one extra queue for the bit-bucket */
ndev = alloc_etherdev_mq(sizeof(MINI_ADAPTER), NO_OF_QUEUES+1);
if(ndev == NULL) {
dev_err(&udev->dev, DRV_NAME ": no memory for device\n");
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/bcm/Macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ typedef enum _E_PHS_DSC_ACTION

#define FIRMWARE_BEGIN_ADDR 0xBFC00000

#define INVALID_QUEUE_INDEX (USHORT)-1
#define INVALID_QUEUE_INDEX (NO_OF_QUEUES+1)

#define INVALID_PID (pid_t)-1
#define DDR_80_MHZ 0
Expand Down

0 comments on commit 0980f2e

Please sign in to comment.