Skip to content

Commit

Permalink
ath9k: Remove unnecessary tbtt assignment
Browse files Browse the repository at this point in the history
The next_tbtt variable in the scheduler is needed only
for GO/AP mode operation and is always read from the
NEXT_TBTT_TIMER in the HW. There is no need to store
the timestamp for received beacons.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Sep 15, 2014
1 parent 4214852 commit a2b2860
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void ath9k_p2p_ps_timer(void *priv);
void ath9k_chanctx_wake_queues(struct ath_softc *sc);
void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx);

void ath_chanctx_beacon_recv_ev(struct ath_softc *sc, u32 ts,
void ath_chanctx_beacon_recv_ev(struct ath_softc *sc,
enum ath_chanctx_event ev);
void ath_chanctx_beacon_sent_ev(struct ath_softc *sc,
enum ath_chanctx_event ev);
Expand Down Expand Up @@ -483,7 +483,7 @@ static inline void ath9k_offchannel_init(struct ath_softc *sc)
static inline void ath9k_deinit_channel_context(struct ath_softc *sc)
{
}
static inline void ath_chanctx_beacon_recv_ev(struct ath_softc *sc, u32 ts,
static inline void ath_chanctx_beacon_recv_ev(struct ath_softc *sc,
enum ath_chanctx_event ev)
{
}
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/wireless/ath/ath9k/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
break;
}


/*
* Clear the extend_absence flag if it had been
* set during the previous beacon transmission,
Expand All @@ -416,6 +415,7 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
avp->noa_duration = 0;
sc->sched.extend_absence = true;
}

/* Prevent wrap-around issues */
if (avp->noa_duration && tsf_time - avp->noa_start > BIT(30))
avp->noa_duration = 0;
Expand Down Expand Up @@ -606,10 +606,9 @@ void ath_chanctx_beacon_sent_ev(struct ath_softc *sc,
ath_chanctx_event(sc, NULL, ev);
}

void ath_chanctx_beacon_recv_ev(struct ath_softc *sc, u32 ts,
void ath_chanctx_beacon_recv_ev(struct ath_softc *sc,
enum ath_chanctx_event ev)
{
sc->sched.next_tbtt = ts;
ath_chanctx_event(sc, NULL, ev);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,

if (ath9k_is_chanctx_enabled()) {
if (rx_stats->is_mybeacon)
ath_chanctx_beacon_recv_ev(sc, rx_stats->rs_tstamp,
ath_chanctx_beacon_recv_ev(sc,
ATH_CHANCTX_EVENT_BEACON_RECEIVED);
}

Expand Down

0 comments on commit a2b2860

Please sign in to comment.