- 11 7月, 2016 2 次提交
-
-
由 Thierry Escande 提交于
When allocating chained I-PDUs, there is no need to call skb_reserve() since it's already done by digital_alloc_skb() and contains enough room for the driver head and tail data. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
This patch fixes the way an I-PDU is saved in case it needs to be sent again. It is now copied using pskb_copy() and not simply referenced using skb_get() since it could be modified by the driver. digital_in_send_saved_skb() and digital_tg_send_saved_skb() still get a reference on the saved skb which is re-sent but release it if the send operation fails. That way the caller doesn't have to take care about skb ref in case of error. RTOX supervisor PDU must not be saved as this can override a previously saved I-PDU that should be re-sent later on. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 06 7月, 2016 12 次提交
-
-
由 Thierry Escande 提交于
With this patch, the Digital Protocol layer abort the last issued command when the dep link goes down. That way it does not have to wait for the driver to reply with a timeout error before sending a new command (i.e. a start poll command if constant polling is on). Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
There is a flag in the command structure indicating that this command is pending. It was checked before sending the command to not send the same command twice but it was actually never set. This is now fixed. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
With this patch, when freeing the command queue in the module unregister function, the callbacks of the commands still queued are called with a ENODEV error. This gives a chance to the command issuer to free any memory it could have allocate. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
The Digital Protocol stack used to send a NACK frame whatever the error type it receives in digital_in_recv_dep_res(). It actually should only send a NACK frame on CRC or parity check errors or on any transmission error if a NACK frame was previously sent. Existing drivers used to send EIO error for this kind of issues so this patch limits sending of NACK frames on EIO errors. All other errors will be reported to the upper layers. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
When configured as a target listening for a SENSF_REQ poll command, a nfcid2 array was allocated for no reason leading to a memory leak. The nfcid2 is sent by the target in the SENSF_RES reply. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
The nfcsim driver now depends on the Digital layer. This patch adds the missing dependency on NFC_DIGITAL for NFC_SIM config. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
If a command is still being processed by the device, the switch RF off command will be rejected. With this patch, the port100 driver calls port100_abort_cmd() before sending the switch RF off command. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
This patch makes the abort_cmd function synchronous. This allows the caller to immediately send a new command after abort_cmd() returns. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
The USB out_urb used to send commands to the device can be submitted through the standard command processing queue coming from the Digital Protocol layer but it can also be submitted from port100_abort_cmd(). To not submit the URB while already active, a mutex is now used to protect it and a cmd_cancel flag is used to not send command while canceling the previous one. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
This patch ensures that a command is not still in process before sending a new one to the device. This can happen when neard is in constant polling mode: the configure_hw command can be sent when neard restarts polling after a LLCP SYMM timeout but before the device has returned in timeout from the last DEP frame sent. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
Once copied into the sk_buff data area using llcp_add_tlv(), the allocated TLVs must be freed. With this patch nfc_llcp_send_connect() and nfc_llcp_send_cc() don't return immediately on success and now free the allocated TLVs. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
In functions using llcp_add_tlv(), a skb pointer could be set to NULL and then reuse afterward. With this patch, the skb pointer returned by llcp_add_tlv() is ignored since it can only be the passed skb pointer or NULL when the passed TLV is NULL. There is also no need to check for the TLV pointer as this is done by llcp_add_tlv(). Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 04 7月, 2016 9 次提交
-
-
由 Thierry Escande 提交于
With this complete rewrite, the loopback nfcsim driver now relies on the Digital layer of the nfc stack. As with the previous version, 2 nfc devices are declared when the driver is initialized. The driver supports the NFC_DEP protocol in NFC-A and NFC-F technologies. The 2 devices are using a pair of virtual links for sk_buff exchange. The out-link of one device is the in-link of the other and conversely. To receive data, a device calls nfcsim_link_recv_skb() on its in-link and waits for incoming data on a wait queue. To send data, a device calls nfcsim_link_send_skb() on its out-link which stores the passed skb and signals its wait queue. If the peer device was in the nfcsim_link_recv_skb() call, it will be signaled and will be able to pass the received sk_buff up to the Digital layer. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
LLCP skb tx and rx functions now use print_hex_dump_debug() making these verbose traces controllable using dynamic debug. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
This replaces the polling work struct with a delayed work struct and add a 10 ms delay between 2 poll cycles. This avoids to flood the device with 'switch off'/'switch on' commands. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Thierry Escande 提交于
When setting the driver framing as NFC_DIGITAL_FRAMING_NFCF_NFC_DEP it used to be already configured as NFC_DIGITAL_FRAMING_NFCF which is the same. So this entry was empty in the in_protocols table. Now that the digital stack can handle PLS requests, it can be changed on the fly from NFC_DIGITAL_FRAMING_NFCA_NFC_DEP. This patch explicitly defines the framing configuration values for NFC_DIGITAL_FRAMING_NFCF_NFC_DEP. Signed-off-by: NThierry Escande <thierry.escande@collabora.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Geoff Lansberry 提交于
Signed-off-by: NGeoff Lansberry <geoff@kuvee.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Geert Uytterhoeven 提交于
drivers/nfc/fdp/fdp.c: In function ‘fdp_nci_patch_otp’: drivers/nfc/fdp/fdp.c:373: warning: comparison is always false due to limited range of data type drivers/nfc/fdp/fdp.c: In function ‘fdp_nci_patch_ram’: drivers/nfc/fdp/fdp.c:444: warning: comparison is always false due to limited range of data type fdp_nci_create_conn() may return a negative error code, which is silently ignored by assigning it to a u8. Change conn_id from u8 to int to fix this. Fixes: a06347c0 ("NFC: Add Intel Fields Peak NFC solution driver") Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Dan Carpenter 提交于
We can't pass devm_ allocated pointers to kfree() because they will be freed again after the drive is unloaded. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Denys Vlasenko 提交于
It used to be EXPORTed, but then EXPORT usage was cleaned up (in 2012), without noticing that the function has no users at all (and curiously, never had any users). Delete it. While at it, remove non-static "inline" hints on nearby functions: these hints don't work across compilation units anyway, and these functions are not used in their .c file, thus they are never inlined. IOW: "inline" here does not help in any way. Signed-off-by: NDenys Vlasenko <dvlasenk@redhat.com> CC: Samuel Ortiz <sameo@linux.intel.com> CC: Christophe Ricard <christophe.ricard@gmail.com> CC: linux-wireless@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Colin Ian King 提交于
When info->ram_patch is released info->otp_patch is being set to NULL rather than info->ram_patch. I believe this is a cut-n-paste bug from almost identical code proceeding it that uses the same idiom for info->otp_patch. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 03 7月, 2016 17 次提交
-
-
由 John Crispin 提交于
commit 80673029 ("net-next: mediatek: add support for IRQ grouping") failed to properly update the irq handling inside mtk_poll_controller() causing compile errors if netconsole was enabled. Fix this by updating the code to use the new separated irq handler function for RX. Signed-off-by: NJohn Crispin <john@phrozen.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Jiri Pirko says: ==================== mlxsw: Lay the groundwork for the introduction of router interfaces This is first patchset on a way to introduce ipv4 routing offload support in mlxsw driver. Does preparations before router interfaces will be introduced in mlxsw. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jiri Pirko 提交于
ip2me: To instruct HW to send trapped ip2me traffic to kernel, we have to add this trap. Selection ip2me traffic is introduced later on in this set. ARPs: We are going to stop flooding to CPU port when netdev isn't bridged and only get packets destined to the netdev's IP address and certain control packets. Add traps for ARP request (broadcast) and response (unicast) in order to get these to the CPU and resolve neighbours. host miss: If a packet is routed through a directly connected route and its destination IP is not in the device's neighbour table, then we need to trap it to CPU. This will cause the host to resolve the MAC of the neighbour, which will be eventually programmed to the device's table. router ingress: In order to trap packets in router part. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
When removing packet traps we should use action 'discard' instead of 'forward', as some trap IDs we'll add cannot be configured with the later. However, result is the same, as packets are not trapped to the CPU. In the future we will be able to reverse the operation properly by detaching the trap group from the CPU. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
Add the Router Interface Table Register (RITR), which allows us to create and configure router interfaces (RIFs). Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
Incoming packets are directed to the router when they match an FDB entry with action forward to IP router. Add this action, which was mistakenly named "TRAP". Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
When enabling the router in the device we will represent L3 netdevs using router interfaces (RIFs). These will be specified whenever programming routes or neighbours on the netdev. Introduce the basic RIF infrastructure which allows one to lookup a RIF by its netdev. Later patches in the series will extend this, but the basic routines are needed now in order to direct traffic to CPU. Pointers to the RIF structs are stored in an array indexed by the RIF's number. This will allow us to efficiently update the kernel's neighbour table when regularly dumping the device's table. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
Create a skeleton router file and do basic HW initialization of router. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
During ports initialization a net device is registered for each available port, which implies the port is usable. However, a port is only usable after the different parts of the device (e.g. flooding, buffers) are initialized. This is especially important now, when we must initialize the router before the ports, as otherwise the device can't be initialized. Solve that by initializing the switch ports at the end of init sequence. Also, remove an unnecessary warning about port up/down events, which would otherwise be invoked whenever removing the driver, as ports are removed before unregistering the listener for these events. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
Add the Router General Configuration Register (RGCR), which allows us to enable the router in the device and configure its various parameters. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
We are going to assign router interfaces (RIFs) to netdevs if an IPv4 address was assigned to them. If one was assigned to a port netdev, this will translate to the PVID vPort being member in a RIF. While it's possible for a LAG slave to have an IP address, we can't have a vPort being member in two FIDs (assuming the LAG device will be put in bridge / assigned an IP address). Solve that by making the PVID vPort leave any FID it might be a member in when joining / leaving LAG. Note that the PVID vPort is the only vPort that can be present on the port when it's put under LAG. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
When VLAN devices are created on top of LAG, their underlying vPorts are configured correctly with LAG membership. However, the PVID vPort is implicit and already present when the port netdev is put under LAG, so its LAG membership is never set. Set it correctly when joining / leaving LAG. This didn't matter until now, but we are going to introduce support for router interfaces (RIFs), which need to take into account LAG membership. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
When port isn't bridged it is still possible to invoke switchdev ops and configure the device's VLAN filters. However, this will require us to use different Router InterFaces (RIFs) for the same netdev, instead of one per-netdev as with any other configuration. Taking the above into account and the fact that this functionality is questionable with regards to the device's normal use-case, remove it and instead return an error. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ido Schimmel 提交于
Port netdevs (e.g. swXpY) that are not bridged are represented in the device using a vPort with VID=PVID=1 (the PVID vPort), as untagged packets entering the switch are internally tagged with the PVID VLAN. When these packets are routed through a different port netdev they should egress untagged. This wasn't a problem until now, as non-bridged traffic only originated from the CPU, which transmits packets out of the port as-is. When a vPort is created with VID 1 mark it as egress untagged. Signed-off-by: NIdo Schimmel <idosch@mellanox.com> Signed-off-by: NJiri Pirko <jiri@mellanox.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Michael Chan says: ==================== bnxt_en updates for net-next. Mostly small miscellaneous changes. Please review for net-next. Thanks. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Michael Chan 提交于
The allowable range is 0.25 seconds to 1 second interval. Default is 1 second. Signed-off-by: NMichael Chan <michael.chan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Michael Chan 提交于
This is useful for multi-function devices. Signed-off-by: NMichael Chan <michael.chan@broadcom.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-