summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hash.c
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: fixed hash functions type to uint32_t instead of intAntonio Quartulli2011-11-201-2/+2
| | | | | | | | | | | | | | | There are two reasons for this fix: - the result of choose_orig() and vis_choose() is an index and therefore it can't be negative. Hence it is correct to make the return type unsigned too. - sizeof(int) may not be the same on ALL the architectures. Since we plan to use choose_orig() as DHT hash function, we need to guarantee that, given the same argument, the result is the same. Then it is correct to explicitly express the size of the return type (and the second argument). Since the expected length is currently 4, uint32_t is the most convenient choice. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: Calculate sizeof using variable insead of typesSven Eckelmann2011-05-301-3/+4
| | | | | | | | | | | | | Documentation/CodingStyle recommends to use the form p = kmalloc(sizeof(*p), ...); to calculate the size of a struct and not the version where the struct name is spelled out to prevent bugs when the type of p changes. This also seems appropriate for manipulation of buffers when they are directly associated with p. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: remove extra layer between hash and hash element - hash bucketMarek Lindner2011-03-051-8/+0
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect each hash row with rcu locksMarek Lindner2011-03-051-9/+25
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Update copyright yearsSven Eckelmann2011-01-311-1/+1
| | | | Signed-off-by: Sven Eckelmann <sven@narfation.org>
* net: Add batman-adv meshing protocolSven Eckelmann2010-12-161-0/+62
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing protocol for multi-hop ad-hoc mesh networks. The networks may be wired or wireless. See http://www.open-mesh.org/ for more information and user space tools. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: David S. Miller <davem@davemloft.net>