734ba22af13475de5e372de22dbd9f3c5ea0a12e
[librecmc/librecmc.git] / package / kernel / mac80211 / patches / 345-ath9k-Turn-ath_txq_lock-unlock-into-static-inlines.patch
1 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
2 Date: Mon, 5 Dec 2016 13:27:38 +0200
3 Subject: [PATCH] ath9k: Turn ath_txq_lock/unlock() into static inlines.
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 These are one-line functions that just call spin_lock/unlock_bh(); turn
9 them into static inlines to avoid the function call overhead.
10
11 Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
12 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 ---
14
15 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
16 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
17 @@ -569,6 +569,15 @@ static inline void ath_chanctx_check_act
18  
19  #endif /* CPTCFG_ATH9K_CHANNEL_CONTEXT */
20  
21 +static inline void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq)
22 +{
23 +       spin_lock_bh(&txq->axq_lock);
24 +}
25 +static inline void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq)
26 +{
27 +       spin_unlock_bh(&txq->axq_lock);
28 +}
29 +
30  void ath_startrecv(struct ath_softc *sc);
31  bool ath_stoprecv(struct ath_softc *sc);
32  u32 ath_calcrxfilter(struct ath_softc *sc);
33 @@ -576,8 +585,6 @@ int ath_rx_init(struct ath_softc *sc, in
34  void ath_rx_cleanup(struct ath_softc *sc);
35  int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp);
36  struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype);
37 -void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq);
38 -void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq);
39  void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq);
40  void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq);
41  bool ath_drain_all_txq(struct ath_softc *sc);
42 --- a/drivers/net/wireless/ath/ath9k/xmit.c
43 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
44 @@ -98,18 +98,6 @@ static void ath_tx_status(struct ieee802
45         dev_kfree_skb(skb);
46  }
47  
48 -void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq)
49 -       __acquires(&txq->axq_lock)
50 -{
51 -       spin_lock_bh(&txq->axq_lock);
52 -}
53 -
54 -void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq)
55 -       __releases(&txq->axq_lock)
56 -{
57 -       spin_unlock_bh(&txq->axq_lock);
58 -}
59 -
60  void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq)
61         __releases(&txq->axq_lock)
62  {