From ad15e061fae0cd29943572fb68f8b375fd9ecacc Mon Sep 17 00:00:00 2001 From: vamsi krishna Date: Tue, 6 Dec 2016 18:06:40 +0530 Subject: cfg80211: Add support to update connection parameters Add functionality to update the connection parameters when in connected state, so that driver/firmware uses the updated parameters for subsequent roaming. This is for drivers that support internal BSS selection and roaming. The new command does not change the current association state, i.e., it can be used to update IE contents for future (re)associations without causing an immediate disassociation or reassociation with the current BSS. This commit implements the required functionality for updating IEs for (Re)Association Request frame only. Other parameters can be added in future when required. Signed-off-by: vamsi krishna Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg Git-commit: 088e8df82f91a24728d49d9532cab7ebdee5117f Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git Change-Id: I184b8e13bc5f7e2ed21e5337673c6ba82cd2f4fe CRs-Fixed: 1097836 [apati@codeaurora.org: backport to 4.4-This commit includes the changes from following commits in include/uapi/linux/nl80211.h to compile for msm-4.4. cb3b7d87652aeb37cfb5295a6157a3280dae10cb : cfg80211: add start / stop NAN commands. a442b761b24b6886f9a4e2ff5f8cb4824c96526b : cfg80211: add add_nan_func / del_nan_func. a5a9dcf291e1e541243878eed2d73a74006fa1f1 : cfg80211: allow the user space to change current NAN configuration. 50bcd31d9992e99c231820f5276e70346cbfbc51 : cfg80211: provide a function to report a match for NAN. ce0ce13a1c89ff8b94b7f8fb32eb4c43e111c82e : cfg80211: configure multicast to unicast for AP interfaces. c6e6a0c8be575c830a97b1942dabeab70f423fe0 : nl80211: Add API to support VHT MU-MIMO air sniffer. 1d76250bd34af86c6498fc51e50cab3bfbbeceaa : nl80211: support beacon report scanning. 7d27a0ba7adc8ef30c2aae7592fce4c162aee4df : cfg80211: Add mesh peer AID setting API. 348bd456699801920a309c66e382380809fbdf41 : cfg80211: Add KEK/nonces for FILS association frames.] Signed-off-by: Ashwini Patil --- include/net/cfg80211.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/net') diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index cc1e8d6b3454..5776055944f1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1965,6 +1965,18 @@ struct cfg80211_connect_params { const u8 *prev_bssid; }; +/** + * enum cfg80211_connect_params_changed - Connection parameters being updated + * + * This enum provides information of all connect parameters that + * have to be updated as part of update_connect_params() call. + * + * @UPDATE_ASSOC_IES: Indicates whether association request IEs are updated + */ +enum cfg80211_connect_params_changed { + UPDATE_ASSOC_IES = BIT(0), +}; + /** * enum wiphy_params_flags - set_wiphy_params bitfield values * @WIPHY_PARAM_RETRY_SHORT: wiphy->retry_short has changed @@ -2380,6 +2392,14 @@ struct cfg80211_qos_map { * If the connection fails for some reason, call cfg80211_connect_result() * with the status from the AP. * (invoked with the wireless_dev mutex held) + * @update_connect_params: Update the connect parameters while connected to a + * BSS. The updated parameters can be used by driver/firmware for + * subsequent BSS selection (roaming) decisions and to form the + * Authentication/(Re)Association Request frames. This call does not + * request an immediate disassociation or reassociation with the current + * BSS, i.e., this impacts only subsequent (re)associations. The bits in + * changed are defined in &enum cfg80211_connect_params_changed. + * (invoked with the wireless_dev mutex held) * @disconnect: Disconnect from the BSS/ESS. * (invoked with the wireless_dev mutex held) * @@ -2650,6 +2670,10 @@ struct cfg80211_ops { int (*connect)(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme); + int (*update_connect_params)(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_connect_params *sme, + u32 changed); int (*disconnect)(struct wiphy *wiphy, struct net_device *dev, u16 reason_code); -- cgit v1.2.3