@@ -960,7 +960,8 @@ void iwl3945_rate_scale_init(struct ieee
rcu_read_lock();
- sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr);
+ sta = ieee80211_find_sta(priv->vif,
+ priv->stations[sta_id].sta.sta.addr);
if (!sta) {
rcu_read_unlock();
return;
@@ -2338,7 +2338,7 @@ static void iwl_ht_conf(struct iwl_priv
switch (priv->iw_mode) {
case NL80211_IFTYPE_STATION:
rcu_read_lock();
- sta = ieee80211_find_sta(priv->hw, priv->bssid);
+ sta = ieee80211_find_sta(priv->vif, priv->bssid);
if (sta) {
struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
int maxstreams;
@@ -1012,7 +1012,7 @@ int iwl_rxon_add_station(struct iwl_priv
*/
if (priv->current_ht_config.is_ht) {
rcu_read_lock();
- sta = ieee80211_find_sta(priv->hw, addr);
+ sta = ieee80211_find_sta(priv->vif, addr);
if (sta) {
memcpy(&ht_config, &sta->ht_cap, sizeof(ht_config));
cur_ht_config = &ht_config;
@@ -2106,13 +2106,13 @@ void ieee80211_stop_tx_ba_cb_irqsafe(str
/**
* ieee80211_find_sta - find a station
*
- * @hw: pointer as obtained from ieee80211_alloc_hw()
+ * @vif: virtual interface to look for station on
* @addr: station's address
*
* This function must be called under RCU lock and the
* resulting pointer is only valid under RCU lock as well.
*/
-struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw,
+struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
const u8 *addr);
/**
@@ -801,10 +801,13 @@ void ieee80211_sta_expire(struct ieee802
sta_info_destroy(sta);
}
-struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw,
+struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
const u8 *addr)
{
- struct sta_info *sta = sta_info_get(hw_to_local(hw), addr);
+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct sta_info *sta;
+
+ sta = sta_info_get(sdata->local, addr);
if (!sta)
return NULL;
@@ -202,7 +202,7 @@ static int ath_rx_prepare(struct sk_buff
}
rcu_read_lock();
- sta = ieee80211_find_sta(sc->hw, hdr->addr2);
+ sta = ieee80211_find_sta(/*?????*/, hdr->addr2);
if (sta) {
an = (struct ath_node *) sta->drv_priv;
if (ds->ds_rxstat.rs_rssi != ATH9K_RSSI_BAD &&
@@ -282,7 +282,7 @@ static void ath_tx_complete_aggr(struct
rcu_read_lock();
- sta = ieee80211_find_sta(sc->hw, hdr->addr1);
+ sta = ieee80211_find_sta(/*??????*/, hdr->addr1);
if (!sta) {
rcu_read_unlock();
return;