diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index f8485601aead..e38acb58cd5e 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -3254,13 +3254,16 @@ static void hfa384x_usbin_rx(struct wlandevice *wlandev, struct sk_buff *skb) struct p80211_rxmeta *rxmeta; u16 data_len; u16 fc; + u16 status; /* Byte order convert once up front. */ le16_to_cpus(&usbin->rxfrm.desc.status); le32_to_cpus(&usbin->rxfrm.desc.time); /* Now handle frame based on port# */ - switch (HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status)) { + status = HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status); + + switch (status) { case 0: fc = le16_to_cpu(usbin->rxfrm.desc.frame_control); @@ -3319,7 +3322,7 @@ static void hfa384x_usbin_rx(struct wlandevice *wlandev, struct sk_buff *skb) default: netdev_warn(hw->wlandev->netdev, "Received frame on unsupported port=%d\n", - HFA384x_RXSTATUS_MACPORT_GET(usbin->rxfrm.desc.status)); + status); break; } }