summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_plink.c
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: add PLINK_ prefix and kernel doc to enum plink_stateLuis Carlos Cobo2008-03-061-34/+35
| | | | | | Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: clean up use of endianness conversion functionsLuis Carlos Cobo2008-03-061-1/+1
| | | | | | Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix mesh endianness sparse warnings and unmark it as brokenLuis Carlos Cobo2008-03-061-2/+3
| | | | | | | | | | This patch fixes all the mesh related endianness warnings reported by sparse. As they were the reason why Johannes marked mesh as BROKEN, that flag has been removed. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix sta_info mesh timer bugJohannes Berg2008-03-061-26/+5
| | | | | | | | | | | | | | I noticed a bug I introduced when mesh is enabled: sta_info_destroy() will end up calling cancel_timer() on a timer that has never been initialized because the timer is only initialized in mesh_plink_alloc(), not in sta_info_alloc(). This patch moves the initialization of all mesh related fields into sta_info_alloc(), adds a bit of sanity checking to the cfg80211 handlers and sta_info_insert() and makes mesh_plink_alloc() a static helper function that is only used from the mesh plink code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: split sta_info_addJohannes Berg2008-03-061-18/+25
| | | | | | | | | | | | | | | | | | sta_info_add() has two functions: allocating a station info structure and inserting it into the hash table/list. Splitting these two functions allows allocating with GFP_KERNEL in many places instead of GFP_ATOMIC which is now required by the RCU protection. Additionally, in many places RCU protection is now no longer needed at all because between sta_info_alloc() and sta_info_insert() the caller owns the structure. This fixes a few race conditions with setting initial flags and similar, but not all (see comments in ieee80211_sta.c and cfg.c). More documentation on the existing races will be in a follow-up patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: RCU-ify STA info structure accessJohannes Berg2008-03-061-49/+52
| | | | | | | | | | | | | | | This makes access to the STA hash table/list use RCU to protect against freeing of items. However, it's not a true RCU, the copy step is missing: whenever somebody changes a STA item it is simply updated. This is an existing race condition that is now somewhat understandable. This patch also fixes the race key freeing vs. STA destruction by making sure that sta_info_destroy() is always called under RTNL and frees the key. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix kernel-doc comment for mesh_plink_deactivateJohannes Berg2008-03-061-1/+1
| | | | | | | | Accidentally copied in a __mesh_plink_deactivate, noticed by Luis Carlos Cobo. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add missing "break" statement in mesh codeJohannes Berg2008-03-061-0/+1
| | | | | | | | | | | This inserts a missing break statement which, if hit, would cause the code to fall-through and unlock a spinlock twice. Noticed via sparse's "lock count wrong in basic block" warning and careful code inspection. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: clean up mesh codeJohannes Berg2008-03-061-7/+21
| | | | | | | Various cleanups, reducing the #ifdef mess and other things. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: mesh peer link implementationLuis Carlos Cobo2008-03-061-0/+755
This file implements mesh discovery and peer link establishment support using the mesh peer link table provided in mesh_plinktbl.c. Secure peer links have not been implemented yet. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud