package/mac80211/patches/550-ath9k_tsf_fix.patch |
| 1 | ath9k_rx_skb_preprocess nulls rxs and the mactime is never set again - |
| 2 | mactime is always 0. This causes problems in IBSS mode. |
| 3 | |
| 4 | ieee80211_rx_bss_info uses mactime to decide if an IBSS merge is needed. |
| 5 | Without this patch the merge is triggered by each beacon received. |
| 6 | |
| 7 | This can be recognized by the "beacon TSF higher than local TSF - IBSS |
| 8 | merge with BSSID" log message accompanying each beacon. |
| 9 | |
| 10 | This problem was not completely fixed in commit |
| 11 | a6d2055b02dde1067075795274672720baadd3ca and is not a stable kernel fix. |
| 12 | It is solely intended for wireless-testing. |
| 13 | |
| 14 | Signed-off-by: Jan Friedrich <jft@dev2day.de> |
| 15 | --- |
| 16 | drivers/net/wireless/ath/ath9k/recv.c | 10 +++++----- |
| 17 | 1 files changed, 5 insertions(+), 5 deletions(-) |
| 18 | |
| 19 | --- a/drivers/net/wireless/ath/ath9k/recv.c |
| 20 | @@ -1140,6 +1140,11 @@ int ath_rx_tasklet(struct ath_softc *sc, |
| 21 | if (flush) |
| 22 | goto requeue; |
| 23 | |
| 24 | + retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, |
| 25 | + rxs, &decrypt_error); |
| 26 | + if (retval) |
| 27 | + goto requeue; |
| 28 | + |
| 29 | rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp; |
| 30 | if (rs.rs_tstamp > tsf_lower && |
| 31 | unlikely(rs.rs_tstamp - tsf_lower > 0x10000000)) |
| 32 | @@ -1149,11 +1154,6 @@ int ath_rx_tasklet(struct ath_softc *sc, |
| 33 | unlikely(tsf_lower - rs.rs_tstamp > 0x10000000)) |
| 34 | rxs->mactime += 0x100000000ULL; |
| 35 | |
| 36 | - retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, |
| 37 | - rxs, &decrypt_error); |
| 38 | - if (retval) |
| 39 | - goto requeue; |
| 40 | - |
| 41 | /* Ensure we always have an skb to requeue once we are done |
| 42 | * processing the current buffer's skb */ |
| 43 | requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC); |