We have only a few fixes right now:

* a fix for an issue with hash collision handling in the
    rhashtable conversion
  * a merge issue - rhashtable removed default shrinking
    just before mac80211 was converted, so enable it now
  * remove an invalid WARN that can trigger with legitimate
    userspace behaviour
  * add a struct member missing from kernel-doc that caused
    a lot of warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJVR1FIAAoJEDBSmw7B7bqrbkQP/RPleNMLHNOLRoJva6vNVers
 hiyLwG+lpV9yHCUX1I7TsvyTHddjW3ANNC1LvlKyUiNzBBsr/Yg/Qe1RVGkRTK7E
 ZPTU7xutk2nSLjvbVLjTQtIAynKZM6W9vM3X16WtsZ9+25z4e8jN8BjhzP99Vs7X
 IkwL7Qe2q1O/ta+/ByVR4dFWtGyJDxRjXkFs4cQ/VdL/fJalKxIa9YJrmUwIBMOU
 UIuJ1lh7kkNFGky+4Y3dBA/2L+O/iS64dxe+ygLMJGf9xdGGHwyuM6oe6OKEKPi1
 pF0NIWgHRGOUEJNyUKZTOwCyk1PeOr9aFFDHN4GJyE463KzZqVYdA4ajI6udwL2h
 I/AjsBnM0zQcoBD8HUeJK2ZgndPxOrMZGVjs0/M3K9lFocYBALoLkt5YPD1PXOZs
 9EQ8mhej3/xbwyEaaAp+HJPOr/wLZ//juxsPP8HSR1BDm8cR40rd9rETEGWnmrxt
 5vpmb2vNpKekw+pKf2vwuEH6BwH02nuz4YPudTswiEzObEQAuGx+rpopQVI9bdgE
 V/r3WY0cl+bDMrcSpoZ7v6FDoHHA/zPq9aAAV0JsMyYApY0nMdqwShBJq5cTSoK9
 rK5I6oIbqChskpoWULUVbbjb1fLsNVI4C89KjxW8xziTEY1d2fEeeJ2tR0lYBX/5
 /KOygSze3Qi0MjrdE9D2
 =sf/A
 -----END PGP SIGNATURE-----

Merge tag 'mac80211-for-davem-2015-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
We have only a few fixes right now:
 * a fix for an issue with hash collision handling in the
   rhashtable conversion
 * a merge issue - rhashtable removed default shrinking
   just before mac80211 was converted, so enable it now
 * remove an invalid WARN that can trigger with legitimate
   userspace behaviour
 * add a struct member missing from kernel-doc that caused
   a lot of warnings
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2015-05-04 16:00:55 -04:00
commit b7ba7b469a
3 changed files with 27 additions and 6 deletions

View file

@ -1666,6 +1666,8 @@ struct ieee80211_tx_control {
* @sta: station table entry, %NULL for per-vif queue * @sta: station table entry, %NULL for per-vif queue
* @tid: the TID for this queue (unused for per-vif queue) * @tid: the TID for this queue (unused for per-vif queue)
* @ac: the AC for this queue * @ac: the AC for this queue
* @drv_priv: data area for driver use, will always be aligned to
* sizeof(void *).
* *
* The driver can obtain packets from this queue by calling * The driver can obtain packets from this queue by calling
* ieee80211_tx_dequeue(). * ieee80211_tx_dequeue().

View file

@ -819,13 +819,15 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
* (because if we remove a STA after ops->remove_interface() * (because if we remove a STA after ops->remove_interface()
* the driver will have removed the vif info already!) * the driver will have removed the vif info already!)
* *
* This is relevant only in WDS mode, in all other modes we've * In WDS mode a station must exist here and be flushed, for
* already removed all stations when disconnecting or similar, * AP_VLANs stations may exist since there's nothing else that
* so warn otherwise. * would have removed them, but in other modes there shouldn't
* be any stations.
*/ */
flushed = sta_info_flush(sdata); flushed = sta_info_flush(sdata);
WARN_ON_ONCE((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) || WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
(sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1)); ((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) ||
(sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1)));
/* don't count this interface for promisc/allmulti while it is down */ /* don't count this interface for promisc/allmulti while it is down */
if (sdata->flags & IEEE80211_SDATA_ALLMULTI) if (sdata->flags & IEEE80211_SDATA_ALLMULTI)

View file

@ -66,6 +66,7 @@
static const struct rhashtable_params sta_rht_params = { static const struct rhashtable_params sta_rht_params = {
.nelem_hint = 3, /* start small */ .nelem_hint = 3, /* start small */
.automatic_shrinking = true,
.head_offset = offsetof(struct sta_info, hash_node), .head_offset = offsetof(struct sta_info, hash_node),
.key_offset = offsetof(struct sta_info, sta.addr), .key_offset = offsetof(struct sta_info, sta.addr),
.key_len = ETH_ALEN, .key_len = ETH_ALEN,
@ -157,8 +158,24 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
const u8 *addr) const u8 *addr)
{ {
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
struct rhash_head *tmp;
const struct bucket_table *tbl;
return rhashtable_lookup_fast(&local->sta_hash, addr, sta_rht_params); rcu_read_lock();
tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash);
for_each_sta_info(local, tbl, addr, sta, tmp) {
if (sta->sdata == sdata) {
rcu_read_unlock();
/* this is safe as the caller must already hold
* another rcu read section or the mutex
*/
return sta;
}
}
rcu_read_unlock();
return NULL;
} }
/* /*