summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/socketcan/socketcanbackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-06-101-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ie17b09db5a4aa7bb0d33906360f1125e9632425c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use up-to date LGPL license headerKai Köhne2021-11-301-11/+14
| | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Change-Id: I2dd25a1a7d6ad3e3cbb06753bbc839e26f4a7b26 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* CAN: Implement QCanBusDevice::deviceInfo() in the pluginsAndre Hartmann2021-08-051-7/+18
| | | | | | | | | | | | | | * PasstruCAN: Untested * PeakCAN: Tested on Windows with PCAN-USB Pro FD. * SocketCAN: Tested on Linux with virtual and real hardware. * SystecCAN: Tested on Windows with USBcanmodul2. * TinyCAN: Untested * VectorCAN: Tested with the virtual Vector interface. * VirtualCAN: Tested on Windows and Linux. Pick-to: 6.2 Change-Id: I3836a81a9cb1570a22b6264b34fca88ccc0ab57e Reviewed-by: André Hartmann <aha_1980@gmx.de>
* QCanBusDeviceInfo: Add method to obtain the plugin nameAndre Hartmann2021-07-231-1/+2
| | | | | | | | | | | | [ChangeLog][QCanBusDeviceInfo] Added the CAN bus plugin name to QCanBusDeviceInfo. Custom plugins must be adopted to the changed QCanBusDevice::createDeviceInfo() method. Pick-to: 6.2 Change-Id: I44d658aaa6f873eecce447dd9ee4539c9fbe2043 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* QCanBusDevice: Consolidate createDeviceInfo()Andre Hartmann2021-07-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This protected function is used from the CAN plugins to create QCanBusDeviceInfo objects. We want to add another parameter (plugin) to the function in a follow-up commit, so let's first remove unneeded overloads that were created during Qt 5 times and only keep the very simple and the all-embracing one. While at it, remove the std::move calls as clang gives performance warnings here: socketcanbackend.cpp:149:23: error: moving a temporary object prevents copy elision socketcanbackend.cpp:149:23: note: remove std::move call here Pick-to: 6.2 Change-Id: Ie83db3cd3a9d6b40b2da4a9ce736861a0ee8359f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CAN: Make functions that should be virtual suchAndre Hartmann2021-07-221-11/+1
| | | | | | | | | | | They were not during Qt 5 times due to our binary compatibility promise. Pick-to: 6.2 Change-Id: Ia5ddb114db9dc552515df5ab4b22d0c962a0a341 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Socketcan: fix typoEvgeny Shtanov2021-03-101-1/+1
| | | | | | Fixes: QTBUG-91703 Change-Id: I6d0099a75f03765a858f037b398db9d79de49ed3 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* QCanBusDevice: Replace int parameter with ConfigurationKeyAndre Hartmann2021-02-031-4/+4
| | | | | | | | | | | | | | | | | | They only place where this might break user code, is for custom plugins using custom configuration parameters. For most users however, this type safety makes the API easier to use. [ChangeLog][QCanBusDevice] All functions dealing with configuration parameters now take a QCanBusDevice::ConfigurationKey instead an int. Fixes: QTBUG-89839 Change-Id: I0a1de5fdcfc4292b23599d4770102740a2df1601 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* SocketCAN: Fix returning bitrate setting resultAndre Hartmann2021-01-281-1/+1
| | | | | | | | | | | | | | While this might not be the complete solution for QTBUG-89066, this obvious bug always led to the debug error message: "Cannot apply parameter: 4 with value: X." Pick-to: 5.15 Task-number: QTBUG-89066 Change-Id: Id3e518bc9687ee621e84cb961b230e1f00ee12b5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QList instead of QVectorJarek Kobus2020-08-171-3/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: I3a3cd127fb9fed7b25d543a9c5af75c734397806 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* SocketCAN: Virtual CAN devices don't have bus statusAndre Hartmann2020-03-271-0/+3
| | | | | | | | | | | | | At least libsocketcan does not provide a bus status for those. This patch prevents that CAN Example requests the status every two seconds. [ChangeLog][SocketCAN] QCanBusDevice::hasBusStatus() now returns false for virtual CAN devices. Change-Id: I214dfb320c999bb00c8ae93ddc9253efbe721969 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* SocketCAN: Fix compile with old Linux KernelsAndre Hartmann2020-03-191-24/+0
| | | | | | | | | | | | | | qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.h:91:5: error: ‘canfd_frame’ does not name a type That was already fixed earlier in 96d291cb, but broken again by e23f4ced. Fixes: QTBUG-82814 Change-Id: I8bfc4168165cf8e266b89e8327f88f862cf1b348 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Init API structs without memsetAndre Hartmann2020-02-241-7/+5
| | | | | | | | Continuation of a3aa54e Change-Id: Ic6daa7a754f3c869094770ea3e47a097bf4afa84 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* SocketCAN: Allow specifying the protocol to useAndre Hartmann2019-07-241-1/+11
| | | | | | | | | | | | | | | | So far, only CAN_RAW was allowed, but there might be cases where other protocols are useful too. The default value is still CAN_RAW, so all existing applications will continue working. [ChangeLog][SocketCAN] Added the configuration parameter QCanBusDevice::ProtocolKey to use another protocol inside the protocol family PF_CAN. Fixes: QTBUG-75204 Change-Id: I8323ab8d77a569f51d3cd8c296b433352a3f5609 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-231-0/+1
|\ | | | | | | Change-Id: If26de70aa60d2a033b0422feabfa0a0275e048bc
| * SocketCAN: Fix compiler error "‘SIOCGSTAMP’ was not declared"Andre Hartmann2019-07-091-0/+1
| | | | | | | | | | | | | | Fixes: QTBUG-76957 Change-Id: I8c4c86aa23137d67f5d20eedfe1c46a241c0632b Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Add QCanBusDevice::busStatus()Andre Hartmann2019-07-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | The original terminology is Error active, Error warning, Error Passive and Bus Off. We map them to GoodStatus, WarningStatus, ErrorStatus and BusOffStatus here. [ChangeLog][QCanBusDevice] Added the function busStatus() to query the CAN bus status from the CAN bus device. Fixes: QTBUG-70766 Change-Id: I22b99e2a02a6b22509005dd177796b861d536281 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add QCanBusDevice::resetController() for CAN controller resetAndre Hartmann2019-05-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently missing: * VectorCAN: no information in the documentation found * PassthroughCAN: no documentation [ChangeLog][QCanBus][QCanBusDevice] Added the function QCanBusDevice::resetController() to reset a CAN controller from bus off state, as far as supported by the various plugins. Fixes: QTBUG-54943 Change-Id: Ic098054b012726c0c69970c0ae84f434c2b3964a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | SocketCAN: Set and get bitrate by loading libsocketcan dynamicallyAndre Hartmann2019-02-221-0/+20
|/ | | | | | | | | | | | Can be extended for further functions from this library also. [ChangeLog][Plugins][SocketCAN] If libsocketcan is available, the CAN bus bitrate can be get and set at runtime. Fixes: QTBUG-54296 Change-Id: Ie677ddb5cf4ee9f99927973d837ef7a2810a2b37 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-0/+7
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibcb5508d7f131cbeba0d047111177a8dff1e5f68
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-01-181-0/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: If12daffe4655f71d9aea39e0ed9e0db405a09fe7
| | * SocketCAN: Compile with Kernels without CAN FD BRS/ESIAndre Hartmann2017-11-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][SocketCAN] Fixed compiling the SocketCAN plugin with older Kernels without support for CAN FD bitrate switch and error state indicator. Task-number: QTBUG-64406 Change-Id: I05a7869b7df64ae6c3c29aa69dbf423d886b610a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Add more info to QCanBusDeviceInfoAndre Hartmann2018-01-121-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added description, serial number and channel for SocketCAN, PeakCAN, SystecCAN, and VectorCAN plugins. For now, not all plugins do support all kind of information: SocketCAN: description and channel PeakCAN: description and channel (Windows PCANBasic >= 4.2.0) SystecCAN: description, serial number, and channel VectorCAN: description, serial number, and channel [ChangeLog][QCanBusDeviceInfo] Added description, serial number and channel to QCanBusDeviceInfo, as far as supported by the various plugins. Change-Id: Ib2292e06065eb91848f682ebf69a4cc968f4d4ba Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-1/+1
|\| | | | | | | | | | | Change-Id: Ia04f54eee1264b659d8928b7f08d7221f587bc54
| * | SocketCAN: Fix Clang semantic warning about old-style castAndre Hartmann2017-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semantic Issue -Wold-style-cast 433:17: warning: use of old-style cast Change-Id: I45ba127193a65ccca1bdf5453320fd4129666b20 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | CAN: Introduce categorized loggingAndre Hartmann2017-11-131-4/+7
|/ / | | | | | | | | | | | | | | | | | | [ChangeLog][CAN bus] Introduced categorized logging to the CAN bus module which can be enabled by the "qt.canbus" and "qt.canbus.plugins.<pluginname>" filters. Change-Id: Ib39c0b2ebcd967cd7812602190807ad3488ccb18 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | CAN: Use memset from root namespaceAndre Hartmann2017-07-051-4/+4
| | | | | | | | | | | | | | | | | | Most other code places already do it this way. Change-Id: Id1a2e262eae0bf46f6f42266c6cc57b92505ff1d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | SocketCAN: State more clearly that this is an errorAndre Hartmann2017-07-041-1/+1
| | | | | | | | | | | | Change-Id: I4df85ce5a1271bfe4a72bb9d5b979b6513a46b6a Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | SocketCAN: Remove commented code lineAndre Hartmann2017-07-041-1/+0
| | | | | | | | | | | | Change-Id: I59bde74ea887cf0898538267eb408892871cf82f Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QCanBusFrame: Introduce local echo flagAndre Hartmann2017-07-041-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspiration for change after reading the SocketCAN mailing list thread: https://marc.info/?l=linux-can&m=147438437202356&w=2 The main usage is, to verify at application stage, that and when a frame was really sent on the bus. For architectures like SocketCAN, where multiple applications can connect to one CAN bus on the same system, this flag also indicates frames that are sent by an other local running application (i.e. not coming from the real bus). Implementations done for SystecCAN, VectorCAN and SocketCAN plugin. PCAN Basic does not seem to have support for this flag. For SocketCAN, see section "4.1.7 RAW socket returned message flags" in https://www.kernel.org/doc/Documentation/networking/can.txt for reference. [ChangeLog][QCanBusFrame] Added local echo flag to mark all echo frames that are generated by the hardware on successful transmission to CAN bus as such. Change-Id: I66d4ce1ec6dfd0a0b994a7b7a9de1a5f503fcb70 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-041-2/+7
|\| | | | | | | Change-Id: I2c625ec3f8a6393fcd0d13dfddae55af7f549347
| * Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta1Liang Qi2017-03-311-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/canbus/canbus.pro src/plugins/canbus/vectorcan/vectorcanbackend.cpp Change-Id: I3625693784e88204c93479806242ae70c7ec7ff3
| | * Updated copyright headersAndre Hartmann2017-02-021-1/+1
| | | | | | | | | | | | | | | Change-Id: I7d38491c7ee15a1de788375acf9144c59b507d2a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | SocketCAN: Sort device info list by device nameAndre Hartmann2017-03-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the sorting depends on the directory structure in /sys/class/net/ Change-Id: I95cc3d5f5d88f16c3511a9594eb4c466f807ef71 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Unify endless loopsv5.9.0-alpha1Andre Hartmann2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the macro forever with its expansion "for (;;)", as forever will be deprecated in later Qt versions. Also change the place where another pattern "while (true)" was used, to have them unique (Vector and Systec already use "for (;;)". Change-Id: I3582f7b674c17c35c6954eb359bacf81d2c1faab Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | SocketCAN: Init field with C++11Andre Hartmann2017-04-031-3/+1
|/ / | | | | | | | | Change-Id: I642406970fe7a19a19e73bc4c7026d68d7e5c386 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-13/+6
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ie8bb65e2f51726a9a6108619d881263de1899b9c
| * SocketCAN: Fix frame write error handlingAndre Hartmann2017-01-231-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part I If ConfigurationParameter::CanFdKey is not set, the SocketCAN driver is not forced to CAN FD mode. Therefore, writing CAN FD frames fails, even if the bus (virtual or real) is CAN FD capable. The existing error handling code already checked this, but only if the CAN FD frame payload was longer than eight data bytes. Now the error message also appears when trying to write CAN FD frames with payload size 0...8. Part II In line 348, QCanBusFrame::isValid() is called. This function returns false if the payload size exceeds the frame's maximum payload length. The function SocketCanBackend::writeFrame then early returns with false. The maximum size error handling code is therefore no longer reached and can be removed. Change-Id: I9962a90fabd0678fe9040166b7c19946fbf6fd78 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
| * SocketCAN: Set unused can{fd}_frame fields to zero when writingAndre Hartmann2017-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | At the moment, this is most important for canfd_frame.flags. For other reserved fields this might be important later, too. Change-Id: I66013a5ddac1f2f21a03c28cdbe9ac6719a604ce Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CAN: Improve error handling codeAndre Hartmann2017-01-241-22/+24
| | | | | | | | | | | | | | | | | | | | | | * Add Q_UNLIKELY to error handling branches * Prefers qWarning("%ls", qUtf16Printable(str)) over qWarning() << str; Task-number: QTBUG-55045 Change-Id: I3e49380bdec0edb2ea00e1b5e3421464b295aacc Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CAN: Use C++11 class initialization where possibleDenis Shienkov2017-01-181-4/+1
| | | | | | | | | | Change-Id: I2aeeb762297707337273b0a1ecba8b3d13ed923f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CAN: Introduce CAN FD flag Error State Indicator (ESI)Andre Hartmann2017-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added hasErrorStateIndicator and setErrorStateIndicator to QCanBusFrame. * Setting QCanBusFrame::setErrorStateIndicator(true) also sets QCanBusFrame::setFlexibleDataRateFormat(true) * Setting QCanBusFrame::setFlexibleDataRateFormat(false) also sets QCanBusFrame::setErrorStateIndicator(false) [ChangeLog][QCanBusFrame] Added error state indicator flag to QCanBusFrame and set it appropriate receiving CAN FD frames with the SocketCAN plugin. Setting this flag for testing purposes is also possible. Change-Id: I406b693fc7b7cde8a0d6b2c34c1f313800f11203 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CAN: Introduce CAN FD Bitrate Switch (BRS)Andre Hartmann2017-01-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCanBusFrame: Added hasBitrateSwitch and setBitrateSwitch to QCanBusFrame and therefore, increased the QCanBusFrame version number. * Setting QCanBusFrame::setBitrateSwitch(true) also sets QCanBusFrame::setFlexibleDataRateFormat(true) * Setting QCanBusFrame::setFlexibleDataRateFormat(false) also sets QCanBusFrame::setBitrateSwitch(false) QCanBusDevice: Reference implementation and documentation are done for the SocketCAN plugin. The CAN Example allows to send frames with Bitrate Switch enabled and visualize received frames with Bitrate Switch set. Unfortunately, the SocketCAN plugin does not allow to change any bitrate yet, so the newly added data bitrate selection box in ConnectDialog seems a bit useless. This box is however needed once other plugins become CAN FD capable and implement bitrate switching. [ChangeLog][QCanBusFrame] Introduced flag to allow data bitrate switching for CAN FD frames. Reference implementation is done for the SocketCAN plugin. Task-number: QTBUG-56720 Change-Id: Ieab04020f4750c8b0085624d2250ad7cd982cd96 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-freeAndre Hartmann2017-01-111-4/+4
| | | | | | | | | | Change-Id: I4ec52799514b750c158e3cb8e6c38d1f1063c6c5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CAN: Add QCanBusDeviceInfoAndre Hartmann2017-01-101-1/+68
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Returns: * a list of available devices for the chosen plugin * if the device is virtual * if the device is CAN FD capable Use this list in the CAN Example for interface selection. If information about virtual channels or CAN FD capabability is not available, false is returned. For SocketCAN, PeakCAN, VectorCAN and SystecCAN, the implementation is completed. TinyCAN only return the list of possible interfaces for now. This is can be changed later, but needs quite some refactoring of the TinyCAN plugin. [ChangeLog][QtCanBus] Added the new class QCanBusDeviceInfo for enumeration of available CAN interfaces and more information about them. Task-number: QTBUG-54298 Change-Id: I851bcc3b9ee41aaaf1164c6b4a5aaf6503cd8746 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QCanBusFrame: add flag to identify CAN FD framesRolf Eike Beer2016-11-151-2/+3
| | | | | | | | Task-number: QTBUG-49675 Task-number: QTBUG-56720 Change-Id: Id24783c6ee1b81317d2e6d0965a9ed37987b47ec Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-191-2/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/canbus/peakcan/main.cpp src/plugins/canbus/tinycan/main.cpp Change-Id: Ia2dac20ddfc27ba96bb36cd70ba011e2d3764f2f
| * SocketCAN: Use qstrncpy instead strcpyAndre Hartmann2016-08-261-1/+1
| | | | | | | | | | | | | | | | * Copies at most sizeof(ifr_name) bytes * Guarantees that ifr_name is zero-terminated Change-Id: I68966767002dbe5f349ce9f03f34f4657d1827e9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * SocketCAN: Remove redundant includeAndre Hartmann2016-08-261-1/+0
| | | | | | | | | | | | | | qcanbusdevice.h is already included in socketcanbackend.h Change-Id: Ibcc50712c807b1e880b11d36e8dab08fcbcf9f2e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | SocketCAN: Clear time stamp with memsetAndre Hartmann2016-09-161-2/+1
| | | | | | | | | | Change-Id: I8e14836d29275f6edef43af0aa7a858db7f58639 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>