summaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
Commit message (Collapse)AuthorAgeFilesLines
* ieee802154: cc2520: Fix space before , coding style issueMohammad Jamal2015-02-021-2/+2
| | | | | | | | | This patch removes the warnings (space before , ) shown by checkpatch.pl Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com> Acked-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154: cc2520: Replace shift operations by BIT macroMohammad Jamal2015-02-021-3/+3
| | | | | | | | This patch replaces the shifting operations by BIT macro Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com> Acked-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: Constify struct regmap_configKrzysztof Kozlowski2015-01-051-1/+1
| | | | | | | | The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cc2520: fix zero perm_extended_addr addressVarka Bhadram2014-12-301-0/+1
| | | | | | | It will remove the bug of havine zero perm_extended_addr address. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* cc2520: remove 'ret' goto labelVarka Bhadram2014-12-301-10/+4Star
| | | | | | | | If allocation of memory fails instead of going to ret goto label and returning from there, we can directly return -ENOMEM on failure. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* cc2520: use devm_kzalloc(.., sizeof(*pointer), ..) patternVarka Bhadram2014-12-301-2/+1Star
| | | | | Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* net: ieee802154: don't use devm_pinctrl_get_select_default() in probeWolfram Sang2014-12-301-7/+0Star
| | | | | | | | | Since commit ab78029ecc34 (drivers/pinctrl: grab default handles from device core), we can rely on device core for setting the default pins. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: cleanup check on trac statusAlexander Aring2014-12-191-5/+3Star
| | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: remove version check for AT86RF212Andrey Yurovsky2014-12-191-10/+6Star
| | | | | | | | | | | | | | This version check allows the driver to only work with v=1 hardware however there is no driver-facing difference with newer versions (confirmed by Atmel FAEs) so this check needlessly prevents the driver from being used with radios now in production. Tested on AT86RF212B radio (which came up as v=3). Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: fix register read for part versionAndrey Yurovsky2014-12-191-1/+1
| | | | | | | | | | | | | The driver was reading the PART_NUM register for both the part number (type of device) and the part version, the version is actually in register 0x1D, VERSION_NUM. I believe that this was a copy-paste error. Tested on AT86RF212B where the part is detected to be the expected part number (0x07) and version (0x03 on mine). Signed-off-by: Andrey Yurovsky <andrey@snupi.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: remove unnecessary assignAlexander Aring2014-12-191-1/+0Star
| | | | | | | | The attribute extra_tx_headroom should already be zero. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: fix context pointer handlingAlexander Aring2014-12-191-1/+1
| | | | | | | | | | This patch changes the context pointer to the parameter given one inside function at86rf230_async_state_change_start. This could occur problem if context isn't pointed to lp->state. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: make at86rf230_async_error inlineAlexander Aring2014-12-191-1/+1
| | | | | | | | | This patch makes the at86rf230_async_error inline. This function is small enough to handle inline. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: remove if branchAlexander Aring2014-12-191-4/+1Star
| | | | | | | | | This patch removes an unnecessary if branch inside the tx complete handler. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154/mrf24j40: Fix alignment of parenthesisStefan Schmidt2014-12-191-2/+2
| | | | | | | CC: Alan Ott <alan@signal11.us> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154/mrf24j40: Fix typo begining -> beginningStefan Schmidt2014-12-191-1/+1
| | | | | | | CC: Alan Ott <alan@signal11.us> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154/cc2520: Remove extra blank linesStefan Schmidt2014-12-191-2/+0Star
| | | | | | | CC: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154/at86rf230: Fix typo unkown -> unknownStefan Schmidt2014-12-191-1/+1
| | | | | | Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154/at86rf230: Align to opening parenthesisStefan Schmidt2014-12-191-4/+4
| | | | | | Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154/at86rf230: Remove unneeded blank linesStefan Schmidt2014-12-191-2/+0Star
| | | | | | Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* at86rf230: add reset state cca handlingAlexander Aring2014-12-191-0/+2
| | | | | | | | This patch adds the default cca setting after device reset for at86rf230 driver. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* ieee802154: rework cca settingAlexander Aring2014-12-191-2/+28
| | | | | | | | | | The current cca setting handle is a driver specific call. We need to introduce some 802.15.4 specific layer and mapping 802.15.4 cca modes to driver specific ones inside the 802.15.4 driver. This patch will add such 802.15.4 layer and mapping the cca settings to driver specific ones. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-151-1/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * net: ieee802154: drop owner assignment from platform_driversWolfram Sang2014-10-202-2/+0Star
| | | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | cc2520: adds terminating newlineVarka Bhadram2014-12-051-1/+1
| | | | | | | | | | | | Signed-off-by: Varka Bhadram <varkab@cdac.in> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: fix commentation for symbol durationAlexander Aring2014-11-171-2/+2
| | | | | | | | | | | | | | | | | | This patch fix an copy&paste issue in the comment of setting symbol duration. These comments are more correct according the at86rf212 datasheet now. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: remove interframe spacing time workaroundAlexander Aring2014-11-131-23/+37
| | | | | | | | | | | | | | | | | | | | | | This patch removes the interframe spacing time workaround from at86rf230 driver and use the mac802154 one. The interframe spacing time differs at at86rf212 and channel setting. This patch fix this handling which is also a new workaround and should be moved into mac802154 while channel setting. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: add interframe spacing time handlingAlexander Aring2014-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new interframe spacing time handling into mac802154 layer. Interframe spacing time is a time period between each transmit. This patch adds a high resolution timer into mac802154 and starts on xmit complete with corresponding interframe spacing expire time if ifs_handling is true. We make it variable because it depends if interframe spacing time is handled by transceiver or mac802154. At the timer complete function we wake the netdev queue again. This avoids new frame transmit in range of interframe spacing time. For synced driver we add no handling of interframe spacing time. This is currently a lack of support in all synced xmit drivers. I suppose it's working because the latency of workqueue which is needed to call spi_sync. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: remove invalid max frame retries checkAlexander Aring2014-11-121-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | This patch removes the invalid max frame retries check from driver layer. This is already handled by nl802154 framework. Also the IEEE 802.15.4 standard doesn't allow a frame retries setting above 7. This seems to be valid for the at86rf230 transceiver but the chip running out of spec then. We only allow settings according 802.15.4 right now. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: remove invalid max csma backoffs checkAlexander Aring2014-11-121-3/+0Star
| | | | | | | | | | | | | | | | This patch removes the invalid check on max csma backoffs in driver layer. This is already handled by nl802154 framework. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: remove invalid backoff exponent checkAlexander Aring2014-11-121-1/+1
| | | | | | | | | | | | | | | | This patch removes the invalid backoff exponent check from driver layer. This is already handled by nl802154. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | ieee820154: remove valid page and channel checksAlexander Aring2014-11-122-16/+1Star
| | | | | | | | | | | | | | | | This patch removes validation of page and channel while setting from driver layer. This is already handled by nl802154 and mac802154. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: fix simple_return.cocci warningsFengguang Wu2014-11-061-5/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | drivers/net/ieee802154/at86rf230.c:1365:1-3: WARNING: end returns can be simpified Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: add force slotted operation bitAlexander Aring2014-11-051-0/+8
| | | | | | | | | | | | | | | | | | | | 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>
* | at86rf230: generate random perm extended addressAlexander Aring2014-11-051-0/+1
| | | | | | | | | | | | | | | | This patch adds support for a random generated perm extended address for the at86rf230 driver. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: add ieee802154_vif structAlexander Aring2014-11-052-0/+2
| | | | | | | | | | | | | | | | | | | | This patch adds an ieee802154_vif similar like the ieee80211_vif which holds the interface type and maybe further more attributes like the ieee80211_vif structure. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: add default channel settingsAlexander Aring2014-11-021-0/+3
| | | | | | | | | | | | | | | | This patch sets the reset state channels accoridng at86rf2xx datasheets. We don't need to set the default page here which is zero on all chips. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: fix page parameter constraintsAlexander Aring2014-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | Since commit e37d2ec82a222f1819e7793a27bc052999a379fb ("mac802154: ops: declare channel and page as u8") the page parameter can't be below zero. This patch fix a kbuild test robot warning. Furthermore this check should be removed and handled by netlink 802.15.4 interface. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: deliver with checksumAlexander Aring2014-10-291-2/+2
| | | | | | | | | | | | | | | | This patch indicates that the at86rf230 driver deliver with checksum instead drop the crc before delivering. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: add support for promiscuous modeAlexander Aring2014-10-291-1/+29
| | | | | | | | | | | | | | | | This patch adds support for promiscuous mode setting for the at86rf230 driver. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: add hardware address filter flagAlexander Aring2014-10-293-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Overdue introduction for address filtering hardware flag. Furthermore we will check and set address filtering on interface up. This patch prepares that we can check if an transceiver supports address filtering option. Currently all mainline driver supports hardware address filtering. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Cc: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: add IEEE802154_HW_ARET hw flagAlexander Aring2014-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | This patch adds a new IEEE802154_HW_ARET hardware flag for indicating that the transceiver supports ARET handling. Also remove the IEEE802154_HW_FRAME_RETRIES from IEEE802154_HW_CSMA flag. Frame retries handling is part of ARET. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: remove might_sleep from driver layerAlexander Aring2014-10-283-8/+0Star
| | | | | | | | | | | | | | | | This patch removes all might_sleep calls from driver layer. This handling is already done by mac802154 layer. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: ops: declare channel and page as u8Alexander Aring2014-10-284-8/+7Star
| | | | | | | | | | | | | | | | | | | | The range of channel and page fits into an unsigned byte range. This patch changes the set_channel parameter definitions for channel and page to u8. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: declare struct ieee802154_ops as constAlexander Aring2014-10-284-4/+4
| | | | | | | | | | | | | | | | | | The ieee802154_ops structure should be never changed during runtime. This patch declare this structure as const to avoid a runtime change. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: improve receive handlingAlexander Aring2014-10-271-7/+3Star
| | | | | | | | | | | | | | | | | | Current behaviour it to copy the frame inclusive CRC into a skb, then remove the CRC from the skb. This patch optimizes this by not copying the CRC at the first place. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: use ieee802154_is_valid_psdu_len helperAlexander Aring2014-10-271-18/+8Star
| | | | | | | | | | | | | | | | | | This patch adds the ieee802154_is_valid_psdu_len function to validate the psdu length. If the psdu length is invalid we use the maximum payload to receive also corrupted frames in monitor mode. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | ieee802154: drivers: use dev_alloc_skbAlexander Aring2014-10-273-3/+3
| | | | | | | | | | | | | | | | | | | | | | This patch change the allocation of skb inside the ieee802154 driver layer to dev_alloc_skb. This changes also the gfp mask to GFP_ATOMIC which is needed for upcomming change that the receiving is done by a tasklet and not a workqueue anymore. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | at86rf230: asynchronous xmit handlingAlexander Aring2014-10-261-25/+17Star
| | | | | | | | | | | | | | | | | | This patch converts the sync xmit handling into an async xmit handling. The driver was already prepared for this step, all other drivers need more work to implement a xmit_async function. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | mac802154: tx: add support for xmit_async callbackAlexander Aring2014-10-264-4/+4
| | | | | | | | | | | | | | | | | | | | | | This patch renames the existsing xmit callback to xmit_sync and introduces an asynchronous xmit_async function. If ieee802154_ops doesn't provide the xmit_async callback, then we have a fallback to the xmit_sync callback. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>