diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-10 18:02:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-15 16:48:23 -0400 |
commit | 17741cdc264e4d768167766a252210e201c1519a (patch) | |
tree | 72c0e697af29a40c03bce002b529c3951d34a3b7 /drivers/net/wireless | |
parent | 8aa21e6fd703cb3fed66ac07dcbcb861f00cf6d6 (diff) |
mac80211: share STA information with driver
This patch changes mac80211 to share some more data about
stations with drivers. Should help iwlwifi and ath9k when
they get around to updating, and might also help with
implementing rate control algorithms without internals.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 3 |
6 files changed, 32 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 2a6e089062f3..1ba18006f475 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -1405,7 +1405,7 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw, | |||
1405 | static void ath9k_sta_notify(struct ieee80211_hw *hw, | 1405 | static void ath9k_sta_notify(struct ieee80211_hw *hw, |
1406 | struct ieee80211_vif *vif, | 1406 | struct ieee80211_vif *vif, |
1407 | enum sta_notify_cmd cmd, | 1407 | enum sta_notify_cmd cmd, |
1408 | const u8 *addr) | 1408 | struct ieee80211_sta *sta) |
1409 | { | 1409 | { |
1410 | struct ath_softc *sc = hw->priv; | 1410 | struct ath_softc *sc = hw->priv; |
1411 | struct ath_node *an; | 1411 | struct ath_node *an; |
@@ -1413,19 +1413,18 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw, | |||
1413 | DECLARE_MAC_BUF(mac); | 1413 | DECLARE_MAC_BUF(mac); |
1414 | 1414 | ||
1415 | spin_lock_irqsave(&sc->node_lock, flags); | 1415 | spin_lock_irqsave(&sc->node_lock, flags); |
1416 | an = ath_node_find(sc, (u8 *) addr); | 1416 | an = ath_node_find(sc, sta->addr); |
1417 | spin_unlock_irqrestore(&sc->node_lock, flags); | 1417 | spin_unlock_irqrestore(&sc->node_lock, flags); |
1418 | 1418 | ||
1419 | switch (cmd) { | 1419 | switch (cmd) { |
1420 | case STA_NOTIFY_ADD: | 1420 | case STA_NOTIFY_ADD: |
1421 | spin_lock_irqsave(&sc->node_lock, flags); | 1421 | spin_lock_irqsave(&sc->node_lock, flags); |
1422 | if (!an) { | 1422 | if (!an) { |
1423 | ath_node_attach(sc, (u8 *)addr, 0); | 1423 | ath_node_attach(sc, sta->addr, 0); |
1424 | DPRINTF(sc, ATH_DBG_CONFIG, "%s: Attach a node: %s\n", | 1424 | DPRINTF(sc, ATH_DBG_CONFIG, "%s: Attach a node: %s\n", |
1425 | __func__, | 1425 | __func__, print_mac(mac, sta->addr)); |
1426 | print_mac(mac, addr)); | ||
1427 | } else { | 1426 | } else { |
1428 | ath_node_get(sc, (u8 *)addr); | 1427 | ath_node_get(sc, sta->addr); |
1429 | } | 1428 | } |
1430 | spin_unlock_irqrestore(&sc->node_lock, flags); | 1429 | spin_unlock_irqrestore(&sc->node_lock, flags); |
1431 | break; | 1430 | break; |
@@ -1438,7 +1437,7 @@ static void ath9k_sta_notify(struct ieee80211_hw *hw, | |||
1438 | ath_node_put(sc, an, ATH9K_BH_STATUS_INTACT); | 1437 | ath_node_put(sc, an, ATH9K_BH_STATUS_INTACT); |
1439 | DPRINTF(sc, ATH_DBG_CONFIG, "%s: Put a node: %s\n", | 1438 | DPRINTF(sc, ATH_DBG_CONFIG, "%s: Put a node: %s\n", |
1440 | __func__, | 1439 | __func__, |
1441 | print_mac(mac, addr)); | 1440 | print_mac(mac, sta->addr)); |
1442 | } | 1441 | } |
1443 | break; | 1442 | break; |
1444 | default: | 1443 | default: |
@@ -1581,45 +1580,44 @@ static void ath9k_reset_tsf(struct ieee80211_hw *hw) | |||
1581 | 1580 | ||
1582 | static int ath9k_ampdu_action(struct ieee80211_hw *hw, | 1581 | static int ath9k_ampdu_action(struct ieee80211_hw *hw, |
1583 | enum ieee80211_ampdu_mlme_action action, | 1582 | enum ieee80211_ampdu_mlme_action action, |
1584 | const u8 *addr, | 1583 | struct ieee80211_sta *sta, |
1585 | u16 tid, | 1584 | u16 tid, u16 *ssn) |
1586 | u16 *ssn) | ||
1587 | { | 1585 | { |
1588 | struct ath_softc *sc = hw->priv; | 1586 | struct ath_softc *sc = hw->priv; |
1589 | int ret = 0; | 1587 | int ret = 0; |
1590 | 1588 | ||
1591 | switch (action) { | 1589 | switch (action) { |
1592 | case IEEE80211_AMPDU_RX_START: | 1590 | case IEEE80211_AMPDU_RX_START: |
1593 | ret = ath_rx_aggr_start(sc, addr, tid, ssn); | 1591 | ret = ath_rx_aggr_start(sc, sta->addr, tid, ssn); |
1594 | if (ret < 0) | 1592 | if (ret < 0) |
1595 | DPRINTF(sc, ATH_DBG_FATAL, | 1593 | DPRINTF(sc, ATH_DBG_FATAL, |
1596 | "%s: Unable to start RX aggregation\n", | 1594 | "%s: Unable to start RX aggregation\n", |
1597 | __func__); | 1595 | __func__); |
1598 | break; | 1596 | break; |
1599 | case IEEE80211_AMPDU_RX_STOP: | 1597 | case IEEE80211_AMPDU_RX_STOP: |
1600 | ret = ath_rx_aggr_stop(sc, addr, tid); | 1598 | ret = ath_rx_aggr_stop(sc, sta->addr, tid); |
1601 | if (ret < 0) | 1599 | if (ret < 0) |
1602 | DPRINTF(sc, ATH_DBG_FATAL, | 1600 | DPRINTF(sc, ATH_DBG_FATAL, |
1603 | "%s: Unable to stop RX aggregation\n", | 1601 | "%s: Unable to stop RX aggregation\n", |
1604 | __func__); | 1602 | __func__); |
1605 | break; | 1603 | break; |
1606 | case IEEE80211_AMPDU_TX_START: | 1604 | case IEEE80211_AMPDU_TX_START: |
1607 | ret = ath_tx_aggr_start(sc, addr, tid, ssn); | 1605 | ret = ath_tx_aggr_start(sc, sta->addr, tid, ssn); |
1608 | if (ret < 0) | 1606 | if (ret < 0) |
1609 | DPRINTF(sc, ATH_DBG_FATAL, | 1607 | DPRINTF(sc, ATH_DBG_FATAL, |
1610 | "%s: Unable to start TX aggregation\n", | 1608 | "%s: Unable to start TX aggregation\n", |
1611 | __func__); | 1609 | __func__); |
1612 | else | 1610 | else |
1613 | ieee80211_start_tx_ba_cb_irqsafe(hw, (u8 *)addr, tid); | 1611 | ieee80211_start_tx_ba_cb_irqsafe(hw, sta->addr, tid); |
1614 | break; | 1612 | break; |
1615 | case IEEE80211_AMPDU_TX_STOP: | 1613 | case IEEE80211_AMPDU_TX_STOP: |
1616 | ret = ath_tx_aggr_stop(sc, addr, tid); | 1614 | ret = ath_tx_aggr_stop(sc, sta->addr, tid); |
1617 | if (ret < 0) | 1615 | if (ret < 0) |
1618 | DPRINTF(sc, ATH_DBG_FATAL, | 1616 | DPRINTF(sc, ATH_DBG_FATAL, |
1619 | "%s: Unable to stop TX aggregation\n", | 1617 | "%s: Unable to stop TX aggregation\n", |
1620 | __func__); | 1618 | __func__); |
1621 | 1619 | ||
1622 | ieee80211_stop_tx_ba_cb_irqsafe(hw, (u8 *)addr, tid); | 1620 | ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid); |
1623 | break; | 1621 | break; |
1624 | default: | 1622 | default: |
1625 | DPRINTF(sc, ATH_DBG_FATAL, | 1623 | DPRINTF(sc, ATH_DBG_FATAL, |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index df7a1e7f4a52..0f628a29d833 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -4234,7 +4234,8 @@ out_unlock: | |||
4234 | return err; | 4234 | return err; |
4235 | } | 4235 | } |
4236 | 4236 | ||
4237 | static int b43_op_beacon_set_tim(struct ieee80211_hw *hw, int aid, int set) | 4237 | static int b43_op_beacon_set_tim(struct ieee80211_hw *hw, |
4238 | struct ieee80211_sta *sta, bool set) | ||
4238 | { | 4239 | { |
4239 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4240 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4240 | unsigned long flags; | 4241 | unsigned long flags; |
@@ -4249,7 +4250,7 @@ static int b43_op_beacon_set_tim(struct ieee80211_hw *hw, int aid, int set) | |||
4249 | static void b43_op_sta_notify(struct ieee80211_hw *hw, | 4250 | static void b43_op_sta_notify(struct ieee80211_hw *hw, |
4250 | struct ieee80211_vif *vif, | 4251 | struct ieee80211_vif *vif, |
4251 | enum sta_notify_cmd notify_cmd, | 4252 | enum sta_notify_cmd notify_cmd, |
4252 | const u8 *addr) | 4253 | struct ieee80211_sta *sta) |
4253 | { | 4254 | { |
4254 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4255 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4255 | 4256 | ||
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 6e425410c99d..9fb1421cbec2 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3403,7 +3403,7 @@ out_unlock: | |||
3403 | } | 3403 | } |
3404 | 3404 | ||
3405 | static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, | 3405 | static int b43legacy_op_beacon_set_tim(struct ieee80211_hw *hw, |
3406 | int aid, int set) | 3406 | struct ieee80211_sta *sta, bool set) |
3407 | { | 3407 | { |
3408 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3408 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3409 | unsigned long flags; | 3409 | unsigned long flags; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 700da67ac288..af4e0b994e42 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -366,8 +366,8 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv, | |||
366 | if (state == HT_AGG_STATE_IDLE && | 366 | if (state == HT_AGG_STATE_IDLE && |
367 | rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { | 367 | rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { |
368 | IWL_DEBUG_HT("Starting Tx agg: STA: %s tid: %d\n", | 368 | IWL_DEBUG_HT("Starting Tx agg: STA: %s tid: %d\n", |
369 | print_mac(mac, sta->addr), tid); | 369 | print_mac(mac, sta->sta.addr), tid); |
370 | ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid); | 370 | ieee80211_start_tx_ba_session(priv->hw, sta->sta.addr, tid); |
371 | } | 371 | } |
372 | } | 372 | } |
373 | 373 | ||
@@ -2244,17 +2244,17 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, | |||
2244 | 2244 | ||
2245 | lq_sta->ibss_sta_added = 0; | 2245 | lq_sta->ibss_sta_added = 0; |
2246 | if (priv->iw_mode == NL80211_IFTYPE_AP) { | 2246 | if (priv->iw_mode == NL80211_IFTYPE_AP) { |
2247 | u8 sta_id = iwl_find_station(priv, sta->addr); | 2247 | u8 sta_id = iwl_find_station(priv, sta->sta.addr); |
2248 | DECLARE_MAC_BUF(mac); | 2248 | DECLARE_MAC_BUF(mac); |
2249 | 2249 | ||
2250 | /* for IBSS the call are from tasklet */ | 2250 | /* for IBSS the call are from tasklet */ |
2251 | IWL_DEBUG_RATE("LQ: ADD station %s\n", | 2251 | IWL_DEBUG_RATE("LQ: ADD station %s\n", |
2252 | print_mac(mac, sta->addr)); | 2252 | print_mac(mac, sta->sta.addr)); |
2253 | 2253 | ||
2254 | if (sta_id == IWL_INVALID_STATION) { | 2254 | if (sta_id == IWL_INVALID_STATION) { |
2255 | IWL_DEBUG_RATE("LQ: ADD station %s\n", | 2255 | IWL_DEBUG_RATE("LQ: ADD station %s\n", |
2256 | print_mac(mac, sta->addr)); | 2256 | print_mac(mac, sta->sta.addr)); |
2257 | sta_id = iwl_add_station_flags(priv, sta->addr, | 2257 | sta_id = iwl_add_station_flags(priv, sta->sta.addr, |
2258 | 0, CMD_ASYNC, NULL); | 2258 | 0, CMD_ASYNC, NULL); |
2259 | } | 2259 | } |
2260 | if ((sta_id != IWL_INVALID_STATION)) { | 2260 | if ((sta_id != IWL_INVALID_STATION)) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index e8db33bf5e5d..5eeffb41d8c2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3413,13 +3413,13 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
3413 | 3413 | ||
3414 | static int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, | 3414 | static int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, |
3415 | enum ieee80211_ampdu_mlme_action action, | 3415 | enum ieee80211_ampdu_mlme_action action, |
3416 | const u8 *addr, u16 tid, u16 *ssn) | 3416 | struct ieee80211_sta *sta, u16 tid, u16 *ssn) |
3417 | { | 3417 | { |
3418 | struct iwl_priv *priv = hw->priv; | 3418 | struct iwl_priv *priv = hw->priv; |
3419 | DECLARE_MAC_BUF(mac); | 3419 | DECLARE_MAC_BUF(mac); |
3420 | 3420 | ||
3421 | IWL_DEBUG_HT("A-MPDU action on addr %s tid %d\n", | 3421 | IWL_DEBUG_HT("A-MPDU action on addr %s tid %d\n", |
3422 | print_mac(mac, addr), tid); | 3422 | print_mac(mac, sta->addr), tid); |
3423 | 3423 | ||
3424 | if (!(priv->cfg->sku & IWL_SKU_N)) | 3424 | if (!(priv->cfg->sku & IWL_SKU_N)) |
3425 | return -EACCES; | 3425 | return -EACCES; |
@@ -3427,16 +3427,16 @@ static int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3427 | switch (action) { | 3427 | switch (action) { |
3428 | case IEEE80211_AMPDU_RX_START: | 3428 | case IEEE80211_AMPDU_RX_START: |
3429 | IWL_DEBUG_HT("start Rx\n"); | 3429 | IWL_DEBUG_HT("start Rx\n"); |
3430 | return iwl_rx_agg_start(priv, addr, tid, *ssn); | 3430 | return iwl_rx_agg_start(priv, sta->addr, tid, *ssn); |
3431 | case IEEE80211_AMPDU_RX_STOP: | 3431 | case IEEE80211_AMPDU_RX_STOP: |
3432 | IWL_DEBUG_HT("stop Rx\n"); | 3432 | IWL_DEBUG_HT("stop Rx\n"); |
3433 | return iwl_rx_agg_stop(priv, addr, tid); | 3433 | return iwl_rx_agg_stop(priv, sta->addr, tid); |
3434 | case IEEE80211_AMPDU_TX_START: | 3434 | case IEEE80211_AMPDU_TX_START: |
3435 | IWL_DEBUG_HT("start Tx\n"); | 3435 | IWL_DEBUG_HT("start Tx\n"); |
3436 | return iwl_tx_agg_start(priv, addr, tid, ssn); | 3436 | return iwl_tx_agg_start(priv, sta->addr, tid, ssn); |
3437 | case IEEE80211_AMPDU_TX_STOP: | 3437 | case IEEE80211_AMPDU_TX_STOP: |
3438 | IWL_DEBUG_HT("stop Tx\n"); | 3438 | IWL_DEBUG_HT("stop Tx\n"); |
3439 | return iwl_tx_agg_stop(priv, addr, tid); | 3439 | return iwl_tx_agg_stop(priv, sta->addr, tid); |
3440 | default: | 3440 | default: |
3441 | IWL_DEBUG_HT("unknown\n"); | 3441 | IWL_DEBUG_HT("unknown\n"); |
3442 | return -EINVAL; | 3442 | return -EINVAL; |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index bdedf10fc86b..173dd5d2c624 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -390,7 +390,8 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, | |||
390 | 390 | ||
391 | static void mac80211_hwsim_sta_notify(struct ieee80211_hw *hw, | 391 | static void mac80211_hwsim_sta_notify(struct ieee80211_hw *hw, |
392 | struct ieee80211_vif *vif, | 392 | struct ieee80211_vif *vif, |
393 | enum sta_notify_cmd cmd, const u8 *addr) | 393 | enum sta_notify_cmd cmd, |
394 | struct ieee80211_sta *sta) | ||
394 | { | 395 | { |
395 | hwsim_check_magic(vif); | 396 | hwsim_check_magic(vif); |
396 | } | 397 | } |