nl80211/cfg80211: Enable station PMF requirement to be specified to driver with AP SME
Johannes,
Thanks for your comments regarding these changes. See my responses below.
- Chet
Quoted 3 lines · Chet Lanctot
Review
Quoted 2 lines
(quoted diff) +2
-0+ if (info->attrs[NL80211_ATTR_USE_MFP]) { + params.mfp = nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]); + if
(params.mfp != NL80211_MFP_REQUIRED &&
Quoted 8 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ params.mfp != NL80211_MFP_OPTIONAL && + params.mfp != NL80211_MFP_NO) + return -EINVAL; + } else + params.mfp = NL80211_MFP_NO;Code style.
Wouldn't a feature flag be needed?
johannes
For the issue of code style, I am not sure what you mean here. I copied this code from the nl80211_connect routine, which has similar processing for a “use MFP” parameter. I tried to make the code I added be consistent with this existing code.
If you explain what needs to be changed to improve the code style, I will make the changes.
Regarding your question about a feature flag, there is already a flag that indicates that the driver implements the AP SME:
* @WIPHY_FLAG_HAVE_AP_SME: device integrates AP SME
Is this the type of flag you were referring to?
I am ready to respond to any follow-on comments you have for this section of code.
Quoted 11 lines · On Fri, 2014-01-03 at 21:30 +0000, [email protected] wrote:
Quoted 3 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ } else + params.mfp = NL80211_MFP_NO;Code style.
For the issue of code style, I am not sure what you mean here. I copied this code from the
nl80211_connectroutine, which has similar processing for a “use MFP” parameter. I tried to make the code I added be consistent with this existing code.If you explain what needs to be changed to improve the code style, I will make the changes.
All branches should (now) have braces if one of them requires it.
Quoted 4 lines
Regarding your question about a feature flag, there is already a flag that indicates that the driver implements the AP SME:
* @WIPHY_FLAG_HAVE_AP_SME: device integrates AP SME
Is this the type of flag you were referring to?
Yes, but it seems to me that you need a flag in the nl80211 API indicating that the AP SME supports PMF in this way.
johannes