linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Emmanuel Grumbach <egrumbach@gmail.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>, "Coelho\,
	Luciano" <luciano.coelho@intel.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Ayala Beker <ayala.beker@intel.com>
Subject: Re: [PATCH v3 1/4] iwlwifi: mei: add the driver to allow cooperation with CSME
Date: Thu, 05 Aug 2021 16:38:57 +0300	[thread overview]
Message-ID: <87k0l0c8pa.fsf@codeaurora.org> (raw)
In-Reply-To: <CANUX_P3QE9xNnQLT=mHNDp4VCv37Bcjuvn9O1wQ4Btejjkbrvg@mail.gmail.com> (Emmanuel Grumbach's message of "Thu, 24 Jun 2021 23:04:56 +0300")

Emmanuel Grumbach <egrumbach@gmail.com> 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

  reply	other threads:[~2021-08-05 13:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 14:10 [PATCH v3 1/4] iwlwifi: mei: add the driver to allow cooperation with CSME Emmanuel Grumbach
2021-06-23 14:10 ` [PATCH v3 2/4] iwlwifi: integrate with iwlmei Emmanuel Grumbach
2021-06-23 14:10 ` [PATCH v3 3/4] nl80211: vendor-cmd: add Intel vendor commands for iwlmei usage Emmanuel Grumbach
2021-06-24 12:45   ` Johannes Berg
2021-06-24 12:51     ` Emmanuel Grumbach
2021-06-24 17:07   ` Kalle Valo
2021-06-24 19:56     ` Emmanuel Grumbach
2021-08-05 13:25       ` Kalle Valo
2021-08-07 18:32         ` Grumbach, Emmanuel
2021-10-18 11:25           ` Kalle Valo
2021-06-23 14:10 ` [PATCH v3 4/4] iwlwifi: mvm: add vendor commands needed for iwlmei Emmanuel Grumbach
2021-06-24 17:08   ` Kalle Valo
2021-06-24 19:59     ` Emmanuel Grumbach
2021-08-05 13:35       ` Kalle Valo
2021-08-07 18:34         ` Grumbach, Emmanuel
2021-10-18 11:27           ` Kalle Valo
2021-06-24 17:16 ` [PATCH v3 1/4] iwlwifi: mei: add the driver to allow cooperation with CSME Kalle Valo
2021-06-24 20:04   ` Emmanuel Grumbach
2021-08-05 13:38     ` Kalle Valo [this message]
2021-08-07 18:38       ` Grumbach, Emmanuel
2021-08-09  7:49         ` Arend van Spriel
2021-08-09 19:25           ` Grumbach, Emmanuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0l0c8pa.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ayala.beker@intel.com \
    --cc=egrumbach@gmail.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).