lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 01 Jul 2014 17:25:07 +0100
From:	Michalis Pappas <mpappas@...tmail.fm>
To:	Ben Chan <benchan@...omium.org>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: gdm72xx: move T_CAPABILITY bit definitions to
 hci.h

On 07/01/2014 04:37 PM, Ben Chan wrote:
> On Tue, Jul 1, 2014 at 6:00 AM, Michalis Pappas <mpappas@...tmail.fm> wrote:
>> Signed-off-by: Michalis Pappas <mpappas@...tmail.fm>
>> ---
>>  drivers/staging/gdm72xx/gdm_wimax.c | 10 +++-------
>>  drivers/staging/gdm72xx/hci.h       |  6 ++++++
>>  2 files changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
>> index 63a760b..1fc64a9 100644
>> --- a/drivers/staging/gdm72xx/gdm_wimax.c
>> +++ b/drivers/staging/gdm72xx/gdm_wimax.c
>> @@ -600,10 +600,6 @@ static void gdm_wimax_prepare_device(struct net_device *dev)
>>         u16 len = 0;
>>         u32 val = 0;
>>
>> -       #define BIT_MULTI_CS    0
>> -       #define BIT_WIMAX               1
>> -       #define BIT_QOS                 2
>> -       #define BIT_AGGREGATION 3
>>
>>         /* GetInformation mac address */
>>         len = 0;
>> @@ -612,12 +608,12 @@ static void gdm_wimax_prepare_device(struct net_device *dev)
>>         hci->length = H2B(len);
>>         gdm_wimax_send(nic, hci, HCI_HEADER_SIZE+len);
>>
>> -       val = (1<<BIT_WIMAX) | (1<<BIT_MULTI_CS);
>> +       val = (1 << T_CAPABILITY_BIT_WIMAX) | (1 << T_CAPABILITY_BIT_MULTI_CS);
>>         #if defined(CONFIG_WIMAX_GDM72XX_QOS)
>> -       val |= (1<<BIT_QOS);
>> +       val |= (1 << T_CAPABILITY_BIT_QOS);
>>         #endif
>>         #if defined(CONFIG_WIMAX_GDM72XX_WIMAX2)
>> -       val |= (1<<BIT_AGGREGATION);
>> +       val |= (1 << T_CAPABILITY_BIT_AGGREGATION);
>>         #endif
> 
> [Ben] We can simply the code by defining these constants as bitmasks
> instead, e.g.
> 
> T_CAPABILITY_MULTI_CS  (1 << 0)
> T_CAPABILITY_WIMAX  (1 << 1)
> T_CAPABILITY_QOS  (1 << 2)
> T_CAPABILITY_AGGREGATION  (1 << 3)
> 

Agreed, I'll submit a new patch.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ