cfg.c (40a27ea07949a022a083de28da99f8f472242e2e) cfg.c (cb71f1d136a635decf43c3b502ee34fb05640fcd)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * mac80211 configuration hooks for cfg80211
4 *
5 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2015 Intel Mobile Communications GmbH
7 * Copyright (C) 2015-2017 Intel Deutschland GmbH
8 * Copyright (C) 2018-2022 Intel Corporation

--- 1825 unchanged lines hidden (view full) ---

1834 if (!is_valid_ether_addr(mac))
1835 return -EINVAL;
1836
1837 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER) &&
1838 sdata->vif.type == NL80211_IFTYPE_STATION &&
1839 !sdata->u.mgd.associated)
1840 return -EINVAL;
1841
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * mac80211 configuration hooks for cfg80211
4 *
5 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
6 * Copyright 2013-2015 Intel Mobile Communications GmbH
7 * Copyright (C) 2015-2017 Intel Deutschland GmbH
8 * Copyright (C) 2018-2022 Intel Corporation

--- 1825 unchanged lines hidden (view full) ---

1834 if (!is_valid_ether_addr(mac))
1835 return -EINVAL;
1836
1837 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER) &&
1838 sdata->vif.type == NL80211_IFTYPE_STATION &&
1839 !sdata->u.mgd.associated)
1840 return -EINVAL;
1841
1842 sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
1842 sta = sta_info_alloc(sdata, mac, -1, GFP_KERNEL);
1843 if (!sta)
1844 return -ENOMEM;
1845
1846 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
1847 sta->sta.tdls = true;
1848
1849 err = sta_apply_parameters(local, sta, params);
1850 if (err) {

--- 2807 unchanged lines hidden ---
1843 if (!sta)
1844 return -ENOMEM;
1845
1846 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
1847 sta->sta.tdls = true;
1848
1849 err = sta_apply_parameters(local, sta, params);
1850 if (err) {

--- 2807 unchanged lines hidden ---