aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2014-12-02bridge: move private brport flags to if_bridge.h so port drivers can use flagsScott Feldman1-10/+0
Signed-off-by: Scott Feldman <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Acked-by: Florian Fainelli <[email protected] Signed-off-by: David S. Miller <[email protected]>
2014-12-02bridge: add API to notify bridge driver of learned FBD on offloaded deviceScott Feldman2-2/+92
When the swdev device learns a new mac/vlan on a port, it sends some async notification to the driver and the driver installs an FDB in the device. To give a holistic system view, the learned mac/vlan should be reflected in the bridge's FBD table, so the user, using normal iproute2 cmds, can view what is currently learned by the device. This API on the bridge driver gives a way for the swdev driver to install an FBD entry in the bridge FBD table. (And remove one). This is equivalent to the device running these cmds: bridge fdb [add|del] <mac> dev <dev> vid <vlan id> master This patch needs some extra eyeballs for review, in paricular around the locking and contexts. Signed-off-by: Scott Feldman <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02bridge: call netdev_sw_port_stp_update when bridge port STP status changesScott Feldman2-0/+26
To notify switch driver of change in STP state of bridge port, add new .ndo op and provide switchdev wrapper func to call ndo op. Use it in bridge code then. Signed-off-by: Scott Feldman <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Andy Gospodarek <[email protected]> Acked-by: Thomas Graf <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02net-sysfs: expose physical switch id for particular deviceJiri Pirko1-0/+24
Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Thomas Graf <[email protected]> Acked-by: John Fastabend <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02rtnl: expose physical switch id for particular deviceJiri Pirko1-1/+25
The netdevice represents a port in a switch, it will expose IFLA_PHYS_SWITCH_ID value via rtnl. Two netdevices with the same value belong to one physical switch. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Thomas Graf <[email protected]> Acked-by: John Fastabend <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02net: introduce generic switch devices supportJiri Pirko5-0/+55
The goal of this is to provide a possibility to support various switch chips. Drivers should implement relevant ndos to do so. Now there is only one ndo defined: - for getting physical switch id is in place. Note that user can use random port netdevice to access the switch. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Thomas Graf <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02net: rename netdev_phys_port_id to more generic nameJiri Pirko3-5/+5
So this can be reused for identification of other "items" as well. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Thomas Graf <[email protected]> Acked-by: John Fastabend <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02net: make vid as a parameter for ndo_fdb_add/ndo_fdb_delJiri Pirko3-44/+49
Do the work of parsing NDA_VLAN directly in rtnetlink code, pass simple u16 vid to drivers from there. Signed-off-by: Jiri Pirko <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Acked-by: John Fastabend <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02bridge: convert flags in fbd entry into bitfieldsJiri Pirko1-3/+3
Suggested-by: Florian Fainelli <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02bridge: rename fdb_*_hw to fdb_*_hw_addr to avoid confusionJiri Pirko1-7/+7
The current name might seem that this actually offloads the fdb entry to hw. So rename it to clearly present that this for hardware address addition/removal. Signed-off-by: Jiri Pirko <[email protected]> Acked-by: Andy Gospodarek <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-02NFC: NCI: Fix max length of General Bytes in ATR_RESJulien Lefrique1-5/+3
The maximum size of ATR_REQ and ATR_RES is 64 bytes. The maximum number of General Bytes is calculated by the maximum number of data bytes in the ATR_REQ/ATR_RES, substracted by the number of mandatory data bytes. ATR_REQ: 16 mandatory data bytes, giving a maximum of 48 General Bytes. ATR_RES: 17 mandatory data bytes, giving a maximum of 47 General Bytes. Regression introduced in commit a99903ec. Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Fix warning: cast to restricted __le16Christophe Ricard1-1/+1
Fixing: net/nfc/nci/ntf.c:106:31: warning: cast to restricted __le16 message when building with make C=1 CF=-D__CHECK_ENDIAN__ Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: Fix warning "warning: incorrect type in assignment"Christophe Ricard1-2/+4
Fix warnings: net/nfc/llcp_commands.c:421:14: warning: incorrect type in assignment (different base types) net/nfc/llcp_commands.c:421:14: expected unsigned short [unsigned] [usertype] miux net/nfc/llcp_commands.c:421:14: got restricted __be16 net/nfc/llcp_commands.c:477:14: warning: incorrect type in assignment (different base types) net/nfc/llcp_commands.c:477:14: expected unsigned short [unsigned] [usertype] miux net/nfc/llcp_commands.c:477:14: got restricted __be16 Procedure to reproduce: make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: hci: Add specific hci macro to not create a pipeChristophe Ricard1-0/+3
Some pipe are only created by other host (different than the Terminal Host). The pipe values will for example be notified by NFC_HCI_ADM_NOTIFY_PIPE_CREATED. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: Add se_io NFC operandChristophe Ricard1-1/+46
se_io allows to send apdu over the CLF to the embedded Secure Element. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: netlink: Add new netlink command NFC_CMD_ACTIVATE_TARGETChristophe Ricard1-0/+30
Some tag might get deactivated after some read or write tentative. This may happen for example with Mifare Ultralight C tag when trying to read the last 4 blocks (starting block 0x2c) configured as write only. NFC_CMD_ACTIVATE_TARGET will try to reselect the tag in order to detect if it got remove from the field or if it is still present. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Add support for different NCI_DEACTIVATE_TYPEChristophe Ricard1-4/+6
nci_rf_deactivate_req only support NCI_DEACTIVATE_TYPE_IDLE_MODE. In some situation, it might be necessary to be able to support other NCI_DEACTIVATE_TYPE such as NCI_DEACTIVATE_TYPE_SLEEP_MODE in order for example to reactivate the selected target. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Add management for NCI state for machine rf_deactivate_ntfChristophe Ricard1-4/+14
A notification for rf deaction can be IDLE_MODE, SLEEP_MODE, SLEEP_AF_MODE and DISCOVERY. According to each type and the NCI state machine is different (see figure 10 RF Communication State Machine in NCI specification) Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Add status byte management in case of error.Christophe Ricard1-2/+9
The nci status byte was ignored. In case of tag reading for example, if the tag is removed from the antenna there is no way for the upper layers (aka: stack) to get inform about such event. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02Bluetooth: Track both local and remote L2CAP fixed channel maskJohan Hedberg1-19/+18
To pave the way for future fixed channels to be added easily we should track both the local and remote mask on a per-L2CAP connection (struct l2cap_conn) basis. So far the code has used a global variable in a racy way which anyway needs fixing. This patch renames the existing conn->fixed_chan_mask that tracked the remote mask to conn->remote_fixed_chan and adds a new variable conn->local_fixed_chan to track the local mask. Since the HS support info is now available in the local mask we can remove the conn->hs_enabled variable. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2014-12-02NFC: hci: Add support for NOTIFY_ALL_PIPE_CLEAREDChristophe Ricard1-0/+3
When switching from UICC to another, the CLF may signals to the Terminal Host that some existing pipe are cleared for future update. This notification needs to be "acked" by the Terminal Host with a ANY_OK message. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: hci: Add open pipe command handlerChristophe Ricard1-0/+39
If our terminal connect with other host like UICC, it may create a pipe with us, the host controller will notify us new pipe created, after that UICC will open that pipe, if we don't handle that request, UICC may failed to continue initialize which may lead to card emulation feature failed to work Signed-off-by: Arron Wang <[email protected]> Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Add se_io NCI operandChristophe Ricard1-0/+14
se_io allows to send apdu over the CLF to the embedded Secure Element. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Update nci_disable_se to run proprietary commands to disable a ↵Christophe Ricard1-0/+5
secure element Some NFC controller using NCI protocols may need a proprietary commands flow to disable a secure element Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Update nci_enable_se to run proprietary commands to enable a ↵Christophe Ricard1-0/+5
secure element Some NFC controller using NCI protocols may need a proprietary commands flow to enable a secure element Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Update nci_discover_se to run proprietary commands to discover all ↵Christophe Ricard1-0/+5
available secure element Some NFC controller using NCI protocols may need a proprietary commands flow to discover all available secure element Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: nci: Fix sparse: symbol 'nci_get_prop_rf_protocol' was not declared.Christophe Ricard1-1/+1
Fix sparse warning introduced by commit: 9e87f9a9c4c4754508b2c2638fbde9e10c7a103b It was generating the following warning: net/nfc/nci/ntf.c:170:7: sparse: symbol 'nci_get_prop_rf_protocol' was not declared. Should it be static? Procedure to reproduce it: # apt-get install sparse git checkout 9e87f9a9c4c4754508b2c2638fbde9e10c7a103b make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-02NFC: hci: Add se_io HCI operandChristophe Ricard1-0/+14
se_io allows to send apdu over the CLF to the embedded Secure Element. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-12-01Merge branch 'for-upstream' of ↵John W. Linville8-40/+80
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2014-12-01sunrpc: release svc_pool_map reference when serv allocation failsJeff Layton1-5/+7
Currently, it leaks when the allocation fails. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2014-12-01sunrpc: eliminate the XPT_DETACHED flagJeff Layton1-3/+1
All it does is indicate whether a xprt has already been deleted from a list or not, which is unnecessary since we use list_del_init and it's always set and checked under the sv_lock anyway. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2014-11-29rtnetlink: release net refcnt on error in do_setlink()Nicolas Dichtel1-0/+1
rtnl_link_get_net() holds a reference on the 'struct net', we need to release it in case of error. CC: Eric W. Biederman <[email protected]> Fixes: b51642f6d77b ("net: Enable a userns root rtnl calls that are safe for unprivilged users") Signed-off-by: Nicolas Dichtel <[email protected]> Reviewed-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-11-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller15-44/+83
2014-11-28netfilter: nf_log_ipv6: correct typo in module descriptionSteven Noonan1-1/+1
It incorrectly identifies itself as "IPv4" packet logging. Signed-off-by: Steven Noonan <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2014-11-28mac80211: add ieee80211_tx_status_noskbFelix Fietkau2-0/+72
This can be used by drivers that cannot reliably map tx status information onto specific skbs. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac0211: add a helper function for fixing up tx status ratesFelix Fietkau1-19/+33
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac80211: pass tx info to ieee80211_lost_packet instead of an skbFelix Fietkau1-4/+3
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac80211: minstrel_ht: switch to .tx_status_noskbFelix Fietkau1-4/+4
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac80211: minstrel: switch to .tx_status_noskbFelix Fietkau1-3/+2
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac80211: add tx_status_noskb to rate_control_opsFelix Fietkau1-1/+5
This op works like .tx_status, except it does not need access to the skb. This will be used by drivers that cannot match tx status information to specific packets. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac80211: minstrel_ht: move aggregation check to .get_rate()Felix Fietkau1-3/+4
Preparation for adding a no-skb tx status path Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28cfg80211: remove unneeded initialisations in nl80211_set_regJohannes Berg1-3/+3
Some variables are assigned unconditionally, remove their initialisations to help avoid introducing errors later. Signed-off-by: Johannes Berg <[email protected]>
2014-11-28cfg80211: leave invalid channels on regdomain changeArik Nemtsov2-1/+120
When the regulatory settings change, some channels might become invalid. Disconnect interfaces acting on these channels, after giving userspace code a grace period to leave them. This mode is currently opt-in, and not all interface operating modes are supported for regulatory-enforcement checks. A wiphy that wishes to use the new enforcement code must specify an appropriate regulatory flag, and all its supported interface modes must be supported by the checking code. Signed-off-by: Arik Nemtsov <[email protected]> Reviewed-by: Luis R. Rodriguez <[email protected]> [fix some indentation, typos] Signed-off-by: Johannes Berg <[email protected]>
2014-11-28mac80211: add more missing checks for VHT tx ratesFelix Fietkau2-2/+3
Fixes a crash on attempting to calculate the frame duration for a VHT packet (which needs to be handled by hw/driver instead). Reported-by: Jouni Malinen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-11-28NFC: NCI: Signal deactivation in Target modeJulien Lefrique1-1/+16
Before signaling the deactivation, send a deactivation request if in RFST_DISCOVERY state because neard assumes polling is stopped and will try to restart it. Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-11-28NFC: NCI: Handle Discovery deactivation typeJulien Lefrique1-1/+4
When the deactivation type reported by RF_DEACTIVATE_NTF is Discovery, go in RFST_DISCOVERY state. The NFCC stays in Poll mode and/or Listen mode. Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-11-28NFC: Fix a memory leakJulien Lefrique1-1/+4
Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-11-28NFC: NCI: Forward data received in Target mode to nfc coreJulien Lefrique1-1/+12
Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-11-28NFC: NCI: Implement Target mode send functionJulien Lefrique1-0/+13
As specified in NCI 1.0 and NCI 1.1, when using the NFC-DEP RF Interface, the DH and the NFCC shall only use the Static RF Connection for data communication with a Remote NFC Endpoint. Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2014-11-28NFC: NCI: Configure ATR_RES general bytesJulien Lefrique1-1/+9
The Target responds to the ATR_REQ with the ATR_RES. Configure the General Bytes in ATR_RES with the first three octets equal to the NFC Forum LLCP magic number, followed by some LLC Parameters TLVs described in section 4.5 of [LLCP]. Signed-off-by: Julien Lefrique <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>