Commit 27e8d460 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: wlan-ng: use GENMASK macro in two bitwise operations in prism2sta.c

This patch replace actual mask stuff using BIT macros with
or operators to make use of GENMASK macro which simplifies
code clearity and readibility.

It applies for two bitwise operations included in prism2sta.c source file.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent caac19b9
...@@ -654,8 +654,8 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev) ...@@ -654,8 +654,8 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev)
hw->ident_sta_fw.minor = le16_to_cpu(hw->ident_sta_fw.minor); hw->ident_sta_fw.minor = le16_to_cpu(hw->ident_sta_fw.minor);
/* strip out the 'special' variant bits */ /* strip out the 'special' variant bits */
hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15)); hw->mm_mods = hw->ident_sta_fw.variant & GENMASK(15, 14);
hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15))); hw->ident_sta_fw.variant &= ~((u16)GENMASK(15, 14));
if (hw->ident_sta_fw.id == 0x1f) { if (hw->ident_sta_fw.id == 0x1f) {
netdev_info(wlandev->netdev, netdev_info(wlandev->netdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment