Add manual mode to intelli_plug
Do not ratelimit audit messages. We want to see them all.

Change-Id: I19c29788cc33b0f59e0bdfe04fe67c247239c559
mako: wifi: Channel blocking when mobile network is no service state.

In case of no service state which means that Wi-Fi framework does not know
country code,  just 1 ~ 11 channels will be active and 12 ~ 14 channels and
5GHz channels will be blocked.

To do this, the followings are changed
1) Change regulatory domain map (nv.bin)
   a) Set N_AMER_EXC_FCC not to use 12 ~ 14 channels and 5GHz channels
   b) Set default regulatory domain to N_AMER_EXC_FCC
2) Change regulatory domain of Vietnam, Israel, and Turkey to others (vos_nvitem.c)
   Vietnam : N_AMER_EXC_FCC -> World
   Turkey  : N_AMER_EXC_FCC -> ETSI

LGE tested all the country codes of which the Mako was released and there was
no regulatory domain problem.

Signed-off-by: Vineeta Srivastava <vsrivastava@google.com>

Change-Id: I588821c2f867e624c7e44c0fefb4b1b5a053501f
Enable setting security contexts on rootfs inodes.

rootfs (ramfs) can support setting of security contexts
by userspace due to the vfs fallback behavior of calling
the security module to set the in-core inode state
for security.* attributes when the filesystem does not
provide an xattr handler.  No xattr handler required
as the inodes are pinned in memory and have no backing
store.

This is useful in allowing early userspace to label individual
files within a rootfs while still providing a policy-defined
default via genfs.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Change-Id: I3436cf9ae27ade445e37376d7b9125746b1e506f
avc: Fix oops when handed a bad binder transfer from userspace

Change-Id: Ic10bdcdb09e53994fa6d3077f333bf6e8d33d2ce
update defconfig
posix_types.h: Cleanup stale __NFDBITS and related definitions

Recently, glibc made a change to suppress sign-conversion warnings in
FD_SET (glibc commit ceb9e56b3d1).  This uncovered an issue with the
kernel's definition of __NFDBITS if applications #include
<linux/types.h> after including <sys/select.h>.  A build failure would
be seen when passing the -Werror=sign-compare and -D_FORTIFY_SOURCE=2
flags to gcc.

It was suggested that the kernel should either match the glibc
definition of __NFDBITS or remove that entirely.  The current in-kernel
uses of __NFDBITS can be replaced with BITS_PER_LONG, and there are no
uses of the related __FDELT and __FDMASK defines.  Given that, we'll
continue the cleanup that was started with commit 8b3d1cda4f5f
("posix_types: Remove fd_set macros") and drop the remaining unused
macros.

Additionally, linux/time.h has similar macros defined that expand to
nothing so we'll remove those at the same time.

Reported-by: Jeff Law <law@redhat.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
CC: <stable@vger.kernel.org>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
[ .. and fix up whitespace as per akpm ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
prima: release v3.2.2.17

Conflicts:

	drivers/staging/prima/CORE/BAP/src/bapApiHCBB.c
	drivers/staging/prima/CORE/BAP/src/bapApiInfo.c
	drivers/staging/prima/CORE/BAP/src/bapApiLinkCntl.c
	drivers/staging/prima/CORE/BAP/src/bapApiLinkSupervision.c
	drivers/staging/prima/CORE/BAP/src/bapApiStatus.c
	drivers/staging/prima/CORE/BAP/src/bapModule.c
	drivers/staging/prima/CORE/BAP/src/btampFsm.c
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_assoc.h
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_tdls.h
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_tx_rx.h
	drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wowl.h
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_dev_pwr.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_tdls.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_tx_rx.c
	drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
	drivers/staging/prima/CORE/MAC/inc/aniGlobal.h
	drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
	drivers/staging/prima/CORE/MAC/inc/sirApi.h
	drivers/staging/prima/CORE/MAC/inc/sirMacProtDef.h
	drivers/staging/prima/CORE/MAC/inc/wniApi.h
	drivers/staging/prima/CORE/MAC/src/include/sirParams.h
	drivers/staging/prima/CORE/MAC/src/pe/include/limFTDefs.h
	drivers/staging/prima/CORE/MAC/src/pe/include/limGlobal.h
	drivers/staging/prima/CORE/MAC/src/pe/lim/limApi.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limAssocUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limFT.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessActionFrame.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessDisassocFrame.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessTdls.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limPropExtsUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSendManagementFrames.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSendMessages.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSerDesUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSession.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limSmeReqUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limStaHashApi.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limTrace.c
	drivers/staging/prima/CORE/MAC/src/pe/lim/limTypes.h
	drivers/staging/prima/CORE/MAC/src/pe/lim/limUtils.c
	drivers/staging/prima/CORE/MAC/src/pe/pmm/pmmApi.c
	drivers/staging/prima/CORE/MAC/src/pe/sch/schBeaconProcess.c
	drivers/staging/prima/CORE/SAP/src/sapApiLinkCntl.c
	drivers/staging/prima/CORE/SAP/src/sapChSelect.c
	drivers/staging/prima/CORE/SAP/src/sapInternal.h
	drivers/staging/prima/CORE/SAP/src/sapModule.c
	drivers/staging/prima/CORE/SME/inc/csrApi.h
	drivers/staging/prima/CORE/SME/inc/csrInternal.h
	drivers/staging/prima/CORE/SME/inc/csrNeighborRoam.h
	drivers/staging/prima/CORE/SME/inc/csrSupport.h
	drivers/staging/prima/CORE/SME/inc/smeInside.h
	drivers/staging/prima/CORE/SME/inc/sme_Api.h
	drivers/staging/prima/CORE/SME/src/QoS/sme_Qos.c
	drivers/staging/prima/CORE/SME/src/ccm/ccmApi.c
	drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
	drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
	drivers/staging/prima/CORE/SME/src/csr/csrInsideApi.h
	drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c
	drivers/staging/prima/CORE/SME/src/csr/csrTdlsProcess.c
	drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
	drivers/staging/prima/CORE/SME/src/oemData/oemDataApi.c
	drivers/staging/prima/CORE/SME/src/pmc/pmc.c
	drivers/staging/prima/CORE/SME/src/pmc/pmcApi.c
	drivers/staging/prima/CORE/SME/src/rrm/sme_rrm.c
	drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
	drivers/staging/prima/CORE/SME/src/sme_common/sme_FTApi.c
	drivers/staging/prima/CORE/SYS/legacy/src/pal/inc/palApi.h
	drivers/staging/prima/CORE/SYS/legacy/src/pal/inc/palPipes.h
	drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c
	drivers/staging/prima/CORE/TL/inc/wlan_qct_tl.h
	drivers/staging/prima/CORE/TL/src/wlan_qct_tl.c
	drivers/staging/prima/CORE/VOSS/inc/vos_types.h
	drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c
	drivers/staging/prima/CORE/VOSS/src/vos_trace.c
	drivers/staging/prima/CORE/VOSS/src/vos_utils.c
	drivers/staging/prima/CORE/WDA/inc/legacy/halTypes.h
	drivers/staging/prima/CORE/WDA/inc/wlan_qct_wda.h
	drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c
	drivers/staging/prima/CORE/WDI/CP/inc/wlan_qct_wdi.h
	drivers/staging/prima/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
	drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c
	drivers/staging/prima/CORE/WDI/DP/inc/wlan_qct_wdi_ds.h
	drivers/staging/prima/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c
	drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c
	drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_trace.c
	drivers/staging/prima/Kconfig
	drivers/staging/prima/Makefile
	drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini
	drivers/staging/prima/riva/inc/wlan_hal_cfg.h
	drivers/staging/prima/riva/inc/wlan_hal_msg.h
Revert "prima: release v3.2.2.17"

This reverts commit e61f03ab881693e457d1b29741b3b4aec489f727.
usb: gadget: mass_storage: added sysfs entry for cdrom to LUNs

This patch adds a "cdrom" sysfs entry for each mass_storage LUN, just
like "ro" sysfs entry. This allows switching between USB and CD-ROM
emulation without reinserting the module or recompiling the kernel.

Change-Id: I115e3c8b5cf6e473cb081ef84f7be451ecdc1f0f
writeback: remove nr_pages_dirtied arg from balance_dirty_pages_ratelimited_nr()

There is no reason to pass the nr_pages_dirtied argument, because
nr_pages_dirtied value from the caller is unused in
balance_dirty_pages_ratelimited_nr().

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Vivek Trivedi <vtrivedi018@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:

	fs/btrfs/disk-io.c
CIFS use sensible file nlink values if unprovided

commit 6658b9f70ebca5fc0795b1d6d733996af1e2caa7 upstream.

Certain servers may not set the NumberOfLinks field in query file/path
info responses. In such a case, cifs_inode_needs_reval() assumes that
all regular files are hardlinks and triggers revalidation, leading to
excessive and unnecessary network traffic.

This change hardcodes cf_nlink (and subsequently i_nlink) when not
returned by the server, similar to what already occurs in cifs_mkdir().

Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rtlwifi: rtl8192cu: Add new USB ID for TP-Link TL-WN8200ND

commit c4d827c5ccc3a49227dbf9d4b248a2e86f388023 upstream.

This is a new device for this driver.

Reported-by: Tobias Kluge <zielscheibe@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Tobias Kluge <zielscheibe@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jbd2: fix theoretical race in jbd2__journal_restart

commit 39c04153fda8c32e85b51c96eb5511a326ad7609 upstream.

Once we decrement transaction->t_updates, if this is the last handle
holding the transaction from closing, and once we release the
t_handle_lock spinlock, it's possible for the transaction to commit
and be released.  In practice with normal kernels, this probably won't
happen, since the commit happens in a separate kernel thread and it's
unlikely this could all happen within the space of a few CPU cycles.

On the other hand, with a real-time kernel, this could potentially
happen, so save the tid found in transaction->t_tid before we release
t_handle_lock.  It would require an insane configuration, such as one
where the jbd2 thread was set to a very high real-time priority,
perhaps because a high priority real-time thread is trying to read or
write to a file system.  But some people who use real-time kernels
have been known to do insane things, including controlling
laser-wielding industrial robots.  :-)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: option,qcserial: move Novatel Gobi1K IDs to qcserial

commit a254810a86aaaac4ac6ba44fa934558b042a17a7 upstream.

These devices are all Gobi1K devices (according to the Windows INF
files) and should be handled by qcserial instead of option.  Their
network port is handled by qmi_wwan.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed

commit d68c277b501889b3a50c179d1c3d704db7947b83 upstream.

Without this memory barrier, the file-storage thread may fail to
escape from the following while loop, because it may observe new
common->thread_wakeup_needed and old bh->state which are updated by
the callback functions.

	/* Wait for the CBW to arrive */
	while (bh->state != BUF_STATE_FULL) {
		rc = sleep_thread(common);
		if (rc)
			return rc;
	}

Signed-off-by: UCHINO Satoshi <satoshi.uchino@toshiba.co.jp>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
xhci: check for failed dma pool allocation

commit 025f880cb2e4d7218d0422d4b07bea1a68959c38 upstream.

Fail and free the container context in case dma_pool_alloc() can't allocate
the raw context data part of it

This patch should be backported to kernels as old as 2.6.31, that
contain the commit d115b04818e57bdbc7ccde4d0660b15e33013dc8 "USB: xhci:
Support for 64-byte contexts".

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: John Youn <johnyoun@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb: host: xhci-plat: release mem region while removing module

commit 5388a3a5faba8dfa69e5f06c3a415d373c1a4316 upstream.

Do a release_mem_region of the hcd resource. Without this the
subsequent insertion of module fails in request_mem_region.

Signed-off-by: George Cherian <george.cherian@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status

commit e39506b466edcda2a7e9d0174d7987ae654137b7 upstream.

Commit 80af9e6d (pcmcia at91_cf: fix raw gpio number usage) forgot
to change the parameter in gpio_get_value after adding gpio
validation.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
xen/time: remove blocked time accounting from xen "clockchip"

commit 0b0c002c340e78173789f8afaa508070d838cf3d upstream.

... because the "clock_event_device framework" already accounts for idle
time through the "event_handler" function pointer in
xen_timer_interrupt().

The patch is intended as the completion of [1]. It should fix the double
idle times seen in PV guests' /proc/stat [2]. It should be orthogonal to
stolen time accounting (the removed code seems to be isolated).

The approach may be completely misguided.

[1] https://lkml.org/lkml/2011/10/6/10
[2] http://lists.xensource.com/archives/html/xen-devel/2010-08/msg01068.html

John took the time to retest this patch on top of v3.10 and reported:
"idle time is correctly incremented for pv and hvm for the normal
case, nohz=off and nohz=idle." so lets put this patch in.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>