compat: fix compilation on 2.6.24 based on next-20130312
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Thu, 14 Mar 2013 18:58:10 +0000 (11:58 -0700)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Thu, 14 Mar 2013 18:58:10 +0000 (11:58 -0700)
commit2d7033d00850c7db34930cff9986c4e4486d2b08
tree3b92ed85ec7dfac558d60edcd78b32415f19e066
parent3b2942c570950e2549bd810b59128553eefb5fb2
compat: fix compilation on 2.6.24 based on next-20130312

drivers/net/wireless/iwlwifi/mvm/mac80211.c ends up
including include/net/inet_hashtables.h which in 2.6.24
has a routine called __inet_lookup_established() that
uses the sk_for_each(1, 2, 3). The patch below by Hauke
backported the change that went into the kernel that
made sk_for_each(1, 3) use two arguments. It turns out
that upstream we realized that the second argument was
useless. The header however uses it though so the trick
didn't work for 2.6.24 if code used it there.

We fix it using a nasty hack by ensuring that when the
header file is included we redefine that routine to
something else, then we udef it, and then define our
new version that only uses the 2 argument form of
sk_for_each(). This is a nasty way to solve it but
not sure if there is anything cleaner.

commit dbc390647a841061954f67ea226221fc7f4b3836
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date:   Sun Feb 10 20:10:10 2013 +0100

    compat: backport drop of node parameter from iterators

    This patch backports the following commit in mainline linux kernel:

      commit 0bbacca7c3911451cea923b0ad6389d58e3d9ce9
      Author: Sasha Levin <sasha.levin@oracle.com>
      Date:   Thu Feb 7 12:32:18 2013 +1100

          hlist: drop the node parameter from iterators

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
include/linux/compat-2.6.25.h