int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid, enum ieee80211_back_parties initiator) { struct ieee80211_local *local = hw_to_local(hw); struct sta_info *sta; int ret = 0; if (WARN_ON(!local->ops->ampdu_action)) return -EINVAL; if (tid >= STA_TID_NUM) return -EINVAL; rcu_read_lock(); sta = sta_info_get(local, ra); if (!sta) { rcu_read_unlock(); return -ENOENT; } ret = __ieee80211_stop_tx_ba_session(sta, tid, initiator); rcu_read_unlock(); return ret; }
int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid, enum ieee80211_back_parties initiator) { struct sta_info *sta = container_of(pubsta, struct sta_info, sta); struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_local *local = sdata->local; if (!local->ops->ampdu_action) return -EINVAL; if (tid >= STA_TID_NUM) return -EINVAL; return __ieee80211_stop_tx_ba_session(sta, tid, initiator); }