Skip to content

Commit 37a41b4

Browse files
elplinvjw
authored andcommitted
mac80211: add ieee80211_vif param to tsf functions
TSF can be kept per vif. Add ieee80211_vif param to set/get/reset_tsf, and move the debugfs entries to the per-vif directory. Update all the drivers that implement these callbacks. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 1293218 commit 37a41b4

27 files changed

Lines changed: 137 additions & 112 deletions

File tree

‎drivers/net/wireless/adm8211.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,8 @@ static int adm8211_hw_reset(struct ieee80211_hw *dev)
12491249
return 0;
12501250
}
12511251

1252-
static u64 adm8211_get_tsft(struct ieee80211_hw *dev)
1252+
static u64 adm8211_get_tsft(struct ieee80211_hw *dev,
1253+
struct ieee80211_vif *vif)
12531254
{
12541255
struct adm8211_priv *priv = dev->priv;
12551256
u32 tsftl;

‎drivers/net/wireless/ath/ath5k/mac80211-ops.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ ath5k_conf_tx(struct ieee80211_hw *hw, u16 queue,
602602

603603

604604
static u64
605-
ath5k_get_tsf(struct ieee80211_hw *hw)
605+
ath5k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
606606
{
607607
struct ath5k_hw *ah = hw->priv;
608608

@@ -611,7 +611,7 @@ ath5k_get_tsf(struct ieee80211_hw *hw)
611611

612612

613613
static void
614-
ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf)
614+
ath5k_set_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u64 tsf)
615615
{
616616
struct ath5k_hw *ah = hw->priv;
617617

@@ -620,7 +620,7 @@ ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf)
620620

621621

622622
static void
623-
ath5k_reset_tsf(struct ieee80211_hw *hw)
623+
ath5k_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
624624
{
625625
struct ath5k_hw *ah = hw->priv;
626626

‎drivers/net/wireless/ath/ath9k/htc_drv_main.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,8 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
15631563
mutex_unlock(&priv->mutex);
15641564
}
15651565

1566-
static u64 ath9k_htc_get_tsf(struct ieee80211_hw *hw)
1566+
static u64 ath9k_htc_get_tsf(struct ieee80211_hw *hw,
1567+
struct ieee80211_vif *vif)
15671568
{
15681569
struct ath9k_htc_priv *priv = hw->priv;
15691570
u64 tsf;
@@ -1577,7 +1578,8 @@ static u64 ath9k_htc_get_tsf(struct ieee80211_hw *hw)
15771578
return tsf;
15781579
}
15791580

1580-
static void ath9k_htc_set_tsf(struct ieee80211_hw *hw, u64 tsf)
1581+
static void ath9k_htc_set_tsf(struct ieee80211_hw *hw,
1582+
struct ieee80211_vif *vif, u64 tsf)
15811583
{
15821584
struct ath9k_htc_priv *priv = hw->priv;
15831585

@@ -1588,7 +1590,8 @@ static void ath9k_htc_set_tsf(struct ieee80211_hw *hw, u64 tsf)
15881590
mutex_unlock(&priv->mutex);
15891591
}
15901592

1591-
static void ath9k_htc_reset_tsf(struct ieee80211_hw *hw)
1593+
static void ath9k_htc_reset_tsf(struct ieee80211_hw *hw,
1594+
struct ieee80211_vif *vif)
15921595
{
15931596
struct ath9k_htc_priv *priv = hw->priv;
15941597

‎drivers/net/wireless/ath/ath9k/main.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
21432143
ath9k_ps_restore(sc);
21442144
}
21452145

2146-
static u64 ath9k_get_tsf(struct ieee80211_hw *hw)
2146+
static u64 ath9k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
21472147
{
21482148
struct ath_softc *sc = hw->priv;
21492149
u64 tsf;
@@ -2157,7 +2157,9 @@ static u64 ath9k_get_tsf(struct ieee80211_hw *hw)
21572157
return tsf;
21582158
}
21592159

2160-
static void ath9k_set_tsf(struct ieee80211_hw *hw, u64 tsf)
2160+
static void ath9k_set_tsf(struct ieee80211_hw *hw,
2161+
struct ieee80211_vif *vif,
2162+
u64 tsf)
21612163
{
21622164
struct ath_softc *sc = hw->priv;
21632165

@@ -2168,7 +2170,7 @@ static void ath9k_set_tsf(struct ieee80211_hw *hw, u64 tsf)
21682170
mutex_unlock(&sc->mutex);
21692171
}
21702172

2171-
static void ath9k_reset_tsf(struct ieee80211_hw *hw)
2173+
static void ath9k_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
21722174
{
21732175
struct ath_softc *sc = hw->priv;
21742176

‎drivers/net/wireless/ath/carl9170/main.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,8 @@ static void carl9170_op_bss_info_changed(struct ieee80211_hw *hw,
10781078
mutex_unlock(&ar->mutex);
10791079
}
10801080

1081-
static u64 carl9170_op_get_tsf(struct ieee80211_hw *hw)
1081+
static u64 carl9170_op_get_tsf(struct ieee80211_hw *hw,
1082+
struct ieee80211_vif *vif)
10821083
{
10831084
struct ar9170 *ar = hw->priv;
10841085
struct carl9170_tsf_rsp tsf;

‎drivers/net/wireless/b43/main.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3599,7 +3599,7 @@ static int b43_op_get_stats(struct ieee80211_hw *hw,
35993599
return 0;
36003600
}
36013601

3602-
static u64 b43_op_get_tsf(struct ieee80211_hw *hw)
3602+
static u64 b43_op_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
36033603
{
36043604
struct b43_wl *wl = hw_to_b43_wl(hw);
36053605
struct b43_wldev *dev;
@@ -3618,7 +3618,8 @@ static u64 b43_op_get_tsf(struct ieee80211_hw *hw)
36183618
return tsf;
36193619
}
36203620

3621-
static void b43_op_set_tsf(struct ieee80211_hw *hw, u64 tsf)
3621+
static void b43_op_set_tsf(struct ieee80211_hw *hw,
3622+
struct ieee80211_vif *vif, u64 tsf)
36223623
{
36233624
struct b43_wl *wl = hw_to_b43_wl(hw);
36243625
struct b43_wldev *dev;

‎drivers/net/wireless/iwlegacy/iwl-core.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2220,7 +2220,8 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed)
22202220
}
22212221
EXPORT_SYMBOL(iwl_legacy_mac_config);
22222222

2223-
void iwl_legacy_mac_reset_tsf(struct ieee80211_hw *hw)
2223+
void iwl_legacy_mac_reset_tsf(struct ieee80211_hw *hw,
2224+
struct ieee80211_vif *vif)
22242225
{
22252226
struct iwl_priv *priv = hw->priv;
22262227
unsigned long flags;

‎drivers/net/wireless/iwlegacy/iwl-core.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ static inline const struct ieee80211_supported_band *iwl_get_hw_mode(
620620

621621
/* mac80211 handlers */
622622
int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed);
623-
void iwl_legacy_mac_reset_tsf(struct ieee80211_hw *hw);
623+
void iwl_legacy_mac_reset_tsf(struct ieee80211_hw *hw,
624+
struct ieee80211_vif *vif);
624625
void iwl_legacy_mac_bss_info_changed(struct ieee80211_hw *hw,
625626
struct ieee80211_vif *vif,
626627
struct ieee80211_bss_conf *bss_conf,

‎drivers/net/wireless/rt2x00/rt2400pci.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry,
12391239
* call, we must decrease the higher 32bits with 1 to get
12401240
* to correct value.
12411241
*/
1242-
tsf = rt2x00dev->ops->hw->get_tsf(rt2x00dev->hw);
1242+
tsf = rt2x00dev->ops->hw->get_tsf(rt2x00dev->hw, NULL);
12431243
rx_low = rt2x00_get_field32(word4, RXD_W4_RX_END_TIME);
12441244
rx_high = upper_32_bits(tsf);
12451245

@@ -1673,7 +1673,8 @@ static int rt2400pci_conf_tx(struct ieee80211_hw *hw, u16 queue,
16731673
return 0;
16741674
}
16751675

1676-
static u64 rt2400pci_get_tsf(struct ieee80211_hw *hw)
1676+
static u64 rt2400pci_get_tsf(struct ieee80211_hw *hw,
1677+
struct ieee80211_vif *vif)
16771678
{
16781679
struct rt2x00_dev *rt2x00dev = hw->priv;
16791680
u64 tsf;

‎drivers/net/wireless/rt2x00/rt2500pci.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,8 @@ static int rt2500pci_probe_hw(struct rt2x00_dev *rt2x00dev)
19661966
/*
19671967
* IEEE80211 stack callback functions.
19681968
*/
1969-
static u64 rt2500pci_get_tsf(struct ieee80211_hw *hw)
1969+
static u64 rt2500pci_get_tsf(struct ieee80211_hw *hw,
1970+
struct ieee80211_vif *vif)
19701971
{
19711972
struct rt2x00_dev *rt2x00dev = hw->priv;
19721973
u64 tsf;

0 commit comments

Comments
 (0)