From: Johannes Berg Date: Thu, 09 Aug 2012 08:14:57 +0200 Subject: [ath9k-devel] [PATCH 1/2] mac80211: add sta_update_rates callback In-Reply-To: <1344474712-22561-1-git-send-email-ordex@autistici.org> References: <1344474712-22561-1-git-send-email-ordex@autistici.org> Message-ID: <1344492897.4494.1.camel@jlt3.sipsolutions.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Thu, 2012-08-09 at 03:11 +0200, Antonio Quartulli wrote: > some drivers need to be notified in case of rates update. This callback tells > the driver that something has been changed in the supported rates set of the > station passed as argument and that it needs to update its internal tables > > Reported-by: Guido Iribarren > Tested-by: Guido Iribarren > Signed-off-by: Antonio Quartulli > --- > > ** This is the first time that I play with trace.h, so it could be the case that > I made something completely wrong! Sorry :) > > > > > include/net/mac80211.h | 4 ++++ > net/mac80211/driver-ops.h | 14 ++++++++++++++ > net/mac80211/ibss.c | 4 +++- > net/mac80211/trace.h | 27 +++++++++++++++++++++++++++ > 4 files changed, 48 insertions(+), 1 deletion(-) > > diff --git a/include/net/mac80211.h b/include/net/mac80211.h > index bb86aa6..c5dc725 100644 > --- a/include/net/mac80211.h > +++ b/include/net/mac80211.h > @@ -2284,6 +2284,10 @@ struct ieee80211_ops { > struct ieee80211_vif *vif, > struct ieee80211_bss_conf *info, > u32 changed); > + void (*sta_update_rates)(struct ieee80211_hw *hw, > + struct ieee80211_sta *sta, > + struct ieee80211_vif *vif, > + struct ieee80211_bss_conf *info); Passing bss_conf doesn't make a lot of sense, it hasn't changed when the rate changes...? Also there's already an update call sta_rc_update() so I think you should just define a new change flag for that? johannes