Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31fa97c5 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Johannes Berg
Browse files

cfg80211: pass TDLS initiator in tdls_mgmt operations



The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.

Fix dependent drivers - mwifiex and mac80211.

Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 17e6a59a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2631,7 +2631,8 @@ static int
mwifiex_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
			   const u8 *peer, u8 action_code, u8 dialog_token,
			   u16 status_code, u32 peer_capability,
			   const u8 *extra_ies, size_t extra_ies_len)
			   bool initiator, const u8 *extra_ies,
			   size_t extra_ies_len)
{
	struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
	int ret;
+1 −1
Original line number Diff line number Diff line
@@ -2500,7 +2500,7 @@ struct cfg80211_ops {
	int	(*tdls_mgmt)(struct wiphy *wiphy, struct net_device *dev,
			     const u8 *peer, u8 action_code,  u8 dialog_token,
			     u16 status_code, u32 peer_capability,
			     const u8 *buf, size_t len);
			     bool initiator, const u8 *buf, size_t len);
	int	(*tdls_oper)(struct wiphy *wiphy, struct net_device *dev,
			     const u8 *peer, enum nl80211_tdls_operation oper);

+5 −0
Original line number Diff line number Diff line
@@ -1591,6 +1591,9 @@ enum nl80211_commands {
 *	creation then the new interface will be owned by the netlink socket
 *	that created it and will be destroyed when the socket is closed
 *
 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
 *	the TDLS link initiator.
 *
 * @NL80211_ATTR_MAX: highest attribute number currently defined
 * @__NL80211_ATTR_AFTER_LAST: internal use
 */
@@ -1931,6 +1934,8 @@ enum nl80211_attrs {
	NL80211_ATTR_CSA_C_OFFSETS_TX,
	NL80211_ATTR_MAX_CSA_COUNTERS,

	NL80211_ATTR_TDLS_INITIATOR,

	/* add attributes here, update the policy in nl80211.c */

	__NL80211_ATTR_AFTER_LAST,
+2 −1
Original line number Diff line number Diff line
@@ -1867,7 +1867,8 @@ int ieee80211_max_num_channels(struct ieee80211_local *local);
int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
			const u8 *peer, u8 action_code, u8 dialog_token,
			u16 status_code, u32 peer_capability,
			const u8 *extra_ies, size_t extra_ies_len);
			bool initiator, const u8 *extra_ies,
			size_t extra_ies_len);
int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
			const u8 *peer, enum nl80211_tdls_operation oper);

+2 −1
Original line number Diff line number Diff line
@@ -299,7 +299,8 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
int ieee80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
			const u8 *peer, u8 action_code, u8 dialog_token,
			u16 status_code, u32 peer_capability,
			const u8 *extra_ies, size_t extra_ies_len)
			bool initiator, const u8 *extra_ies,
			size_t extra_ies_len)
{
	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
	struct ieee80211_local *local = sdata->local;
Loading