ksm: check and skip page, if it is already scanned

From: Pradeep Sawlani <sawlani@amazon.com>

On system like Android where most of the process are forked
from parent w/o execve, KSM can scan same page multiple times
in one scan cycle. There is no advantage in scanning same page
multiple times for merging. During testing with Android, it was
observed around 60% pages are skipped for each scan cycle.

Change-Id: I0cf01802f0b4d61fcab92558beb9e1c660dc9a77
Link: http://lkml.kernel.org/r/CAMrOTPgBtANS_ryRjan0-dTL97U7eRvtf3dCsss=Kn+Uk89fuA@mail.gmail.com
Signed-off-by: Pradeep Sawlani <sawlani@amazon.com>

Signed-off-by: Paul Reioux <reioux@gmail.com>
bcmdhd: workaround broken AC video queue in IBSS mode

Re-apply this patch as it got lost with commit
6f16c5ddacd66f9122c6b74ce2979229ebb6be64 "tuna: Revert WiFi sleep power mode".
It still is necessary as can easily be tested with 'ping -Q 0xa IP'.

The BCM4330 has problems with the WME video (AC_VI) queue in IBSS mode. If we
put packets into this AC, the symptoms are excessive RTS/CTS, most packets get
lost and the device get's stuck and no more packets can be sent, even on other
queues.

Since the AC queue selection happens in the firmware based on the DSCP priority
and we don't know a way to configure this in the driver the workaround is to
simply downgrade all packets which would go into AC_VI (priority 4 and 5, TOS
0x80 and 0xa0) to AC_BE (priority 3 "Excellent Effort"). It's not pretty but
makes the device usable.

Change-Id: I833fb2f07dc5c46b823b70e93b9b05cc20a7b997
Signed-off-by: Bruno Randolf <br1@einfach.org>