* [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver @ 2014-11-11 5:56 Gautam (Gautam Kumar) Shukla [not found] ` <DF163EE1A432BF4BBE6B2088220663A67437BD-HXj2mutaA2pmqaqore1TH5r/X4hKkxxPpWgKQ6/u3Fg@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Gautam (Gautam Kumar) Shukla @ 2014-11-11 5:56 UTC (permalink / raw) To: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jithu Jance, Sreenath S For offloading 4 way handshake to driver, currently we don't have any member of struct cfg80211_connect_params to pass PSK from supplicant to driver. I have added psk for the same and added rest of the code needed in nl80211.h and nl80211.c to parse and make it available to driver. From supplicant, we already have psk member field in assoc_params to use . Tested on x86 linux. Signed-off-by: Gautam kumar shukla <gautams-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> --- include/net/cfg80211.h | 2 ++ include/uapi/linux/nl80211.h | 8 +++++++- net/wireless/nl80211.c | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a2ddcf2..6f744e0 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1758,6 +1758,7 @@ struct cfg80211_ibss_params { * allowed to ignore this @bssid_hint if it has knowledge of a better BSS * to use. * @ssid: SSID + * @psk:preshared key for WPA2-PSK connection or %NULL if not specified * @ssid_len: Length of ssid in octets * @auth_type: Authentication type (algorithm) * @ie: IEs for association request @@ -1783,6 +1784,7 @@ struct cfg80211_connect_params { const u8 *bssid; const u8 *bssid_hint; const u8 *ssid; + const u8 *psk; size_t ssid_len; enum nl80211_auth_type auth_type; const u8 *ie; diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 4b28dc0..b01d5dd 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -421,7 +421,7 @@ * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and - * %NL80211_ATTR_WIPHY_FREQ_HINT. + * %NL80211_ATTR_WIPHY_FREQ_HINT, and %NL80211_ATTR_PSK. * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are * restrictions on BSS selection, i.e., they effectively prevent roaming * within the ESS. %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT @@ -1638,6 +1638,10 @@ enum nl80211_commands { * @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see * &enum nl80211_smps_mode. * + * @NL80211_ATTR_PSK: a PSK value (u8 attribute).This is 32-octet + (256-bit) + * PSK. + * + * * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use */ @@ -1990,6 +1994,8 @@ enum nl80211_attrs { NL80211_ATTR_SMPS_MODE, + NL80211_ATTR_PSK, + /* add attributes here, update the policy in nl80211.c */ __NL80211_ATTR_AFTER_LAST, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5839c85..91c24b1 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -395,6 +395,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { [NL80211_ATTR_USER_PRIO] = { .type = NLA_U8 }, [NL80211_ATTR_ADMITTED_TIME] = { .type = NLA_U16 }, [NL80211_ATTR_SMPS_MODE] = { .type = NLA_U8 }, + [NL80211_ATTR_PSK] = { .type = NLA_BINARY, .len = 32 }, }; /* policy for the key attributes */ @@ -7310,6 +7311,9 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) connect.flags |= ASSOC_REQ_USE_RRM; } + if (info->attrs[NL80211_ATTR_PSK]) + connect.psk = nla_data(info->attrs[NL80211_ATTR_PSK]); + wdev_lock(dev->ieee80211_ptr); err = cfg80211_connect(rdev, dev, &connect, connkeys, NULL); wdev_unlock(dev->ieee80211_ptr); -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <DF163EE1A432BF4BBE6B2088220663A67437BD-HXj2mutaA2pmqaqore1TH5r/X4hKkxxPpWgKQ6/u3Fg@public.gmane.org>]
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver [not found] ` <DF163EE1A432BF4BBE6B2088220663A67437BD-HXj2mutaA2pmqaqore1TH5r/X4hKkxxPpWgKQ6/u3Fg@public.gmane.org> @ 2014-11-11 9:29 ` Johannes Berg 2014-11-11 9:54 ` Arend van Spriel 2014-11-11 9:44 ` Arend van Spriel 1 sibling, 1 reply; 9+ messages in thread From: Johannes Berg @ 2014-11-11 9:29 UTC (permalink / raw) To: Gautam (Gautam Kumar) Shukla Cc: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jithu Jance, Sreenath S On Tue, 2014-11-11 at 05:56 +0000, Gautam (Gautam Kumar) Shukla wrote: > For offloading 4 way handshake to driver, currently we don't have any > member of struct cfg80211_connect_params to pass PSK from supplicant > to driver. I have added psk for the same and added rest of the code > needed in nl80211.h and nl80211.c to parse and make it available to > driver. > From supplicant, we already have psk member field in assoc_params to > use . > > Tested on x86 linux. Your commit message needs serious work. Also, there's a competing approach from QCA that's far more suited. In either case though, I'm going to ask which driver is going to use this and when it's going to land in mainline. johannes ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver 2014-11-11 9:29 ` Johannes Berg @ 2014-11-11 9:54 ` Arend van Spriel 2014-11-11 10:03 ` Johannes Berg [not found] ` <5461DCC9.5050702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 0 siblings, 2 replies; 9+ messages in thread From: Arend van Spriel @ 2014-11-11 9:54 UTC (permalink / raw) To: Johannes Berg, Gautam (Gautam Kumar) Shukla Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org, davem@davemloft.net, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jithu Jance, Sreenath S On 11-11-14 10:29, Johannes Berg wrote: > On Tue, 2014-11-11 at 05:56 +0000, Gautam (Gautam Kumar) Shukla wrote: >> For offloading 4 way handshake to driver, currently we don't have any >> member of struct cfg80211_connect_params to pass PSK from supplicant >> to driver. I have added psk for the same and added rest of the code >> needed in nl80211.h and nl80211.c to parse and make it available to >> driver. >> From supplicant, we already have psk member field in assoc_params to >> use . >> >> Tested on x86 linux. > > Your commit message needs serious work. > > Also, there's a competing approach from QCA that's far more suited. I probably was not paying attention to it, but would you have a reference to this. > In either case though, I'm going to ask which driver is going to use > this and when it's going to land in mainline. I had the same question ;-) > johannes > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver 2014-11-11 9:54 ` Arend van Spriel @ 2014-11-11 10:03 ` Johannes Berg [not found] ` <1415700220.2163.3.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> [not found] ` <5461DCC9.5050702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 1 sibling, 1 reply; 9+ messages in thread From: Johannes Berg @ 2014-11-11 10:03 UTC (permalink / raw) To: Arend van Spriel Cc: Gautam (Gautam Kumar) Shukla, linville@tuxdriver.com, linux-wireless@vger.kernel.org, davem@davemloft.net, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jithu Jance, Sreenath S On Tue, 2014-11-11 at 10:54 +0100, Arend van Spriel wrote: > > Also, there's a competing approach from QCA that's far more suited. > > I probably was not paying attention to it, but would you have a > reference to this. ... digs around in email ... http://mid.gmane.org/1343907187-6686-1-git-send-email-qca_vkondrat@qca.qualcomm.com Anyway, looking back at that, it wasn't really all that different, just a bit more complete maybe. johannes ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1415700220.2163.3.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>]
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver [not found] ` <1415700220.2163.3.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> @ 2014-11-11 10:35 ` Arend van Spriel 2014-11-11 10:38 ` Johannes Berg 0 siblings, 1 reply; 9+ messages in thread From: Arend van Spriel @ 2014-11-11 10:35 UTC (permalink / raw) To: Johannes Berg Cc: Gautam (Gautam Kumar) Shukla, linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jithu Jance, Sreenath S, Vladimir Kondratiev On 11-11-14 11:03, Johannes Berg wrote: > On Tue, 2014-11-11 at 10:54 +0100, Arend van Spriel wrote: > >>> Also, there's a competing approach from QCA that's far more suited. >> >> I probably was not paying attention to it, but would you have a >> reference to this. > > ... digs around in email ... > > http://mid.gmane.org/1343907187-6686-1-git-send-email-qca_vkondrat-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org > > Anyway, looking back at that, it wasn't really all that different, just > a bit more complete maybe. Read through the whole thread. It seems some comments from you needed to be addressed and Vladimir wanted to evaluate it. So that was the end of the thread. What did pop up is the wiphy flags vs. nl80211 feature flags. When that comes up it looks like 'potAtoes, potaetoes' to me. So is there are clear design rule for when to use which flag. For me the wiphy object represents the device/firmware and 4-way handshake offload support is determined by what the device/firmware supports. Regards, Arend > johannes > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver 2014-11-11 10:35 ` Arend van Spriel @ 2014-11-11 10:38 ` Johannes Berg 2014-11-11 10:44 ` Arend van Spriel 0 siblings, 1 reply; 9+ messages in thread From: Johannes Berg @ 2014-11-11 10:38 UTC (permalink / raw) To: Arend van Spriel Cc: Gautam (Gautam Kumar) Shukla, linville@tuxdriver.com, linux-wireless@vger.kernel.org, davem@davemloft.net, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jithu Jance, Sreenath S, Vladimir Kondratiev On Tue, 2014-11-11 at 11:35 +0100, Arend van Spriel wrote: > What did pop up is the wiphy flags vs. nl80211 feature flags. When that > comes up it looks like 'potAtoes, potaetoes' to me. > > So is there are clear design rule for when to use which flag. For me the > wiphy object represents the device/firmware and 4-way handshake offload > support is determined by what the device/firmware supports. There are three types of flags: * wiphy flag attributes - deprecated as far as I'm concerned * wiphy nl80211 feature flags - much easier to use in kernel (and userspace) * nl80211 protocol flags - only one exists (NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP) johannes ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver 2014-11-11 10:38 ` Johannes Berg @ 2014-11-11 10:44 ` Arend van Spriel 0 siblings, 0 replies; 9+ messages in thread From: Arend van Spriel @ 2014-11-11 10:44 UTC (permalink / raw) To: Johannes Berg Cc: Gautam (Gautam Kumar) Shukla, linville@tuxdriver.com, linux-wireless@vger.kernel.org, davem@davemloft.net, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jithu Jance, Sreenath S, Vladimir Kondratiev On 11-11-14 11:38, Johannes Berg wrote: > On Tue, 2014-11-11 at 11:35 +0100, Arend van Spriel wrote: > >> What did pop up is the wiphy flags vs. nl80211 feature flags. When that >> comes up it looks like 'potAtoes, potaetoes' to me. >> >> So is there are clear design rule for when to use which flag. For me the >> wiphy object represents the device/firmware and 4-way handshake offload >> support is determined by what the device/firmware supports. > > There are three types of flags: > > * wiphy flag attributes - deprecated as far as I'm concerned Ok. deprecated is clear enough ;-) > * wiphy nl80211 feature flags - much easier to use in kernel (and > userspace) > * nl80211 protocol flags - only one exists > (NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP) Thanks, Arend ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <5461DCC9.5050702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>]
* RE: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver [not found] ` <5461DCC9.5050702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> @ 2014-11-11 10:33 ` Gautam (Gautam Kumar) Shukla 0 siblings, 0 replies; 9+ messages in thread From: Gautam (Gautam Kumar) Shukla @ 2014-11-11 10:33 UTC (permalink / raw) To: Arend Van Spriel, Johannes Berg Cc: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jithu Jance, Sreenath S Thanks a lot Johannes and Arend , for your comments and review . It will really help me in my next patch submission . Just wanted to know when QCA patch will get in main line as it was last updated on 23 aug 2012. Thanks and regards -----Original Message----- From: Arend van Spriel [mailto:arend@broadcom.com] Sent: Tuesday, November 11, 2014 3:24 PM To: Johannes Berg; Gautam (Gautam Kumar) Shukla Cc: linville@tuxdriver.com; linux-wireless@vger.kernel.org; davem@davemloft.net; linux-api@vger.kernel.org; linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Jithu Jance; Sreenath S Subject: Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver On 11-11-14 10:29, Johannes Berg wrote: > On Tue, 2014-11-11 at 05:56 +0000, Gautam (Gautam Kumar) Shukla wrote: >> For offloading 4 way handshake to driver, currently we don't have any >> member of struct cfg80211_connect_params to pass PSK from supplicant >> to driver. I have added psk for the same and added rest of the code >> needed in nl80211.h and nl80211.c to parse and make it available to >> driver. >> From supplicant, we already have psk member field in assoc_params to >> use . >> >> Tested on x86 linux. > > Your commit message needs serious work. > > Also, there's a competing approach from QCA that's far more suited. I probably was not paying attention to it, but would you have a reference to this. > In either case though, I'm going to ask which driver is going to use > this and when it's going to land in mainline. I had the same question ;-) > johannes > > -- > To unsubscribe from this list: send the line "unsubscribe > linux-wireless" in the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver [not found] ` <DF163EE1A432BF4BBE6B2088220663A67437BD-HXj2mutaA2pmqaqore1TH5r/X4hKkxxPpWgKQ6/u3Fg@public.gmane.org> 2014-11-11 9:29 ` Johannes Berg @ 2014-11-11 9:44 ` Arend van Spriel 1 sibling, 0 replies; 9+ messages in thread From: Arend van Spriel @ 2014-11-11 9:44 UTC (permalink / raw) To: Gautam (Gautam Kumar) Shukla, linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jithu Jance, Sreenath S On 11-11-14 06:56, Gautam (Gautam Kumar) Shukla wrote: > Hi Gautam, Good to see more upstream contributions, but it might be useful to have a driver implementation as well in this series. Maybe we can take a shot with brcmfmac for obvious reasons. Would you happen to have wpa_supplicant changes as well? I added some inline comments below. Regards, Arend > For offloading 4 way handshake to driver, currently we don't have any member of struct cfg80211_connect_params to pass PSK from supplicant to driver. I have added psk for the same and added rest of the code needed in nl80211.h and nl80211.c to parse and make it available to driver. > From supplicant, we already have psk member field in assoc_params to use . In the commit message you should not describe what you did, but what problem you are trying to solve and/or what functional change the patch provides. > Tested on x86 linux. > > Signed-off-by: Gautam kumar shukla <gautams-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> > --- > include/net/cfg80211.h | 2 ++ > include/uapi/linux/nl80211.h | 8 +++++++- > net/wireless/nl80211.c | 4 ++++ > 3 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a2ddcf2..6f744e0 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -1758,6 +1758,7 @@ struct cfg80211_ibss_params { > * allowed to ignore this @bssid_hint if it has knowledge of a better BSS > * to use. > * @ssid: SSID > + * @psk:preshared key for WPA2-PSK connection or %NULL if not specified add space after the colon sign. > * @ssid_len: Length of ssid in octets > * @auth_type: Authentication type (algorithm) > * @ie: IEs for association request > @@ -1783,6 +1784,7 @@ struct cfg80211_connect_params { > const u8 *bssid; > const u8 *bssid_hint; > const u8 *ssid; > + const u8 *psk; > size_t ssid_len; > enum nl80211_auth_type auth_type; > const u8 *ie; > diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 4b28dc0..b01d5dd 100644 > --- a/include/uapi/linux/nl80211.h > +++ b/include/uapi/linux/nl80211.h > @@ -421,7 +421,7 @@ > * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, > * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, > * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and > - * %NL80211_ATTR_WIPHY_FREQ_HINT. > + * %NL80211_ATTR_WIPHY_FREQ_HINT, and %NL80211_ATTR_PSK. > * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are > * restrictions on BSS selection, i.e., they effectively prevent roaming > * within the ESS. %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT @@ -1638,6 +1638,10 @@ enum nl80211_commands { > * @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see > * &enum nl80211_smps_mode. > * > + * @NL80211_ATTR_PSK: a PSK value (u8 attribute).This is 32-octet > + (256-bit) > + * PSK. > + * Some indentation gone haywire here. I would remove '(u8 attribute)'. The mention of 32-octet seems sufficient to me. > * @NL80211_ATTR_MAX: highest attribute number currently defined > * @__NL80211_ATTR_AFTER_LAST: internal use > */ > @@ -1990,6 +1994,8 @@ enum nl80211_attrs { > > NL80211_ATTR_SMPS_MODE, > > + NL80211_ATTR_PSK, > + > /* add attributes here, update the policy in nl80211.c */ > > __NL80211_ATTR_AFTER_LAST, > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5839c85..91c24b1 100644 > --- a/net/wireless/nl80211.c > +++ b/net/wireless/nl80211.c > @@ -395,6 +395,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { > [NL80211_ATTR_USER_PRIO] = { .type = NLA_U8 }, > [NL80211_ATTR_ADMITTED_TIME] = { .type = NLA_U16 }, > [NL80211_ATTR_SMPS_MODE] = { .type = NLA_U8 }, > + [NL80211_ATTR_PSK] = { .type = NLA_BINARY, .len = 32 }, > }; > > /* policy for the key attributes */ > @@ -7310,6 +7311,9 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) > connect.flags |= ASSOC_REQ_USE_RRM; > } > > + if (info->attrs[NL80211_ATTR_PSK]) > + connect.psk = nla_data(info->attrs[NL80211_ATTR_PSK]); > + > wdev_lock(dev->ieee80211_ptr); > err = cfg80211_connect(rdev, dev, &connect, connkeys, NULL); > wdev_unlock(dev->ieee80211_ptr); > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-11-11 10:44 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-11 5:56 [PATCH 1/1] linux-wireless: Added psk in struct cfg80211_connect_params needed for offloading 4way handshake to driver Gautam (Gautam Kumar) Shukla [not found] ` <DF163EE1A432BF4BBE6B2088220663A67437BD-HXj2mutaA2pmqaqore1TH5r/X4hKkxxPpWgKQ6/u3Fg@public.gmane.org> 2014-11-11 9:29 ` Johannes Berg 2014-11-11 9:54 ` Arend van Spriel 2014-11-11 10:03 ` Johannes Berg [not found] ` <1415700220.2163.3.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> 2014-11-11 10:35 ` Arend van Spriel 2014-11-11 10:38 ` Johannes Berg 2014-11-11 10:44 ` Arend van Spriel [not found] ` <5461DCC9.5050702-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-11-11 10:33 ` Gautam (Gautam Kumar) Shukla 2014-11-11 9:44 ` Arend van Spriel
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).