mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 22:14:36 -04:00
wifi: mac80211: remove extra link STA functions
There's no need to have a lockdep assert and then call another function, just move everything into one place. Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240506211934.9759564a25f4.I88d43aa459d15c1d6230152e76b7757c2cdd6085@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -4974,13 +4974,17 @@ static void ieee80211_del_intf_link(struct wiphy *wiphy,
|
||||
ieee80211_vif_set_links(sdata, wdev->valid_links, 0);
|
||||
}
|
||||
|
||||
static int sta_add_link_station(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct link_station_parameters *params)
|
||||
static int
|
||||
ieee80211_add_link_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct link_station_parameters *params)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
struct sta_info *sta;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_wiphy(local->hw.wiphy);
|
||||
|
||||
sta = sta_info_get_bss(sdata, params->mld_mac);
|
||||
if (!sta)
|
||||
return -ENOENT;
|
||||
@@ -5006,23 +5010,15 @@ static int sta_add_link_station(struct ieee80211_local *local,
|
||||
}
|
||||
|
||||
static int
|
||||
ieee80211_add_link_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
ieee80211_mod_link_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct link_station_parameters *params)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
|
||||
lockdep_assert_wiphy(sdata->local->hw.wiphy);
|
||||
|
||||
return sta_add_link_station(local, sdata, params);
|
||||
}
|
||||
|
||||
static int sta_mod_link_station(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct link_station_parameters *params)
|
||||
{
|
||||
struct sta_info *sta;
|
||||
|
||||
lockdep_assert_wiphy(local->hw.wiphy);
|
||||
|
||||
sta = sta_info_get_bss(sdata, params->mld_mac);
|
||||
if (!sta)
|
||||
return -ENOENT;
|
||||
@@ -5034,22 +5030,14 @@ static int sta_mod_link_station(struct ieee80211_local *local,
|
||||
}
|
||||
|
||||
static int
|
||||
ieee80211_mod_link_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct link_station_parameters *params)
|
||||
ieee80211_del_link_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct link_station_del_parameters *params)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_local *local = wiphy_priv(wiphy);
|
||||
struct sta_info *sta;
|
||||
|
||||
lockdep_assert_wiphy(sdata->local->hw.wiphy);
|
||||
|
||||
return sta_mod_link_station(local, sdata, params);
|
||||
}
|
||||
|
||||
static int sta_del_link_station(struct ieee80211_sub_if_data *sdata,
|
||||
struct link_station_del_parameters *params)
|
||||
{
|
||||
struct sta_info *sta;
|
||||
|
||||
sta = sta_info_get_bss(sdata, params->mld_mac);
|
||||
if (!sta)
|
||||
return -ENOENT;
|
||||
@@ -5066,17 +5054,6 @@ static int sta_del_link_station(struct ieee80211_sub_if_data *sdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ieee80211_del_link_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct link_station_del_parameters *params)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
|
||||
lockdep_assert_wiphy(sdata->local->hw.wiphy);
|
||||
|
||||
return sta_del_link_station(sdata, params);
|
||||
}
|
||||
|
||||
static int ieee80211_set_hw_timestamp(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_set_hw_timestamp *hwts)
|
||||
|
||||
Reference in New Issue
Block a user