Hi,

<snip>

> > I am not sure if we should print error warning messages when the mactime is
> > not provided. But other then that I agree with the above change, as it would
> > allow rt2x00 to use the IBSS syncing. :)
> 
> Ah yes, ignore my printks and instead replace them with better comments :)
> 
> I still think we should inform the user if the user switches to IBSS
> at some point, perhaps better during interface addition if their
> driver's IBSS mode is going to have some issues. How about we add to
> the enum ieee80211_hw_flags a "IEEE80211_HW_RX_MACTIME". Then we can
> warn accordingly during ieee80211_if_add() if the interface type is
> IBSS"
> 
> * If driver supports IEEE80211_HW_RX_MACTIME we don't warn anything
> * If IEEE80211_HW_RX_MACTIME is not supported and get_tsf() is
> implemented inform user IBSS merge may not behave accurately
> * If IEEE80211_HW_RX_MACTIME is not supported and get_tsf() is not
> implemented warn IBSS merge will not work
> 
> We could add:
> 
> static inline u64 __approx_mactime(struct ieee80211_local *local) {
>    BUG_ON(!local || !local->ops);
>    return (local->ops->get_tsf) ?
> local->ops->get_tsf(local_to_hw(local)) : -1LLU;
> }
> 
> Then in ieee80211_rx_bss_info() we can do something like:
> 
> +               if (local->hw.flags & IEEE80211_HW_RX_MACTIME) {
> +                   if (rx_status->flag & RX_FLAG_TSFT)
> +                       mactime = rx_status->mactime;
> +                   else {
> +                     WARN_ON(1);
> +                     mactime = __approx_mactime(local);
> +                  }
> +              else {
> +                     mactime = __approx_mactime(local);
> +         }

Sounds good to me. :)

Ivo
_______________________________________________
ath5k-devel mailing list
[email protected]
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to