openwrt/staging/blogic.git
12 years agoath9k: adjust WLAN and BT concurrent transmission
Rajkumar Manoharan [Fri, 12 Oct 2012 08:37:25 +0000 (14:07 +0530)]
ath9k: adjust WLAN and BT concurrent transmission

The simulataneous transmission of both WLAN and BT might cause
increase in power levels. To avoid regulatory violation, WLAN tx
power will be adjusted according to BT power index based on avaliability
of BT scheduling messages. WLAN tx power reduction might affect its
performance. So WLAN tx power is only be lowered when the signal strength
is good enough. Otherwise concurrent tx will be disabled and WLAN uses
it default power levels. Also concurrent tx is disabled whenever WLAN is
moving to off-channel which might be used by BT.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fill channel mode in caldata
Rajkumar Manoharan [Fri, 12 Oct 2012 08:37:24 +0000 (14:07 +0530)]
ath9k: fill channel mode in caldata

It is useful to have channel mode in caldata to find out
whether operaing channel is in HT40/20 when we are currently
on offchannel. It will be used by BTCOEX to enable/disable
concurrent tx mechanism later.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add concurrent WLAN and BT tx support for MCI based chips
Rajkumar Manoharan [Fri, 12 Oct 2012 08:37:23 +0000 (14:07 +0530)]
ath9k: Add concurrent WLAN and BT tx support for MCI based chips

This feature enables both WLAN and BT can transmit simultaneously
by setting WLAN and BT to equal priorities. Whenever both are
transmitting, it might violate regulatory power limits. To avoid
regulatory violation, WLAN tx power will be adjusted according to BT
power index based on avaliability of BT scheduling message. If the
combined power exceeds threshold, BT transmission will be held off.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Send WLAN channel info to BT
Rajkumar Manoharan [Fri, 12 Oct 2012 08:37:22 +0000 (14:07 +0530)]
ath9k: Send WLAN channel info to BT

WLAN updates channel bitmap when associated and disassociated. Channel
bitmap will reflect whare are the channels used or affected by WLAN and
BT should avoid using those. Not doing so, could affect BT traffic
as both WLAN and BT is operating on same channel.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Advertize beacon_int_infra_match
Mohammed Shafi Shajakhan [Mon, 8 Oct 2012 16:00:54 +0000 (21:30 +0530)]
ath9k: Advertize beacon_int_infra_match

Currently ath9k need to have beacon interval matched
between STA mode and beaconing mode. Advertize this
through interface combinations.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Remove interface combination specific checks
Mohammed Shafi Shajakhan [Mon, 8 Oct 2012 16:00:53 +0000 (21:30 +0530)]
ath9k_htc: Remove interface combination specific checks

Once the driver advertizes interface combination logic
based on its firmware/hardware limitation, cfg80211
takes care of all the necessary logic such as maximum
beaconing vifs, standlone interface etc.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Advertise interface combinations supported
Mohammed Shafi Shajakhan [Mon, 8 Oct 2012 16:00:52 +0000 (21:30 +0530)]
ath9k_htc: Advertise interface combinations supported

This will allow us to create virtual interface the driver supports.
Also this ensures multivif support and limitation advertised
by the driver is taken care in cfg80211 itself.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle
Mohammed Shafi Shajakhan [Mon, 8 Oct 2012 16:00:51 +0000 (21:30 +0530)]
ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle

When WLAN is idle ensure we downgrade to FTP_STOMP_LOW weight
(from STOMP_LOW) to provide more bandwidth for BT FTP profile.
WLAN's idleness can be estimated by taking into account of the
rx data packets and just ignore beacons, qos nullfunc etc.

Also update bt_wait_time even if the chip is in NETWORK SLEEP
mode. This should help BT throughput when WLAN is idle.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocarl9170: fix spurious transmissions in sniffer mode
Christian Lamparter [Tue, 11 Sep 2012 21:18:34 +0000 (23:18 +0200)]
carl9170: fix spurious transmissions in sniffer mode

Several people have complained about an unusual
and undocumented feature of the AR9170 hardware:

In siffer mode, the hardware generates spurious
ACK frames for every received frame... even
broadcasts.

The reason for this malfunction is unknown:
<http://marc.info/?l=linux-wireless&m=134517238506033>
But there's a workaround: Instead of the special
sniffer mode, the hardware will be put into
station mode and all rx filters are disabled.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Marco Fonseca <marco@tampabay.rr.com>
Reported-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge tag 'nfc-next-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Mon, 29 Oct 2012 18:52:37 +0000 (14:52 -0400)]
Merge tag 'nfc-next-3.8-1' of git://git./linux/kernel/git/sameo/nfc-3.0

This is the first NFC pull request for 3.8

With this one we have:

- pn544 p2p support.
- pn544 physical and HCI layers separation. We are getting the pn544 driver
  ready to support non i2c physical layers.
- LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery
  protocol.
- LLCP datagram sockets (connection less) support.
- IDR library usage for NFC devices indexes assignement.
- NFC netlink extension for setting and getting LLCP link characteristics.
- Various code style fixes and cleanups spread over the pn533, LLCP, HCI and
  pn544 code.

12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Mon, 29 Oct 2012 18:52:04 +0000 (14:52 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

12 years agoNFC: Extend netlink interface for LTO, RW, and MIUX parameters support
Thierry Escande [Wed, 17 Oct 2012 12:43:39 +0000 (14:43 +0200)]
NFC: Extend netlink interface for LTO, RW, and MIUX parameters support

NFC_CMD_LLC_GET_PARAMS: request LTO, RW, and MIUX parameters for a device

NFC_CMD_LLC_SET_PARAMS: set one or more of LTO, RW, and MIUX parameters for
a device. LTO must be set before the link is up otherwise -EINPROGRESS is
returned. RW and MIUX can be set at anytime and will be passed in subsequent
CONNECT and CC messages. If one of the passed parameters is wrong none is
set and -EINVAL is returned.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Purge LLCP socket Tx queues when being disconnected
Samuel Ortiz [Fri, 26 Oct 2012 16:20:10 +0000 (18:20 +0200)]
NFC: Purge LLCP socket Tx queues when being disconnected

The Tx queues are no longer valid when we receive a disconnection or when
the LLCP link goes down. In the later case we also purge the entire local
Tx queue.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Remove CONFIG_EXPERIMENTAL from the NCI Makefile
Kees Cook [Tue, 23 Oct 2012 20:04:11 +0000 (13:04 -0700)]
NFC: Remove CONFIG_EXPERIMENTAL from the NCI Makefile

This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Remove CONFIG_EXPERIMENTAL from the LLCP Makefile
Kees Cook [Tue, 23 Oct 2012 20:04:10 +0000 (13:04 -0700)]
NFC: Remove CONFIG_EXPERIMENTAL from the LLCP Makefile

This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Remove CONFIG_EXPERIMENTAL
Kees Cook [Tue, 23 Oct 2012 20:04:09 +0000 (13:04 -0700)]
NFC: Remove CONFIG_EXPERIMENTAL

This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Fix some code style and whitespace issues
Szymon Janc [Wed, 17 Oct 2012 13:23:39 +0000 (15:23 +0200)]
NFC: Fix some code style and whitespace issues

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Use IDR library to assing NFC devices IDs
Samuel Ortiz [Mon, 22 Oct 2012 13:57:58 +0000 (15:57 +0200)]
NFC: Use IDR library to assing NFC devices IDs

As a consequence the NFC device IDs won't be increasing all the time,
as IDR provides the first available ID.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: pn533: Remove unused arg parameter
Waldemar Rymarkiewicz [Thu, 11 Oct 2012 12:04:01 +0000 (14:04 +0200)]
NFC: pn533: Remove unused arg parameter

Get rid of unused arg param in pn533_init_target_complete and
in pn533_start_poll_complete.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: pn533: Fix in/out frame buffer allocation
Waldemar Rymarkiewicz [Thu, 11 Oct 2012 12:03:58 +0000 (14:03 +0200)]
NFC: pn533: Fix in/out frame buffer allocation

Max frame size should be 264 bytes as per spec and not limited to
endpoint MaxPacketSize which is 64 in my case (acr122 reader).

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Return NULL when no LLCP socket for a dsap,ssap couple is found
Samuel Ortiz [Tue, 16 Oct 2012 19:15:59 +0000 (21:15 +0200)]
NFC: Return NULL when no LLCP socket for a dsap,ssap couple is found

The previous code was always returning the last socket from the
LLCP socket list.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Implement LLCP connection less Tx path
Samuel Ortiz [Tue, 16 Oct 2012 13:04:10 +0000 (15:04 +0200)]
NFC: Implement LLCP connection less Tx path

It simply involves getting the client dsap and ssap and calling the UI
frame building and sending routine.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: UI frame sending routine implementation
Samuel Ortiz [Tue, 16 Oct 2012 13:01:40 +0000 (15:01 +0200)]
NFC: UI frame sending routine implementation

UI frames still need to follow the MIU rule, and they need to use the
client passed dsap as the listening socket dsap is stuck on SDP.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Forward LLCP datagrams to userspace
Samuel Ortiz [Mon, 15 Oct 2012 15:44:44 +0000 (17:44 +0200)]
NFC: Forward LLCP datagrams to userspace

With connection less PDUs we have to send the SSAP and DSAP as well.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Handle LLCP UI frames
Samuel Ortiz [Mon, 15 Oct 2012 14:14:37 +0000 (16:14 +0200)]
NFC: Handle LLCP UI frames

UI (Unnumbered Information) frames are used for sending data over
connection less links.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Keep connection less bound sockets alive when DEP link goes down
Samuel Ortiz [Mon, 15 Oct 2012 13:09:52 +0000 (15:09 +0200)]
NFC: Keep connection less bound sockets alive when DEP link goes down

When DEP goes down, bound cl sockets can be kept alive as there is no
reason to kill a connection less server socket because the LLCP link
went down.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Check for connection less sockets when looking for a service name
Samuel Ortiz [Mon, 15 Oct 2012 13:08:29 +0000 (15:08 +0200)]
NFC: Check for connection less sockets when looking for a service name

Connection less server sockets will be in BOUND state, not LISTEN.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Reserve LLCP ssap when replying to an SNL frame
Samuel Ortiz [Mon, 15 Oct 2012 12:28:13 +0000 (14:28 +0200)]
NFC: Reserve LLCP ssap when replying to an SNL frame

Replying to an SNL (Service Name Lookup) means that the other end of
the link can now rely on our answer (Which is an ssap) and thus we have
to reserve it.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Fix sparse warnings due to missing static
Arron Wang [Mon, 8 Oct 2012 06:54:39 +0000 (14:54 +0800)]
NFC: Fix sparse warnings due to missing static

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Fix style issues with logical operations
Szymon Janc [Thu, 4 Oct 2012 13:15:51 +0000 (15:15 +0200)]
NFC: Fix style issues with logical operations

Logical continuations should be on the previous line.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Fix not propagating return code in nfc_hci_clear_all_pipes
Szymon Janc [Thu, 4 Oct 2012 13:15:49 +0000 (15:15 +0200)]
NFC: Fix not propagating return code in nfc_hci_clear_all_pipes

Return code from nfc_hci_execute_cmd was not propagated to caller.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Small nfc_hci_create_pipe refactoring
Szymon Janc [Thu, 4 Oct 2012 13:15:48 +0000 (15:15 +0200)]
NFC: Small nfc_hci_create_pipe refactoring

Check for error and return if any. This makes it easier to see what is
a 'positive' function flow.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Remove unneeded LLCP function return calls
Szymon Janc [Thu, 4 Oct 2012 13:15:47 +0000 (15:15 +0200)]
NFC: Remove unneeded LLCP function return calls

There is no need for return statement at the end of function returning
void.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Remove not needed local variable in nci_set_local_general_bytes
Szymon Janc [Thu, 4 Oct 2012 13:15:46 +0000 (15:15 +0200)]
NFC: Remove not needed local variable in nci_set_local_general_bytes

No need for local rc variable as result of nci_request can be returned
directly.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Use NFC_MAX_GT_LEN to check len in nci_set_local_general_bytes
Szymon Janc [Thu, 4 Oct 2012 13:15:45 +0000 (15:15 +0200)]
NFC: Use NFC_MAX_GT_LEN to check len in nci_set_local_general_bytes

local_gb is of size NFC_MAX_GT_LEN and len is used as index for it.
Check len against this instead of NCI_MAX_PARAM_LEN before accessing
local_gb.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Add NFC_ATTR_RF_MODE when sending device netlink properties
Thierry Escande [Fri, 5 Oct 2012 09:19:58 +0000 (11:19 +0200)]
NFC: Add NFC_ATTR_RF_MODE when sending device netlink properties

This is useful when getting devices to know if they're in target or
initiator mode.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Set rf_mode to NFC_RF_NONE where necessary
Thierry Escande [Fri, 5 Oct 2012 09:05:45 +0000 (11:05 +0200)]
NFC: Set rf_mode to NFC_RF_NONE where necessary

rf_mode is now set to NFC_RF_NONE when a device gets allocated,
when the link goes down, and when stop polling.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Initial SNL support
Samuel Ortiz [Thu, 4 Oct 2012 23:21:47 +0000 (01:21 +0200)]
NFC: Initial SNL support

SNL (Service Name Lookup) allows for LLCP peers to map service names with
SAPs. This is mandatory for connection less support as peers need to get
the right SAPs without sending the CONNECT frame.
Here we only support the Rx part of SNL. The Tx one will be implemented
when supporting connection less LLCP sockets.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Add SNL frame building routine
Samuel Ortiz [Thu, 4 Oct 2012 23:13:24 +0000 (01:13 +0200)]
NFC: Add SNL frame building routine

SNL (Service Name Lookup) frames are used to respond to SNL requests.
This is needed for SDP implementation.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Use llcp_allocate_pdu to build the DISC frames
Samuel Ortiz [Thu, 4 Oct 2012 23:09:07 +0000 (01:09 +0200)]
NFC: Use llcp_allocate_pdu to build the DISC frames

We no longer need to be atomic as this is only called from
llcp_sock_release().

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Avoid falling back to SYMM when sk is NULL
Samuel Ortiz [Thu, 4 Oct 2012 22:37:22 +0000 (00:37 +0200)]
NFC: Avoid falling back to SYMM when sk is NULL

In some cases (SNL, DISC, DM) we need to send an LLCP skbs without
having a sock owning it. I frames are an exception here since
they may be requeued to the llcp_sock queue.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Separate pn544 hci driver in HW dependant and independant parts
Eric Lapuyade [Tue, 2 Oct 2012 16:44:06 +0000 (18:44 +0200)]
NFC: Separate pn544 hci driver in HW dependant and independant parts

The driver now has all HCI stuff isolated in one file, and all the
hardware link specifics in another. Writing a pn544 driver on top of
another hardware link is now just a matter of adding a new file for that
new hardware specifics.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: HCI check presence must not fail when driver doesn't support it
Eric Lapuyade [Tue, 2 Oct 2012 15:27:36 +0000 (17:27 +0200)]
NFC: HCI check presence must not fail when driver doesn't support it

When the driver does not support checking the tag is still present, it
must return -EOPNOTSUPP. The NFC Core will then stop asking and not
report a tag lost event to user space.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Add pn544 presence check for different targets
Arron Wang [Thu, 27 Sep 2012 09:32:59 +0000 (17:32 +0800)]
NFC: Add pn544 presence check for different targets

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Implement HCI DEP send and receive data
Arron Wang [Thu, 27 Sep 2012 09:32:58 +0000 (17:32 +0800)]
NFC: Implement HCI DEP send and receive data

And implement the corresponding hooks for pn544.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Implement HCI DEP link up and down
Arron Wang [Thu, 27 Sep 2012 09:32:57 +0000 (17:32 +0800)]
NFC: Implement HCI DEP link up and down

And implement the corresponding hooks for pn544.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Handle pn544 continue activation
Arron Wang [Thu, 27 Sep 2012 09:32:56 +0000 (17:32 +0800)]
NFC: Handle pn544 continue activation

We need to send continue activation command to allow NFCIP-1
activation when a NFC target has been discovered in type A or
type F reader gate.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Pass hardware specific HCI event to driver
Arron Wang [Thu, 27 Sep 2012 09:32:55 +0000 (17:32 +0800)]
NFC: Pass hardware specific HCI event to driver

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoNFC: Set local gb and DEP registries
Arron Wang [Thu, 27 Sep 2012 09:32:54 +0000 (17:32 +0800)]
NFC: Set local gb and DEP registries

Set the local general bytes and default value for NFCIP1
Target/Initiator registries if the protocol is NFC-DEP

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomac80211: complete bss_info tracing
Johannes Berg [Wed, 24 Oct 2012 09:38:30 +0000 (11:38 +0200)]
mac80211: complete bss_info tracing

Some fields have been added but were missed in
tracing, add them now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: use non-atomic bitmap operation for local variable
Johannes Berg [Wed, 24 Oct 2012 12:22:37 +0000 (14:22 +0200)]
mac80211: use non-atomic bitmap operation for local variable

For a local variable there's no need to use the atomic
set_bit() operation, use __set_bit() instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: remove duplicate check in ieee80211_rx_mgmt_beacon
Rami Rosen [Thu, 25 Oct 2012 08:16:23 +0000 (10:16 +0200)]
mac80211: remove duplicate check in ieee80211_rx_mgmt_beacon

Remove a duplicate check in ieee80211_rx_mgmt_beacon,
there is no need to make again the same check for the
IEEE80211_HW_PS_NULLFUNC_STACK twice; the two ifs can
be consolidated.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
[reword commit message & break long lines and also
 clean up variable]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: add tracing for P2P Device start/stop
Johannes Berg [Tue, 23 Oct 2012 13:16:50 +0000 (15:16 +0200)]
cfg80211: add tracing for P2P Device start/stop

These were missed due to the tracing work having
started on a kernel that didn't have P2P Device
yet, implement them now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: expose AES-CMAC subkey calculation
Assaf Krauss [Wed, 1 Aug 2012 12:12:48 +0000 (15:12 +0300)]
mac80211: expose AES-CMAC subkey calculation

Expose a function for the AES-CMAC subkey calculation
to drivers. This is the first step of the AES-CMAC
cipher key setup and may be required for CMAC hardware
offloading.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: mesh STAs only process mesh beacons
Thomas Pedersen [Sun, 21 Oct 2012 02:03:10 +0000 (19:03 -0700)]
mac80211: mesh STAs only process mesh beacons

Before, a mesh STA would execute some code on behalf of AP or IBSS
beacons. Since the mesh stack currently does not consider anything but
other mesh STAs interesting, limit processing to just these and save a
little overhead.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Tue, 23 Oct 2012 15:41:46 +0000 (11:41 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
net/mac80211/mlme.c

12 years agomac80211: fix WDS channel context test
Johannes Berg [Mon, 22 Oct 2012 13:20:53 +0000 (15:20 +0200)]
mac80211: fix WDS channel context test

WDS is (currently) not allowed when channel
contexts are *supported*, not when they're
*not* supported. Fix the inverted test.

Reported-by: Ronald <ronald645@gmail.com>
Tested-by: Ronald <ronald645@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agobrcm80211: remove some truely barftastic code
Alan Cox [Thu, 11 Oct 2012 16:25:14 +0000 (17:25 +0100)]
brcm80211: remove some truely barftastic code

It's not used or called but please make it go away before someone copies or
uses it

Signed-off-by: Alan "minus lunch" Cox <alan@linux.intel.com>
Acked-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: remove 'always false' condition from brcmf_c_mkiovar_bsscfg
Arend van Spriel [Wed, 10 Oct 2012 18:13:11 +0000 (11:13 -0700)]
brcmfmac: remove 'always false' condition from brcmf_c_mkiovar_bsscfg

The parameter buflen is unsigned so the condition buflen < 0 is
always false. The patch fixes the if statement checking the buffer
length.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: fix sparse warnings
Franky Lin [Wed, 10 Oct 2012 18:13:08 +0000 (11:13 -0700)]
brcmfmac: fix sparse warnings

Following sparse warning is fixed:
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:2518:21: warning: symbol 'brcmf_find_wpaie' was not declared. Should it be static?
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:3768:1: warning: symbol 'brcmf_set_management_ie' was not declared. Should it be static?

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: Using zero instead of NULL
Dan Carpenter [Wed, 10 Oct 2012 18:13:07 +0000 (11:13 -0700)]
brcmfmac: Using zero instead of NULL

Sparse complains that we use zero instead of NULL here.  In fact, the
initialization is wrong and should be removed.  Doing these kinds of
bogus initializations means that GCC can't detect unitialized variables
and leads to bugs.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: perform ANI cycle in idle state
Rajkumar Manoharan [Wed, 10 Oct 2012 17:33:02 +0000 (23:03 +0530)]
ath9k: perform ANI cycle in idle state

As of now the ANI cycle is executed only when the chip is awake.
On idle state case, the station wakes up from network sleep for
beacon reception. Since most of the time, ANI cycle is not syncing
with beacon wakeup, ANI cycle is ignored. Approx 5 mins once, the
calibration is performed. This could affect the connection stability
when the station is idle for long. Even though the OFDM and CCK phy
error rates are too high, ANI is unable to tune its immunity level
as quick enough due to rare execution.

Here the experiment shows that OFDM and CCK levels are at default
even on higher phy error rate.

listenTime=44 OFDM:3 errs=121977/s CCK:2 errs=440818/s ofdm_turn=1

This change ensures that ANI calibration will be exectued atleast
once for every 10 seconds. The below result shows improvements and
immunity levels are adopted quick enough.

listenTime=557 OFDM:4 errs=752/s CCK:4 errs=125/s ofdm_turn=0

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocarl9170: handle traps from firmware loader
Christian Lamparter [Sat, 6 Oct 2012 18:42:54 +0000 (20:42 +0200)]
carl9170: handle traps from firmware loader

This patch changes the way the driver deals with
command responses and traps which are sent through
the special interrupt input endpoint 3.

While the carl9170 firmware does not use this
endpoint for command responses or traps, the
firmware loader on the device does. It uses it
to notify the host about 'watchdog triggered'
in case the firmware/hardware has crashed.

Note:
Even without this patch, the driver is still
able to detect the mishap and reset the device.
But previously it did that because the trap
event caused an out-of-order message sequence
number error, which also triggered a reset.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: Using %*phD instead of print_hex_dump_bytes
Andrei Emeltchenko [Fri, 5 Oct 2012 20:57:49 +0000 (13:57 -0700)]
mwifiex: Using %*phD instead of print_hex_dump_bytes

Make output more readable and remove unneeded function call.

...
mwifiex_sdio mmc0:0001:1: last_cmd_index = 3
last_cmd_id: 00000000: 16 00 cd 00 83 00 df 00 28 00 ........(.
...

would be changed to:

...
mwifiex_sdio mmc0:0001:1: last_cmd_index = 3
mwifiex_sdio mmc1:0001:1: last_cmd_id: 16 00 cd 00 83 00 df 00 28 00
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: use sizeof(array) to print_hex_dump_bytes
Bing Zhao [Fri, 5 Oct 2012 20:57:48 +0000 (13:57 -0700)]
mwifiex: use sizeof(array) to print_hex_dump_bytes

DBG_CMD_NUM is the number of commands, not the actual bytes of
data for printing.

Also remove the duplicated DBG_CMD_NUM definition.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: comment tx power settings
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:15 +0000 (13:44 +0200)]
rt2800: comment tx power settings

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: allow to reduce tx power on devices not exporting power limit
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:14 +0000 (13:44 +0200)]
rt2800: allow to reduce tx power on devices not exporting power limit

Some rt2800 devices don't have their calibrated max eirp tx power in
their calibration data. For those devices reduce tx power according to
difference between regulatory max channel power and requested tx power.

This patch is based on Helmut Schaa work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: pass channel pointer to rt2800_config_txpower
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:13 +0000 (13:44 +0200)]
rt2800: pass channel pointer to rt2800_config_txpower

Preparation for use regulatory max channel power in TX power delta
calculations.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: use eeprom OFDM 6M TX power as criterion
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:12 +0000 (13:44 +0200)]
rt2800: use eeprom OFDM 6M TX power as criterion

Don use TX_PWR_CFG_0 register value of OFDM 6M tx power as criterion
since it can be changed. The same do vendor driver (see
AsicAdjustSingleSkuTxPower and AsicGetTxPowerOffset functions from
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO).

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: compensate tx power also for non 11b rates on 2GHz
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:11 +0000 (13:44 +0200)]
rt2800: compensate tx power also for non 11b rates on 2GHz

We skip compensate calculation for non 11b rates on 2.4GHz band. I do
not see that on vendor driver
(2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO).

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: limit TX_PWR_CFG_ values to 0xc
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:10 +0000 (13:44 +0200)]
rt2800: limit TX_PWR_CFG_ values to 0xc

Based on AsicAdjustTxPower function from vendor driver
(2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO)
limit per rate TX power values we program into TX_PWR_CFG_ registers.

Note that on some configurations (devices/rates) is allowed to use
bigger values than 0xc, but we use safe maximum value for now. Further
work need to be done to allow use bigger values than 0xc.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: use BBP_R1 for setting tx power
Stanislaw Gruszka [Fri, 5 Oct 2012 11:44:09 +0000 (13:44 +0200)]
rt2800: use BBP_R1 for setting tx power

TX power delta can be negative. TX_PWR_CFG_ registers allow to set delta
only in range between 0 dBm and 15 dBm (4 bits for each rate). Se we
need to use BBP_R1 to configure negative deltas.

Not utilize +6 dBm increasing BBP_R1 option for safety reason. For now,
this can be used for devices, which export maximum allowed TX power
value.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath_hw: Use common REG_WRITE parameter order
Sven Eckelmann [Thu, 4 Oct 2012 17:43:15 +0000 (19:43 +0200)]
ath_hw: Use common REG_WRITE parameter order

All defines for REG_WRITE in Atheros wireless drivers use the order "ah",
"register" and "value". hw.c is the only file using the order "ah", "value" and
"register".

drivers/net/wireless/ath/ath9k/hw.h:#define REG_WRITE(_ah, _reg, _val) \
drivers/net/wireless/ath/key.c:#define REG_WRITE(_ah, _reg, _val) (common->ops->write)(_ah, _val, _reg)

This inconsistent definition can easily lead to implementation errors. The
modification doesn't change the behavior of the driver or the generated code.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192ce: rtl8192cu: use %*phC to dump small buffers
Andy Shevchenko [Tue, 2 Oct 2012 14:19:44 +0000 (17:19 +0300)]
rtlwifi: rtl8192ce: rtl8192cu: use %*phC to dump small buffers

The patch changes a bit trace output format in the rtl_cam_program_entry() to
print prefix and the actual data on the same line. Moreover the %*phC outputs
each byte as 2 hex digits, which is slightly different to the original %x.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoorinoco_usb: clean up some signedness issues
Dan Carpenter [Tue, 2 Oct 2012 08:32:34 +0000 (11:32 +0300)]
orinoco_usb: clean up some signedness issues

In ezusb_read_ltv() we had a comparison "(bufsize < 0)" which was never
true because bufsize was unsigned.  I looked at the implications of
that.  If we passed a negative number to ezusb_access_ltv() then it
would be used as the size parameter of the memcpy() because that
function uses min_t(int, exp_len, ans_size).

But fortunately when I looked at the callers, bufsize is not controlled
by the user and it's never negative.  So these signedness mistakes have
no impact.

I removed the always false check from ezusb_read_ltv() and I changed the
types in ezusb_access_ltv() and made the variables unsigned.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: do not initialize deactivated PCIe cores
Hauke Mehrtens [Sun, 30 Sep 2012 22:12:54 +0000 (00:12 +0200)]
bcma: do not initialize deactivated PCIe cores

Before it was tried to initialize the deactivated PCIe core in client
mode, but this causes the SoC to hang. Just do not initialize it at all
and ignore the core it is not working and nothing is connected to it
when the specific bit is set in the boardflags.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath/ath9k/ar9003_eeprom.c: Remove semicolon after if
Peter Senna Tschudin [Wed, 10 Oct 2012 16:38:17 +0000 (18:38 +0200)]
ath/ath9k/ar9003_eeprom.c: Remove semicolon after if

This patch remove a semicolon after if(...) that is preventing the
error check to work correctly. Removing this semicolon will change the
code behavior, but this is intended.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r1@
position p;
@@
if (...);@p

@script:python@
p0 << r1.p;
@@
// Emacs org-mode output
cocci.print_main("", p0)
cocci.print_secs("", p0)
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix BT_OP_SCAN usage
Sujith Manoharan [Sun, 30 Sep 2012 03:33:37 +0000 (09:03 +0530)]
ath9k: Fix BT_OP_SCAN usage

BT_OP_SCAN is applicable only for pre-MCI WLAN/BT combo chips
and using it for MCI-based cards is incorrect. Fix this by
cleaning up its usage.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Use a helper routine for MCI/FTP tuning
Sujith Manoharan [Sun, 30 Sep 2012 03:33:20 +0000 (09:03 +0530)]
ath9k: Use a helper routine for MCI/FTP tuning

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add an extra pcie core struct
Hauke Mehrtens [Sat, 29 Sep 2012 18:40:18 +0000 (20:40 +0200)]
bcma: add an extra pcie core struct

The BCM4706 has two PCIe host controller on the bcma bus. For PCIe
client mode it is assumed that there is only one PCIe controller so the
PCIe driver, like b43 and brcmsmac are accessing the first PCIe
controller when they want to issue a operation on the host controller.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: use fallback sprom if sprom on card was not valid
Hauke Mehrtens [Sat, 29 Sep 2012 18:38:11 +0000 (20:38 +0200)]
bcma: use fallback sprom if sprom on card was not valid

Sometimes the PCIe card indicates that it has a sprom somewhere and we
are able to read the memory region, but it is empty and not valid. In
these cases we should try to use the fallback sprom as a last chance.

This is the case for the PCIe cards in my ASUS RT-N66U (BCM4706 + 2
times BCM4331) and I have heard of someone having the same problem with
an other PCIe card connected to an other Broadcom SoC.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: add attribute to indicate a parallel flash is available
Hauke Mehrtens [Sat, 29 Sep 2012 18:36:18 +0000 (20:36 +0200)]
ssb: add attribute to indicate a parallel flash is available

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: move parallel flash config into an own struct
Hauke Mehrtens [Sat, 29 Sep 2012 18:36:17 +0000 (20:36 +0200)]
ssb: move parallel flash config into an own struct

This is a preparing step for adding serial flash support.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add some more flash chips for serial flash
Hauke Mehrtens [Sat, 29 Sep 2012 18:33:53 +0000 (20:33 +0200)]
bcma: add some more flash chips for serial flash

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: extract drv_cc in bcma_core_mips_flash_detect()
Hauke Mehrtens [Sat, 29 Sep 2012 18:33:52 +0000 (20:33 +0200)]
bcma: extract drv_cc in bcma_core_mips_flash_detect()

This makes the code more readable

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: mark nflash if it is the boot flash
Hauke Mehrtens [Sat, 29 Sep 2012 18:33:51 +0000 (20:33 +0200)]
bcma: mark nflash if it is the boot flash

There are some devices which are able to boot from nand flash and other
are using a serial flash for booting. Add a bool to indicate that the
device is booted from that flash chip and not from some other chip also
connected to the SoC. This is needed to find the nvram, as it is stored
on the flash the devices booted from.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add and use constants for the flash windows
Hauke Mehrtens [Sat, 29 Sep 2012 18:33:50 +0000 (20:33 +0200)]
bcma: add and use constants for the flash windows

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: mark pflash as present when available
Hauke Mehrtens [Sat, 29 Sep 2012 18:33:49 +0000 (20:33 +0200)]
bcma: mark pflash as present when available

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: init sprom struct earlier
Hauke Mehrtens [Sat, 29 Sep 2012 18:29:50 +0000 (20:29 +0200)]
bcma: init sprom struct earlier

The PCIe host driver and the chip common initialisation accesses the
sprom struct, but it is not initialized when these functions are run.
Move the sprom parsing up in to do it earlier.
As we need the chip common core rev and some other attributes from the
chip common core, the early initialization is done before accessing the
sprom.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: just do the necessary things in early register on SoCs
Hauke Mehrtens [Sat, 29 Sep 2012 18:29:49 +0000 (20:29 +0200)]
bcma: just do the necessary things in early register on SoCs

Some parts of the initialization for chip common and the pcie core are
accessing the sprom struct, but it is not initialized at that stage.
Just do the necessary thing in the early register on SoCs and not the
complete initialization to read out the nvram from the flash chip.
After it is possible to read out the nvram, the sprom should be parsed
from it and the full initialization of the cores should be run.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 19 Oct 2012 19:48:17 +0000 (15:48 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Fri, 19 Oct 2012 19:36:53 +0000 (15:36 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth...
John W. Linville [Fri, 19 Oct 2012 19:22:27 +0000 (15:22 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/bluetooth/bluetooth-next

12 years agomac80211: make client powersave independent of interface type
Marco Porsch [Wed, 10 Oct 2012 19:39:50 +0000 (12:39 -0700)]
mac80211: make client powersave independent of interface type

This patch prepares mac80211 for a later implementation of mesh or
ad-hoc powersave clients.
The structures related to powersave (buffer, TIM map, counters) are
moved from the AP-specific interface structure to a generic structure
that can be embedded into any interface type.
The functions related to powersave are prepared to allow easy
extension with different interface types. For example with:

+ } else if (sta->sdata->vif.type == NL80211_IFTYPE_MESH_POINT) {
+         ps = &sdata->u.mesh.ps;

Some references to the AP's beacon structure are removed where they
were obviously not used.

The patch compiles without warning and has been briefly tested as AP
interface with one client in PS mode.

Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agonl/cfg80211: force scan using an AP vif if requested
Antonio Quartulli [Tue, 16 Oct 2012 06:39:22 +0000 (08:39 +0200)]
nl/cfg80211: force scan using an AP vif if requested

If the user wants to scan using a vif configured as AP,
cfg80211 must give him a chance to do it, even if this
will disrupt the stations performance due to off-channel
scanning. To do so, this patch adds a 'force' flag to the
SCAN_TRIGGER command which tells cfg80211 to perform the
scanning operation even if the vif is an AP and the
beaconing has already started.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoBluetooth: AMP: Get amp_mgr reference in HS hci_conn
Andrei Emeltchenko [Thu, 18 Oct 2012 10:16:19 +0000 (13:16 +0300)]
Bluetooth: AMP: Get amp_mgr reference in HS hci_conn

When assigning amp_mgr in hci_conn (type AMP_LINK) get also reference.
In hci_conn_del those references would be put for both conn types
AMP_LINK and ACL_LINK associated with amp_mgr.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agocfg80211: add cfg80211 exported function tracing
Beni Lev [Mon, 27 Aug 2012 09:49:39 +0000 (12:49 +0300)]
cfg80211: add cfg80211 exported function tracing

Also add tracing to the API functions that drivers
(and mac80211) can call in cfg80211.

Signed-off-by: Beni Lev <beni.lev@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: add tracing to rdev-ops
Beni Lev [Tue, 31 Jul 2012 15:48:27 +0000 (18:48 +0300)]
cfg80211: add tracing to rdev-ops

Add tracing to make debugging cfg80211/mac80211
(or full-mac driver) interaction easier.

Signed-off-by: Beni Lev <beni.lev@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Hila Gonen <hila.gonen@intel.com>
Tested-by: Hila Gonen <hila.gonen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[add a cast to int to sizeof() to avoid warning]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: add wrappers for registered_device_ops
Hila Gonen [Wed, 27 Jun 2012 14:19:42 +0000 (17:19 +0300)]
cfg80211: add wrappers for registered_device_ops

This will allow adding central tracing like in mac80211.

Signed-off-by: Hila Gonen <hila.gonen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: Disallow HT/WEP in IBSS mode
Sujith Manoharan [Thu, 18 Oct 2012 04:49:28 +0000 (10:19 +0530)]
cfg80211: Disallow HT/WEP in IBSS mode

Currently, a user is allowed to choose a HT operating channel
with WEP when creating an IBSS network. WEP is not allowed
in HT configuration - this patch ensures that such requests
are denied.

Signed-off-by: Sujith Manoharan <c_manoha@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>