Commit ae7ba17b authored by Shaul Triebitz's avatar Shaul Triebitz Committed by Johannes Berg
Browse files

wifi: mac80211: pass the link id in start/stop ap



In start_ap and stop_ap mac80211 callbacks pass the link_id
to the drivers.

Signed-off-by: default avatarShaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d9f83f22
Loading
Loading
Loading
Loading
+34 −6
Original line number Diff line number Diff line
@@ -2396,7 +2396,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
}

static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
				 struct ieee80211_vif *vif)
				 struct ieee80211_vif *vif,
				 unsigned int link_id)
{
	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
@@ -2522,8 +2523,22 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
	return ret;
}

static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
static int iwl_mvm_start_ap(struct ieee80211_hw *hw,
			    struct ieee80211_vif *vif,
			    unsigned int link_id)
{
	return iwl_mvm_start_ap_ibss(hw, vif, link_id);
}

static int iwl_mvm_start_ibss(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif)
{
	return iwl_mvm_start_ap_ibss(hw, vif, 0);
}

static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
				 struct ieee80211_vif *vif,
				 unsigned int link_id)
{
	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
@@ -2586,6 +2601,19 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
	mutex_unlock(&mvm->mutex);
}

static void iwl_mvm_stop_ap(struct ieee80211_hw *hw,
			    struct ieee80211_vif *vif,
			    unsigned int link_id)
{
	iwl_mvm_stop_ap_ibss(hw, vif, link_id);
}

static void iwl_mvm_stop_ibss(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif)
{
	iwl_mvm_stop_ap_ibss(hw, vif, 0);
}

static void
iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
				 struct ieee80211_vif *vif,
@@ -5408,10 +5436,10 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
	.unassign_vif_chanctx = iwl_mvm_unassign_vif_chanctx,
	.switch_vif_chanctx = iwl_mvm_switch_vif_chanctx,

	.start_ap = iwl_mvm_start_ap_ibss,
	.stop_ap = iwl_mvm_stop_ap_ibss,
	.join_ibss = iwl_mvm_start_ap_ibss,
	.leave_ibss = iwl_mvm_stop_ap_ibss,
	.start_ap = iwl_mvm_start_ap,
	.stop_ap = iwl_mvm_stop_ap,
	.join_ibss = iwl_mvm_start_ibss,
	.leave_ibss = iwl_mvm_stop_ibss,

	.tx_last_beacon = iwl_mvm_tx_last_beacon,

+2 −1
Original line number Diff line number Diff line
@@ -429,7 +429,8 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
	mutex_unlock(&rtwdev->mutex);
}

static int rtw_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
static int rtw_ops_start_ap(struct ieee80211_hw *hw,
			    struct ieee80211_vif *vif, unsigned int link_id)
{
	struct rtw_dev *rtwdev = hw->priv;
	struct rtw_chip_info *chip = rtwdev->chip;
+4 −2
Original line number Diff line number Diff line
@@ -381,7 +381,8 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,
	mutex_unlock(&rtwdev->mutex);
}

static int rtw89_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
static int rtw89_ops_start_ap(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif, unsigned int link_id)
{
	struct rtw89_dev *rtwdev = hw->priv;
	struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
@@ -401,7 +402,8 @@ static int rtw89_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif
}

static
void rtw89_ops_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
void rtw89_ops_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		       unsigned int link_id)
{
	struct rtw89_dev *rtwdev = hw->priv;
	struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
+4 −2
Original line number Diff line number Diff line
@@ -378,7 +378,8 @@ static void wfx_set_mfp_ap(struct wfx_vif *wvif)
	}
}

int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		 unsigned int link_id)
{
	struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
	struct wfx_dev *wdev = wvif->wdev;
@@ -396,7 +397,8 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
	return ret;
}

void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		 unsigned int link_id)
{
	struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;

+4 −2
Original line number Diff line number Diff line
@@ -29,8 +29,10 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,

int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		 unsigned int link_id);
void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
		 unsigned int link_id);
int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
Loading