On Wed, 2010-09-22 at 21:58 -0700, Ben Greear wrote: > + * @addr2: local address (vif->sdata->dev->dev_addr). Can be NULL for 'any'. > * > * This function must be called under RCU lock and the > * resulting pointer is only valid under RCU lock as well. > @@ -2434,7 +2435,8 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif, > * DO NOT USE THIS FUNCTION. > */ > struct ieee80211_sta *ieee80211_find_sta_by_hw(struct ieee80211_hw *hw, > - const u8 *addr); > + const u8 *addr, > + const u8 *localaddr); That's not going to generate proper documentation. Also, it now probably shouldn't be called "by_hw" any more. > - /* Just return a random station ... first in list ... */ > + /* Just return a random station if localaddr is NULL > + * ... first in list. > + */ Please use the comment style like this: /* * Just return a random station ... */ I know davem personally doesn't like it, but it's the regular style in this code. > for_each_sta_info(hw_to_local(hw), addr, sta, nxt) { > + if (localaddr && > + memcmp(sta->sdata->dev->dev_addr, localaddr, ETH_ALEN) != 0) > + continue; This should use compare_ether_addr() (if it's not aligned on a two-byte boundary something is seriously wrong), and also sta->sdata->vif.addr instead of dev->dev_addr. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html