rtlwifi: rtl8192cu: Fix too long disable of IRQs

BugLink: http://bugs.launchpad.net/bugs/1320946

commit a53268be0cb9763f11da4f6fe3fb924cbe3a7d4a upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192cu.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
rtlwifi: rtl8192se: Fix too long disable of IRQs

BugLink: http://bugs.launchpad.net/bugs/1320946

commit 2610decdd0b3808ba20471a999835cfee5275f98 upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8192se.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
rtlwifi: rtl8188ee: Fix too long disable of IRQs

BugLink: http://bugs.launchpad.net/bugs/1320946

commit 6b6392715856d563719991e9ce95e773491a8983 upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8188ee.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
rtlwifi: rtl8723ae: Fix too long disable of IRQs

BugLink: http://bugs.launchpad.net/bugs/1320946

commit bfc1010c418a22cbebd8b1bd1e75dad6a527a609 upstream.

In commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 entitled "rtlwifi:
rtl8192ce: Fix too long disable of IRQs", Olivier Langlois
<olivier@trillion01.com> fixed a problem caused by an extra long disabling
of interrupts. This patch makes the same fix for rtl8723ae.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
rtlwifi: make MSI support a module parameter

BugLink: http://bugs.launchpad.net/bugs/1296591

This makes MSI support a module parameter, for debugging and workaround
convenience.

Signed-off-by: Adam Lee <adam.lee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 73070c45d50060f686df1f34c649cbc089991a28)
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
rtlwifi: rtl8188ee: add msi module parameter

BugLink: http://bugs.launchpad.net/bugs/1296591

The msi module parameter offers an option to enable or disable MSI
interrupts mode. For now, some users report RTL8188EE works only with
MSI on their certain platforms, some others report it works only without
MSI, this parameter will help.

Signed-off-by: Adam Lee <adam.lee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 3513d0043c2a34b73b97ad14f01622bb2aa44e74)
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
rtlwifi: rtl8723be: add msi module parameter

BugLink: http://bugs.launchpad.net/bugs/1296591

The msi module parameter offers an option to enable or disable MSI
interrupts mode, for debugging and workaround(in case) convenience.

Signed-off-by: Adam Lee <adam.lee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 3924e338d587edbdc5a4dd0b358866b249fa21e1)
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
rtlwifi: rtl8188ee: initialize packet_beacon

BugLink: http://bugs.launchpad.net/bugs/1333837

commit 328e203fc35f0b4f6df1c4943f74cf553bcc04f8 upstream.

static code analysis from cppcheck reports:

[drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:322]:
  (error) Uninitialized variable: packet_beacon

packet_beacon is not initialized and hence packet_beacon
contains garbage from the stack, so set it to false.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb

BugLink: http://bugs.launchpad.net/bugs/1333837

commit 5f9186990ec4579ee5b7a99b3254c29eda479f36 upstream.

Beginning with kernel 3.13, this driver fails on some systems. The problem
was bisected to:

Commit 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac
Author: Felix Fietkau <nbd@openwrt.org>
Title: mac80211: send control port protocol frames to the VO queue

There is noting wrong with the above commit. The regression occurs because
V0 queue on RTL8192SE cards uses priority 6, not the usual 7. The fix is to
modify the rtl8192se routine that sets the correct transmit queue.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=74541

Reported-by: Alex Miller <almiller_1@yahoo.co.uk>
Tested-by: Alex Miller <almiller_1@yahoo.co.uk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init()

BugLink: http://bugs.launchpad.net/bugs/1333837

commit 3234f5b06fc3094176a86772cc64baf3decc98fc upstream.

Fixes: a53268be0cb9 ('rtlwifi: rtl8192cu: Fix too long disable of IRQs')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
UBUNTU: rtlwifi: Pull the latest code from Torvalds' master branch

Updating the code of rtlwifi to the latest commits in kernel.ubuntu.com
for the trusty release is not enough to fix the problem with bluetooth,
as the necessary fixes are not there yet. So, we either bring the latest
code from github.com/lwfinger/rtlwifi_new and integrate it ourselves,
or we just pull the code from the upstream Linux kernel, which seems to
be a better option since most of the changes needed are already there.

Thus, this patch pulls all the code from Torvalds' master branch into
drivers/net/wireless/rtlwifi, in order to have the latest drivers, which
fixes the problems scanning BlueTooth devices while the WiFi is working.

[endlessm/eos-shell#3358]
UBUNTU: rtlwifi: Make this module work with our 3.13.x Linux Kernel

The previous commit pulls the code from Torvalds' kernel master branch,
containing some bits that won't build with older 3.13.x Linux kernels.

This patch containes the minimum necessary changes to make the rtlwifi
drivers build again and work as expected.

[endlessm/eos-shell#3358]
UBUNTU: debian: Update kernel configuration and ABI files

[endlessm/eos-shell#3358]
UBUNTU: release 3.13.0-27.50endless8
UBUNTU: Start new release

Ignore: yes
Merge pull request #13 from endlessm/shell/3358

Shell/3358