Search Linux Wireless

Re: [PATCH 3/6] b43: N-PHY: add RSSI calculation for PHY rev < 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/10 Michael Buesch <mb@xxxxxxxxx>:
> On Sunday 10 January 2010 23:13:34 Rafał Miłecki wrote:
>> +     s32 results_min[4];
>> +     u8 vcm_final[4];
>> +     s32 results[4][4];
>> +     s32 miniq[4][2];
>> +     memset(results_min, 0, sizeof(s32) * 4);
>> +     memset(vcm_final, 0, sizeof(u8) * 4);
>> +     memset(results, 0, sizeof(s32) * 4 * 4);
>> +     memset(miniq, 0, sizeof(s32) * 4 * 2);
>
> Just initialize the variables to zero instead of doing a memset:
>
> +       s32 results_min[4] = { 0, };
> +       u8 vcm_final[4] = { 0, };
> +       s32 results[4][4] = { 0, };
> +       s32 miniq[4][2] = { 0, };

Nice trick, thanks :) Just for two-dimensional arrays I'll have to hack it to:
s32 results[4][4] = { { 0, }, { 0, }, { 0, }, { 0, } };
I believe.


>> +     b43_radio_maskset(dev, B2055_C1_PD_RSSIMISC, 0xF8, 0);
>> +     b43_radio_maskset(dev, B2055_C2_PD_RSSIMISC, 0xF8, 0);
>
> If you don't set anything, you can use
> b43_radio_mask();

Sure I can ;) Thanks.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux