- 17 9月, 2015 40 次提交
-
-
由 Loic Poulain 提交于
intel_lpm_suspend/resume are only used in case of CONFIG_PM. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Vincent Stehlé 提交于
Fix compilation the following compilation warning, which happens when CONFIG_BT_INTEL is not set: drivers/bluetooth/btintel.h:98:13: warning: ‘btintel_version_info’ defined but not used [-Wunused-function] static void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver) ^ Signed-off-by: NVincent Stehlé <vincent.stehle@laposte.net> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Stefan Schmidt 提交于
Signed-off-by: NStefan Schmidt <stefan@osg.samsung.com> Acked-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Stefan Schmidt 提交于
Signed-off-by: NStefan Schmidt <stefan@osg.samsung.com> Acked-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch introduce a more detailed information why edge triggered irq's are currently not recommended. It could be that rising/falling edge detection can happen while the irq is disabled. Suggested-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch introduce debugfs support for collect trac status stats. To clear the stats ifdown the interface of at86rf230 and start the interface again. Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
To abort a TX_ARET_BUSY state it's recommended to switch into TRX_OFF state by doing STATE_TRX_FORCE_OFF. This patch will do always a TRX_OFF state change when the transceiver stucks in any state. From TRX_OFF we can switch to the states which are also possible by TX_ON state. Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
When transmit is done, indicated by trx_end irq, we do first a force state change to TX_ON and then checking the trac status, if the trac status is unequal zero we do a state change to TRX_OFF. This patch changes to the following behaviour, we first check on trac status after trx_end occurs and then doing a normal change to TX_ON without do the state change to TRX_OFF when trac status is unequal zero. The reasons are that the datasheet doesn't described when the trac status register is cleared, we should doing to evaluate the trac status at first. The reason to remove the TRX_OFF change if the trac status is unequal to zero and it was force is the following paragraph inside The at86rf2xx datasheets: "Using FORCE_PLL_ON to interrupt an TX_ARET transaction, it is recommended to check register bits [7:5] of register address 0x32 for value 0. If this value is different, TRX_CMD sequence FORCE_TRX_OFF shall be used immediately followed by TRX_CMD sequence PLL_ON. This performs a state transition to PLL_ON." The meaning is here "to interrupt an TX_ARET transaction" in case of trx_end interrupt the "TX_ARET transaction" is already done and we don't interrupt the "TX_ARET transaction" by doing the change to TX_ON (PLL_ON) here. Additional I changed the force change to normal TX_ON which seems to work here. Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Stefan Schmidt 提交于
The ESC dispatch value has some history and it originally was 0x7f in rfc4944 (see section-5.1). With the release of rfc6282 this value got part of the LOWPAN_IPHC range and was no longer available for ESC. Instead 0x40 was used as replacement (see section-2 in rfc6282). We have been checking the dispatch byte in an order where IPHC would always be evaluated before ESC and thus we would never reach the ESC check as the IPHC range already covers this value. Signed-off-by: NStefan Schmidt <stefan@osg.samsung.com> Acked-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch changes the return value of lowpan packet receive handler to the correct NET_RX_DROP instead RX_DROP. This issue was detected by sparse and reported from Marcel: net/ieee802154/6lowpan/rx.c:329:32: expected int net/ieee802154/6lowpan/rx.c:329:32: got restricted lowpan_rx_result ... Reported-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch removes a workaround for datagram_size calculation while doing fragmentation on transmit. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch remove the packet_type to host and leave the mac pkt_type. By running 'grep -r "pkt_type" net/ipv6', the IPv6 stack will evaluate this value for PACKET_BROADCAST. Instead of overwriting this value we will leave the mac value there which is broadcasts if the mac frame was a broadcast frame. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch adds frame control checks to check if the received frame is something which could contain a 6LoWPAN packet. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch adds checks for reserved dispatch value. When we have a reserved dispatch value we should drop the skb immediately. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch adds dummy handlers for all known IEEE 802.15.4 dispatch values which prints a warning that we don't support these dispatches right now. Also we add a warning to the RX_CONTINUE case inside of lowpan_rx_handlers_result which should now never happend. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch introduce an earlier check if a 6LoWPAN frame can be valid. This contains at first for checking if the header contains a dispatch byte and isn't the nalp dispatch value, which means it isn't a 6LoWPAN packet. Also we add a check if we can derference the dispatch value by checking if skb->len is unequal zero. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch complete reworks the evaluation of 6lowpan dispatch value by introducing a receive handler mechanism for each dispatch value. A list of changes: - Doing uncompression on-the-fly when FRAG1 is received, this require some special handling for 802.15.4 lltype in generic 6lowpan branch for setting the payload length correct. - Fix dispatch mask for fragmentation. - Add IPv6 dispatch evaluation for FRAG1. - Add skb_unshare for dispatch which might manipulate the skb data buffer. Cc: Jukka Rissanen <jukka.rissanen@linux.intel.com> Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
We should change the skb->dev pointer earlier to the lowpan interface Sometimes we call iphc_decompress which also use some netdev printout functionality. This patch will change that the correct interface will be displayed in this case, which should be the lowpan interface. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch moves some trivial checks at first before calling skb_share_check which could do some memcpy if the buffer is shared. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch cleanups the pull of the iphc bytes. We don't need to check if the skb->len contains two bytes, this will be checked by lowpan_fetch_skb_u8. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
We don't need to check if the wpan interface is running because the lowpan_rcv is the packet layer receive handler for the wpan interface. Instead doing a check if wpan interface is running we should check if the lowpan interface is running before starting 6lowpan adaptation layer. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This function is used internally inside of ieee802154 6lowpan module only and not outside of any other module. We don't need to export this function then. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
Internal mechanism by calling netdev_alloc which use kzalloc already sets these variables to zero. This patch cleanup the setup of net_device. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch removes one check on null which should be already done by checking before for ARPHRD_IEEE802154. All ARPHRD_IEEE802154 and ARPHRD_IEEE802154_MONITOR should have wdev->ieee802154_ptr, where ARPHRD_IEEE802154 is currently a node interface only. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
This patch moves the open count handling while doing open of a lowpan interface. We need the packet handler register at first when one lowpan interface is up. There exists a small case when all lowpan interfaces are down and the 802154 packet layer is still registered. To reduce some overhead we will register the packet layer when the first lowpan interface comes up and unregister when the last interface will become down. Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Alexander Aring 提交于
Inside the IEEE 802.15.4 6LoWPAN subsystem we use two interfaces which are wpan and lowpan interfaces. Instead of using always the variable name "dev" for both we rename the "dev" variable to wdev which means the wpan net_device and ldev which means a lowpan net_device. This avoids confusing and always looking back to see which net_device is meant by the variable name "dev". Reviewed-by: NStefan Schmidt <stefan@osg.samsung.com> Signed-off-by: NAlexander Aring <alex.aring@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Kieran Bingham 提交于
if btmrvl_tx_pkt() is called, and the branch if (skb_headroom(skb) < BTM_HEADER_LEN) evaluates positive, a new skb is allocated via skb_realloc_headroom. The original skb is stored in a tmp variable, before being free'd. However on success, the new skb, is not free'd, nor is it returned to the caller which will then double-free the original skb. This issue exists from the original driver submission in commit: #132ff4e5 If this code path had been alive, it would have been noted from the double-free causing a panic. All skb's here should be allocated through bt_skb_alloc which adds 8 bytes as headroom, which is plenty against the 4 bytes pushed on by this driver. This code path is dead, and buggy at the same time, so the cleanest approach is to remove the affected branch. Reported by coverity (CID 113422) Signed-off-by: NKieran Bingham <kieranbingham@gmail.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Simon Fels 提交于
With 9380f9ea the order of unsetting the HCI_USER_CHANNEL flag of the HCI device was reverted to ensure the device is first closed before making it available again. Due to hci_dev_close checking for HCI_USER_CHANNEL being set on the device it was never really closed and was kept opened. We're now calling hci_dev_do_close directly to make sure the device is correctly closed and we keep the correct order to unset the flag on our device object. Signed-off-by: NSimon Fels <simon.fels@canonical.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Don't hide this packet size error. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Implement runtime PM suspend/resume callbacks. If LPM supported, controller is put into supsend after a delay of inactivity (1s). Inactivity is based on LPM idle notification and host TX traffic. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Add PM suspend/resume callbacks which call lpm_suspend/resume. Add LPM ack in threaded IRQ handler to notify the controller that resume is complete. Protect hci_uart against concurrent removing during suspend/resume. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Add LPM PM suspend/resume/host_wake LPM functions. A LPM transaction is composed with a LPM request and ack/response. Host can send a LPM suspend/resume request to the controller which should respond with a LPM ack. If resume is requested by the controller (irq), host has to send a LPM ack once resumed. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Frederic Danis 提交于
Replace BT_ logging calls by the new bt_dev ones. Signed-off-by: NFrederic Danis <frederic.danis@linux.intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Frederic Danis 提交于
Replace spinlock by mutex to be able to use bcm_device_lock in sleepable context like devm_request_threaded_irq or upcomming PM support. Signed-off-by: NFrederic Danis <frederic.danis@linux.intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Marcel Holtmann 提交于
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
-
由 Loic Poulain 提交于
Replace the device_intel list spinlock with a mutex. devm_request_threaded_irq is not atomic and upcomming PM support should be simpler. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Replace BT_ logging calls by the new bt_dev ones. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Enable controller Low-Power-Mode if we have a pdev to manage host wake-up. Once LPM is enabled, controller notifies its TX status via a vendor specific packet (tx_idle/tx_active). tx_active means that there is more data upcoming from controller. tx_idle means that controller can be put in suspended state. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
An IRQ can be retrieved from the pdev resources. This irq will be used in case of LPM suspend mode to wake-up the host and resume the link. This resource can be declared as a GPIO-Interrupt which requires to be converted into IRQ. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-
由 Loic Poulain 提交于
Add specific bluetooth device logging macros since hci device name is repeatedly referred in bluetooth subsystem logs. Signed-off-by: NLoic Poulain <loic.poulain@intel.com> Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
-