Michal Kazior [Tue, 25 Nov 2014 14:16:05 +0000 (15:16 +0100)]
ath10k: fix station count enforcement
The number of peers isn't directly translatable to
the number of stations because ath10k needs to
reserve a few extra peers for special cases like
multi-vif concurrency.
The previous limit was 126 and 15 stations in AP
mode for 10.x and main firmware branches
respectively. The limit is now 128 and 16 which
was the original intention.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Tue, 25 Nov 2014 14:16:04 +0000 (15:16 +0100)]
ath10k: clean up num_peers locking
The var was supposed to be protected by data_lock
but it wasn't so in all instances. It's actually
not necessary to have a spinlock protected
num_peers so drop it.
All instances of num_peers are already within
conf_mutex sections so use that.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Yanbo Li [Tue, 25 Nov 2014 10:24:48 +0000 (12:24 +0200)]
ath10k: add memory dump debugfs interface
Add mem_val debugfs file for dumping the firmware (target) memory and also for
writing to the memory. The firmware memory is accessed through one file which
uses position of the file as the firmware memory address. For example, with dd
use skip parameter for the address.
Beucase target memory width is 32 bits it's strongly recommended to use
blocksize divisable with 4 when using this interface. For example, when using
dd use bs=4 to set the block size to 4 and remember to divide both count and
skip values with four.
Yanbo Li [Tue, 25 Nov 2014 10:24:33 +0000 (12:24 +0200)]
ath10k: add register access debugfs interface
Debugfs files reg_addr and reg_val are used for reading and writing to the
firmware (target) registers. reg_addr contains the address to be accessed,
which also needs to be set first, and reg_value is when used for reading and
writing the actual value in ASCII.
To read a value from the firmware register 0x100000:
Sujith Manoharan [Tue, 25 Nov 2014 06:17:00 +0000 (11:47 +0530)]
ath10k: fix bug reported by lockdep
ath10k_tx_wep_key_work() acquires conf_mutex, so
cancelling it when conf_mutex is already taken
in ath10k_remove_interface() is incorrect, so
move it outside the lock.
Snippet from the lockdep report:
kernel: ======================================================
kernel: [ INFO: possible circular locking dependency detected ]
kernel: 3.18.0-rc5-wl-debug #34 Tainted: G O
kernel: -------------------------------------------------------
kernel: hostapd/451 is trying to acquire lock:
kernel: ((&arvif->wep_key_work)){+.+...}, at: [<ffffffff810872d5>] flush_work+0x5/0x290
kernel: but task is already holding lock:
kernel: (&ar->conf_mutex){+.+.+.}, at: [<ffffffffa0b99f00>] ath10k_remove_interface+0x40/0x290 [ath10k_core]
kernel: which lock already depends on the new lock.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Sujith Manoharan [Tue, 25 Nov 2014 06:16:58 +0000 (11:46 +0530)]
ath10k: fix shared WEP
When static keys are used in shared WEP, when a
station is associated, message 3 is sent with an
encrypted payload. But, for subsequent
authentications that are triggered without a
deauth, the auth frame is decrypted by the HW.
To handle this, check if the WEP keys have already
been set for the peer and if so, mark the
frame as decrypted. This scenario can happen
when a station changes its default TX key and initiates
a new authentication sequence.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Mon, 24 Nov 2014 14:34:08 +0000 (15:34 +0100)]
ath10k: don't drop corrupted mgmt frames
Some firmware revisions don't seem to deilver
management frames with FCS error via WMI so narrow
down the HTT rule to not drop corrupted management
frames.
This basically increases number of frames ath10k
reports while sniffing.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Mon, 24 Nov 2014 13:58:33 +0000 (14:58 +0100)]
ath10k: fix offchannel cancel failures
When mac80211 requests driver to cancel a hw roc
the driver must not call the expired() callback or
else roc will fail in some cases depending on how
things get scheduled.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Mon, 24 Nov 2014 13:58:31 +0000 (14:58 +0100)]
ath10k: fix offchan reliability
New firmware revisions don't need peer creation
when doing offchannel tx. Earlier revisions would
queue and never release frames without a peer.
This prevent new firmware revisions from stopping
replenishing wmi-htc tx credits and improves
reliability of offchannel tx which would sometimes
silently fail.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Mon, 24 Nov 2014 14:22:10 +0000 (16:22 +0200)]
ath10k: use configured nss instead of max nss
When re-associating a station, the nss was set back to
maximum value even if user had configured small number
of tx chains. So, pay attention to user's config in
this case as well.
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Mon, 24 Nov 2014 14:22:10 +0000 (16:22 +0200)]
ath10k: apply chainmask settings to vdev on creation
It appears it takes more than just setting the
hardware's chainmask to make things work well. Without
this patch, a vdev would only use 1x1 rates when chainmask
was set to 0x3.
Setting the 'nss' (number of spatial streams) on the vdev
helps the firmware's rate-control algorithm work properly.
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Tue, 23 Sep 2014 21:17:19 +0000 (14:17 -0700)]
ath10k: add ATH10K_DBG_WMI_PRINT debug level
There are not many of these messages producted by the
firmware, but they are generally fairly useful, so make it easy to print them
with a separate debug level.
kvalo: fix commit log, rename debug level
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Johannes Berg [Fri, 21 Nov 2014 16:58:49 +0000 (18:58 +0200)]
ath10k: don't rebuild all the time
There are better ways to get the kernel information, use the
utsname and omit the version code entirely since it's duplicate.
The version magic is rather useless anyway
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Tue, 18 Nov 2014 07:24:47 +0000 (09:24 +0200)]
ath10k: start using sk_buff_head
Instead of using manual sk_buff linking via ->next
use sk_buff_head. It's more robust, cleaner and
there's plenty of helper functions in kernel
already to manage sk_buff_head.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:10 +0000 (06:11 +0530)]
ath9k: Move roc completion to the offchannel timer
Currently, when a roc period expires, the offchannel
timer calls ieee80211_remain_on_channel_expired(), but
the roc state is cleared only when the queued work
to switch to the operating channel gets a chance to run.
This race is a problem because mac80211 can issue a
new roc request in this window. To avoid this, handle
roc completion in the offchannel timer itself.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:09 +0000 (06:11 +0530)]
ath9k: Adjust tbtt delta properly
In a GO/STA setup, when we switch to the STA context,
the channel context timer is scheduled with a period of
half the beacon interval. If a beacon is received in
this duration, the timer is adjusted to accommodate
TSF sync done by the HW.
But, if the actual channel switch is delayed for some
reason, we end up rearming the timer every time a new
beacon is received. Avoid this by doing the adjustment
only once.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:08 +0000 (06:11 +0530)]
ath9k: Handle failure to send NoA
If for some reason a beacon with a new NoA is
not sent out, then reset the mgd_prepare_tx flag.
Not doing this will result in a situation where
a GO will send a new NoA when it shouldn't.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:07 +0000 (06:11 +0530)]
ath9k: Cancel pending offchannel operations
This patch makes sure that pending roc/scan
operations are cancelled properly when a new
context is assigned/unassigned.
The flush_work() call to flush out any scheduled
channel context work is removed, instead, sc->mutex
is dropped to allow any pending work to get a chance
to complete by the channel scheduler. Also, increase
the timeout to allow a switch to an active GO.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:06 +0000 (06:11 +0530)]
ath9k: Clear offchannel state properly
When a pending roc or scan operation is cancelled,
the offchannel operation is cleared, but the offchannel
state in the main scheduler is not cleared. This causes
problems since an active GO will try to process a stale
offchannel request that was deferred earlier. Fix this
by clearing the state when there is no pending offchannel
(roc/scan) operation.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:05 +0000 (06:11 +0530)]
ath9k: Fix thermometer programming
The registers that control the on-chip thermometer
need to be programmed based on the chainmask that
the solution supports, not the chainmask that is
present in the eeprom.
Cc: Miaoqing Pan <miaoqing@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:04 +0000 (06:11 +0530)]
ath9k: Store the chip chainmask in HW capabilities
Cc: Miaoqing Pan <miaoqing@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:03 +0000 (06:11 +0530)]
ath9k: Enable TSF2 for generic HW timers
The base TSF is used for HW timers 0..7, but chips
in the AR9003 family and above can support more generic
timers. To use them, however, a second HW TSF needs to
be enabled. This patch allows usage of the extra
timers by starting the second TSF properly.
The extra set of HW timers is apparently also present
in AR9287, but we enable it only for the AR9003 family.
Cc: Kobi Cohen-Arazi <kobic@qti.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 16 Nov 2014 00:41:02 +0000 (06:11 +0530)]
ath9k: Fix LED configuration
On some x86 platforms, the LED gpio is active high
instead of active low. Identify such cards and modify
the GPIO usage to make sure LED works properly.
Cc: Russell Hu <rhu@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Miaoqing Pan [Sun, 16 Nov 2014 00:41:01 +0000 (06:11 +0530)]
ath9k: Use new QCA953x initvals
This patch updates the initvals for QCA953x v1.1 and v2.0
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chun-Yeow Yeoh [Sat, 15 Nov 2014 19:05:41 +0000 (03:05 +0800)]
ath9k_htc: Enable software crypto for mgmt frame in Tx for USB devices
In secured mesh, the unicast mgmt frame is encrypted using
the same key that used for encrypting the unicast data frame.
This patch "ath9k_htc_firmware: fix the offset of CCMP header
for mesh data frame" applied to open-ath9k-htc-firmware allows
the ath9k_htc to be loaded without "nohwcrypt=1". Unfortunately,
this is not working and we still need CCMP encryption of
transmitted management frames to be done in software.
So this patch allows the software encryption for transmitted
management frame to be done in software but remain the hardware
decryption for received management frame.
This patch is tested with the following hardwares:
- TP-Link TL-WN821N v3 802.11n [Atheros AR7010+AR9287]
- AR9271 802.11n
and managed to work with peer mesh STA equipped with ath9k.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chun-Yeow Yeoh [Sat, 15 Nov 2014 19:05:40 +0000 (03:05 +0800)]
ath9k|ath9k_htc: Seperate the software crypto flag for Tx and Rx
Use the sw_mgmt_crypto_tx flag to trigger the CCMP encryption
for transmitted management frames to be done in software while
the sw_mgmt_crypto_rx flag is used to trigger the CCMP decryption
for received management frames to be done in software.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Thu, 13 Nov 2014 16:24:16 +0000 (21:54 +0530)]
mwifiex: add auto TDLS support
This patch adds auto TDLS support to mwifiex.
Auto TDLS functionality works as follows:
1. Whenever userspace application has triggered TDLS connection with
any peer, driver would store this peer mac address details in its database.
2. After this driver whenever driver receives packet on direct link,
it would store rssi and timestamp in peer information.
3. Whenever a packet is to be transmitted to non-AP peer in station mode,
driver would check if TDLS link can be established by looking at peer RSSI
information. Driver would initiate TDLS setup in such cases.
4. Periodic timer is used for updating peer information.
5. Auto TDLS peer list & timer are cleared during disconnection or driver unload.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Thu, 13 Nov 2014 16:24:14 +0000 (21:54 +0530)]
mwifiex: do not explicitly disable TDLS link during teardown
When Teardown event from FW is indicated to userspace, userspace
would trigger tdls_oper handler to disable TDLS link.
We need not do this explicitly here.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chun-Yeow Yeoh [Wed, 12 Nov 2014 08:40:19 +0000 (16:40 +0800)]
ath9k: fix the assignment of hw queues for mesh interface
We need to assign the hw queues for mesh interface. Otherwise,
we are not able to bring up the mesh interface due to the
IEEE80211_INVAL_HW_QUEUE error.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Oleksij Rempel [Wed, 12 Nov 2014 07:32:08 +0000 (08:32 +0100)]
ath9k: common-spectral: don't depend from ATH9K_DEBUGFS
we can have here two variants. Add
ATH9K_CMN_DEBUGFS y if ATH9K_CMN_DEBUGFS || ATH9K_HTC_DEBUGFS
wich will add more configurations and testcases. Or remove ATH9K_HTC_DEBUGFS
which need more time to be done.
So, make common-spectral ignore ATH9K_DEBUGFS option for now.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/htc_drv_init.c:56:6: sparse: symbol 'ath9k_htc_op_ps_wakeup' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/htc_drv_init.c:61:6: sparse: symbol 'ath9k_htc_op_ps_restore' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/htc_drv_init.c:66:19: sparse: symbol 'ath9k_htc_ps_ops' was not declared. Should it be static?
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/init.c:91:6: sparse: symbol 'ath9k_op_ps_wakeup' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/init.c:96:6: sparse: symbol 'ath9k_op_ps_restore' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/init.c:101:19: sparse: symbol 'ath9k_ps_ops' was not declared. Should it be static?
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 5 Nov 2014 14:08:11 +0000 (19:38 +0530)]
mwifiex: module load parameter for interface creation
This patch adds module load parameter driver_mode for mwifiex
which would enable driver to create AP or P2P client interface while loading
module. driver_mode is bitmap of interface modes for station, AP and
P2P client.
Station interface is created by default and is unaffected by driver_mode
parameter.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 17 Nov 2014 20:28:39 +0000 (15:28 -0500)]
Merge branch 'for-linville' of git://github.com/kvalo/ath
Kalle Valo <kvalo@qca.qualcomm.com> says:
"One ath6kl patch and rest for ath10k, but nothing really major which
stands out. Most notable:
o fix resume (Bartosz)
o firmware restart is now faster and more reliable (Michal)
o it's now possible to test hardware restart functionality without
crashing the firmware using hw-restart parameter with
simulate_fw_crash debugfs file (Michal)"
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Peter Oh [Mon, 17 Nov 2014 14:44:15 +0000 (16:44 +0200)]
ath10k: fix mismatched wmi api call
Fix to use v10.2 wmi call for firmware v10.2.
It turned out that peer association function was using
v10.1 wmi call for v10.2 firmware during code review.
Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
ath10k: handle ieee80211 header and payload tracing separately
For packet log, the transmitted frame 802.11 header alone is sufficient.
Recording entire packet is also consuming lot of disk space. To optimize
this, tx and rx data tracepoints are splitted into header and payload
tracepoints.
To record tx ieee80211 headers
trace-cmd record -e ath10k_tx_hdr
To record complete packets
trace-cmd record -e ath10k_tx_hdr -e ath10k_tx_payload
Cc: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
James Cameron [Tue, 11 Nov 2014 05:21:28 +0000 (16:21 +1100)]
mwifiex: simplify ad hoc join capability info
While preparing an ad-hoc start command, the capability info bitmap is
needlessly set from the command, and then the ESS bit cleared.
Change to set the bitmap directly without reference to the command.
Signed-off-by: James Cameron <quozl@laptop.org> Acked-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Mon, 10 Nov 2014 07:25:17 +0000 (09:25 +0200)]
wlcore: check minimum buffer size in some cmd_send functions
Check for the minimum required buffer length in wlcore_cmd_send() and
wlcore_cmd_configure_failsafe. This ensures that we will never try to
use a buffer that is smaller than the required header.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: fix version display problem on big endian platforms
It's been observed that wrong firmware version (ex. 66.14.96.p9
instead of 14.66.9.p96) is displayed on big endian platforms.
The problem is fixed here.
Reported-by: Daniel Mosquera <daniel.mosquera@ctag.com> Tested-by: Daniel Mosquera <daniel.mosquera@ctag.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 5 Nov 2014 11:34:30 +0000 (17:04 +0530)]
mwifiex: do not setup AMPDU/AMSDU with broadcast receiver
It is observed that device sometimes sends BA setup requests for
broadcast mac address.
This patch adds a check to avoid checking availability of
AMPDU/AMSDU streams for broadcast mac address.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: fix out of memory issue observed for USB chipsets
On some platforms, system goes out of memory during heavy
Rx traffic with our USB chipsets.
In case of SDIO/PCIe, after receiving 50 packets in Rx queue
we stop processing interrupts till packets pending fall below
low threshold i.e 20. We don't have similar logic for USB,
so if host platform is slow, we would hit a case where firmware
keeps on pushing packets at high speed than driver/kernel can
process.
We will stop submitting URBs for Rx data when pending packet
count reaches high threshold and restart them when enough
packets are consumed to solve the problem.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=85071 Reported-by: Marek Belisko <marek.belisko@gmail.com> Tested-by: Marek Belisko <marek.belisko@gmail.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Wed, 5 Nov 2014 11:34:27 +0000 (17:04 +0530)]
mwifiex: rx workqueue support for USB interface
This patch adds RX workqueue support for USB interfaces.
Currently rx_pending is applicable for cmd/events and Rx
data in USB interface. Let's use it only for Rx data.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sat, 1 Nov 2014 15:54:56 +0000 (16:54 +0100)]
bcma: get IRQ numbers from dt
It is not possible to auto detect the irq numbers used by the cores on
an arm SoC. If bcma was registered with device tree it will search for
some device tree nodes with the irq number and add it to the core
configuration.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Sat, 1 Nov 2014 15:54:55 +0000 (16:54 +0100)]
bcma: make it possible to specify a IRQ num in bcma_core_irq()
This moves bcma_core_irq() to main.c and add a extra parameter with a
number so that we can return different irq number for devices with more
than one.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Martin Townsend [Thu, 6 Nov 2014 19:15:13 +0000 (19:15 +0000)]
6lowpan: move skb_free from error paths in decompression
Currently we ensure that the skb is freed on every error path in IPHC
decompression which makes it easy to introduce skb leaks. By centralising
the skb_free into the receive function it makes future decompression routines
easier to maintain. It does come at the expense of ensuring that the skb
passed into the decompression routine must not be copied.
Signed-off-by: Martin Townsend <mtownsend1973@gmail.com> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Kuba Pawlak [Thu, 6 Nov 2014 18:36:52 +0000 (19:36 +0100)]
Bluetooth: Clear role switch pending flag
If role switch was rejected by the controller and HCI Event: Command Status
returned with status "Command Disallowed" (0x0C) the flag
HCI_CONN_RSWITCH_PEND remains set. No further role switches are
possible as this flag prevents us from sending any new HCI Switch Role
requests and the only way to clear it is to receive a valid
HCI Event Switch Role.
This patch clears the flag if command was rejected.
2013-01-01 00:03:44.209913 < HCI Command: Switch Role (0x02|0x000b) plen 7
bdaddr BC:C6:DB:C4:6F:79 role 0x00
Role: Master
2013-01-01 00:03:44.210867 > HCI Event: Command Status (0x0f) plen 4
Switch Role (0x02|0x000b) status 0x0c ncmd 1
Error: Command Disallowed
Signed-off-by: Kuba Pawlak <kubax.t.pawlak@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 5 Nov 2014 19:51:28 +0000 (20:51 +0100)]
mac802154: use IEEE802154_EXTENDED_ADDR_LEN
This patch removes the af_ieee802154 defines and use the
IEEE802154_EXTENDED_ADDR_LEN. We should do this everywhere in the
802.15.4 subsystem because af_ieee802154 should be normally an uapi
header.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 5 Nov 2014 19:51:27 +0000 (20:51 +0100)]
at86rf230: add force slotted operation bit
This patch adds a force setting of slotted operation bit. The atben
chips sometimes set these bit. The reason is unknown. Nevertheless we
don't support slotted operation so we set this bit now force while
probing.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Alexander Aring [Wed, 5 Nov 2014 19:51:25 +0000 (20:51 +0100)]
mac802154: add support for perm_extended_addr
This patch adding support for a perm extended address. This is useful
when a device supports an eeprom with a programmed static extended address.
If a device doesn't support such eeprom or serial registers then the
driver should generate a random extended address.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This patch cleanups the ieee802154_be64_to_le64 to have a similar
function like ieee802154_le64_to_be64 only with switched source and
destionation types.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>