Search Linux Wireless

Re: [PATCH v3 1/4] iwlwifi: mei: add the driver to allow cooperation with CSME

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

 



Emmanuel Grumbach <egrumbach@xxxxxxxxx> writes:

>> > +     BUILD_BUG_ON((u32)IWL_MEI_AKM_AUTH_OPEN !=
>> > +                  (u32)SAP_WIFI_AUTH_TYPE_OPEN);
>> > +     BUILD_BUG_ON((u32)IWL_MEI_AKM_AUTH_RSNA !=
>> > +                  (u32)SAP_WIFI_AUTH_TYPE_RSNA);
>> > +     BUILD_BUG_ON((u32)IWL_MEI_AKM_AUTH_RSNA_PSK !=
>> > +                  (u32)SAP_WIFI_AUTH_TYPE_RSNA_PSK);
>> > +     BUILD_BUG_ON((u32)IWL_MEI_AKM_AUTH_SAE !=
>> > +                  (u32)SAP_WIFI_AUTH_TYPE_SAE);
>> > +
>> > +     BUILD_BUG_ON((u32)IWL_MEI_CIPHER_NONE !=
>> > +                  (u32)SAP_WIFI_CIPHER_ALG_NONE);
>> > +     BUILD_BUG_ON((u32)IWL_MEI_CIPHER_CCMP !=
>> > +                  (u32)SAP_WIFI_CIPHER_ALG_CCMP);
>> > +     BUILD_BUG_ON((u32)IWL_MEI_CIPHER_GCMP !=
>> > +                  (u32)SAP_WIFI_CIPHER_ALG_GCMP);
>> > +     BUILD_BUG_ON((u32)IWL_MEI_CIPHER_GCMP_256 !=
>> > +                  (u32)SAP_WIFI_CIPHER_ALG_GCMP_256);
>>
>> These look just weird, and suspicious. You are using two different enums
>> but they have to be same values, or what?
>
> Exactly. I don't want the userspace to have to include all the SAP
> protocol header file. OTOH, I don't want to have to translate between
> vendor commands attributes values and the SAP values.

Why not? I assume you would just need a helper function with switch
statements to "translate" between enums, not much more lines of code but
a lot cleaner code.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux