aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25 (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2015-12-04mac80211: catch queue stop underflowJohannes Berg1-2/+5
If some code stops the queues more times than having started (for when refcounting is used), warn on and reset the counter to 0 to avoid blocking forever. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: properly free TX skbs when monitor TX failsJohannes Berg1-1/+1
We need to free all skbs here, not just the one we peeked from the list. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: properly free skb when r-o-c for TX failsJohannes Berg1-1/+1
When freeing the TX skb for an off-channel TX, use the correct API to also free the ACK skb that might have been allocated. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04Revert "mac80211: don't advertise NL80211_FEATURE_FULL_AP_CLIENT_STATE"Johannes Berg1-1/+2
This reverts commit 45bb780a2147b9995f3d288c44ecb87ca8a330e2, the previous two patches fixed the functionality. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: handle add_station auth/assoc flag quirksJohannes Berg2-14/+19
When a new station is added to AP/GO interfaces the default behaviour is for it to be added authenticated and associated, due to backwards compatibility. To prevent that, the driver must be able to do that (setting the NL80211_FEATURE_FULL_AP_CLIENT_STATE feature flag) and userspace must set the flag mask to auth|assoc and clear the set. Handle this quirk in the API entirely in nl80211, and always push the full flags to the drivers. NL80211_FEATURE_FULL_AP_CLIENT_STATE is still required for userspace to be allowed to set the mask including those bits, but after checking that add both flags to the mask and set in case userspace didn't set them otherwise. This obsoletes the mac80211 code handling this difference, no other driver is currently using these flags. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: use NL80211_ATTR_STA_AID in nl82011_set_stationAyala Beker1-2/+2
Fix nl80211_set_station() to use the value of NL80211_ATTR_STA_AID attribute instead of NL80211_ATTR_PEER_AID attribute. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: Add support for aborting an ongoing scanVidyullatha Kanchanapally1-0/+6
This commit adds implementation for abort scan in mac80211. Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com> Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com> [adjust to wdev change in previous patch and clean up code a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: Add support for aborting an ongoing scanVidyullatha Kanchanapally5-0/+47
Implement new functionality for aborting an ongoing scan. Add NL80211_CMD_ABORT_SCAN to the nl80211 interface. After aborting the scan, driver shall provide the scan status by calling cfg80211_scan_done(). Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com> Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com> [change command to take wdev instead of netdev so that it can be used on p2p-device scans] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: add new IEEE80211_VIF_GET_NOA_UPDATE flagJanusz.Dziedzic@tieto.com2-2/+8
Add new VIF flag, that will allow get NOA update notification when driver will request this, even this is not pure P2P vif (eg. STA vif). Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211_hwsim: do not actively scan DFS channelsJohannes Berg1-1/+2
We had another change to fix this in mac80211, but the hwsim "hardware" scan should also be fixed. Obviously this one isn't important since it's not real hardware, but we'd better be consistent. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: Remove unused cfg80211_can_use_iftype_chan()Michal Sojka2-121/+0
Last caller of this function was removed in 3.17 in commit 97dc94f1d933c9df2c0b327066ea130c0e92083f. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: reg: Remove unused function parameterMichal Sojka1-4/+3
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: add atomic uploaded keys iteratorEliad Peller4-4/+79
add ieee80211_iter_keys_rcu() to iterate over uploaded keys in atomic context (when rcu is locked) The station removal code removes the keys only after calling synchronize_net(), so it's not safe to iterate the keys at this point (and postponing the actual key deletion with call_rcu() might result in some badly-ordered ops calls). Add a flag to indicate a station is being removed, and skip the configured keys if it's set. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: allow the driver to send EOSP when neededEmmanuel Grumbach3-43/+148
This can happen when the driver needs to send less frames than expected and then needs to close the SP. Mac80211 still needs to set the more_data properly based on its buffer state (ps_tx_buffer and buffered frames on other TIDs). To that end, refactor the code that delivers frames upon uAPSD trigger frames to be able to get only the more_data bit without actually delivering those frames in case the driver is just asking to set a NDP with EOSP and MORE_DATA bit properly set. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: ocb: Fix null pointer deref if join_ocb is unimplementedOla Olsson1-0/+3
Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04nl80211: clarify NL80211_ATTR_SCHED_SCAN_DELAY usage with net-detectLuca Coelho1-2/+3
In this attribute's documentation, it was not clear whether the delay started counting when WoWLAN net-detect was enabled or when the system was suspended. The correct answer is that it starts when the system suspends (which is when, in practice, the scan is scheduled). Clarify that in the nl80211.h documentation. Suggested-by: Samuel Tan <samueltan@google.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: remove string from unaligned packet warningJohannes Berg1-2/+1
This really should never happen except very early in the process of bringing up a new driver, at which point you'll have to add more debugging in the driver and this string isn't useful. Remove it and save some size (when it's even compiled in.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04lib80211: ratelimit key index mismatchJohannes Berg2-4/+4
This indicates a driver key selection issue, but even then there's no point in printing it all the time, so ratelimit it. Also remove the priv pointer from it -- people debugging will only have a single device anyway and it's useless as anything but a cookie. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: mesh: print MAC address instead of pointerJohannes Berg1-2/+2
There's no point in printing the mpath pointer since it can't be used for anything - print the MAC address instead (like in the forwarding case.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: replace ieee80211_ie_split() with an inlineJohannes Berg2-9/+5
The function is a very simple wrapper around another one, just adds a few default parameters, so replace it with a static inline instead of using EXPORT_SYMBOL, reducing the module size slightly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: add complete data to station add/change tracingJohannes Berg1-0/+38
Complete the tracepoint with the missing data - it's not printed by default (a lot of it is dynamic arrays) but will be recorded and be available during post-processing. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04cfg80211: Add missing tracing to cfg80211Ilan Peer3-5/+108
Add missing tracing for: 1. start_radar_detection() 2. set_mcast_rates() 3. set_coalesce() Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-04mac80211: allow driver to prevent two stations w/ same addressJohannes Berg3-2/+23
Some devices or drivers cannot deal with having the same station address for different virtual interfaces, say as a client to two virtual AP interfaces. Rather than requiring each driver with a limitation like that to enforce it, add a hardware flag for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-02mac80211: fix off-channel mgmt-tx uninitialized variable usageJohannes Berg1-2/+6
In the last change here, I neglected to update the cookie in one code path: when a mgmt-tx has no real cookie sent to userspace as it doesn't wait for a response, but is off-channel. The original code used the SKB pointer as the cookie and always assigned the cookie to the TX SKB in ieee80211_start_roc_work(), but my change turned this around and made the code rely on a valid cookie being passed in. Unfortunately, the off-channel no-wait TX path wasn't assigning one at all, resulting in an uninitialized stack value being used. This wasn't handed back to userspace as a cookie (since in the no-wait case there isn't a cookie), but it was tested for non-zero to distinguish between mgmt-tx and off-channel. Fix this by assigning a dummy non-zero cookie unconditionally, and get rid of a misleading comment and some dead code while at it. I'll clean up the ACK SKB handling separately later. Fixes: 3b79af973cf4 ("mac80211: stop using pointers as userspace cookies") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-02mac80211: do not actively scan DFS channelsAntonio Quartulli1-4/+5
DFS channels should not be actively scanned as we can't be sure if we are allowed or not. If the current channel is in the DFS band, active scan might be performed after CSA, but we have no guarantee about other channels, therefore it is safer to prevent active scanning at all. Cc: stable@vger.kernel.org Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-12-02mac80211: don't teardown sdata on sdata stopEliad Peller1-1/+1
Interfaces are being initialized (setup) on addition, and torn down on removal. However, p2p device is being torn down when stopped, resulting in the next p2p start operation being done on uninitialized interface. Solve it by calling ieee80211_teardown_sdata() only on interface removal (for the non-netdev case). Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> [squashed in fix to call teardown after unregister] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-11-24sh_eth: Remove obsolete r8a777x-ether platform_device_id entryGeert Uytterhoeven1-3/+0
Since commit 3d7608e4c169af03 ("ARM: shmobile: bockw: remove legacy board file and config"), R-Car Gen1 SoCs are only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the corresponding platform_device_id entry. Protect sh_eth_set_rate_r8a777x() and r8a777x_data by #ifdef CONFIG_OF, as they're now referenced on DT platforms only. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24sh_eth: Remove obsolete r8a7740-gether platform_device_id entryGeert Uytterhoeven1-63/+62
Since commit 1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code for Armadillo-800 EVA"), r8a7740 is only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the corresponding platform_device_id entry. Protect r8a7740_data by #ifdef CONFIG_OF as it's now referenced on DT platforms only. Move it to a more logical position, in front of the r8a777x support, so we can have a single #ifdef covering all r7s* and r8a* support soon. This requires moving a few helper functions, too. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24sh_eth: Remove obsolete r8a779x-ether platform_device_id entriesGeert Uytterhoeven1-4/+2
Since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove legacy board support"), R-Car Gen2 SoCs are only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the corresponding platform_device_id entry. Protect r8a779x_data by #ifdef CONFIG_OF as it's now referenced on DT platforms only. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24sh_eth: Remove obsolete r7s72100-ether platform_device_id entryGeert Uytterhoeven1-41/+42
Since commit 05104c266ae9a167 ("ARM: shmobile: r7s72100: genmai: Remove legacy board file"), r7s72100 is only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the corresponding platform_device_id entry. Protect r7s72100_data by #ifdef CONFIG_OF as it's now referenced on DT platforms only. Move it to a more logical position, in front of the r8a777x support, so we can have a single #ifdef covering all r7s* and r8a* support soon. This requires moving a helper function, too. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24vrf: remove slave queue and private slave structNikolay Aleksandrov1-63/+5
The private slave queue and slave struct haven't been used for anything and aren't needed, this allows to reduce memory usage and simplify enslave/release. We can use netdev_for_each_lower_dev() to free the vrf ports when deleting a vrf device. Also if in the future a private struct is needed for each slave, it can be implemented via lower devices' private member (similar to how bonding does it). Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24net: fec: no need to test for the return type of of_property_read_u32Saurabh Sengar1-7/+2
in case of error no need to set num_tx and num_rx = 1, because in case of error these variables will remain unchanged by of_property_read_u32 ie 1 only Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24drivers: net: xgene: optimizing the codeSaurabh Sengar1-16/+9
this patch does the following: 1 . remove unnecessary if, else condition 2 . reduce one variable 3 . change the return type of 2 functions to void as there return values turn out to be 0 always after above changes Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24net/ipv4/ipconfig: Rejoin broken lines in console outputGeert Uytterhoeven1-10/+9
Commit 09605cc12c078306 ("net ipv4: use preferred log methods") replaced a few calls of pr_cont() after a console print without a trailing newline by pr_info(), causing lines to be split during IP autoconfiguration, like: . , OK IP-Config: Got DHCP answer from 192.168.97.254, my address is 192.168.97.44 Convert these back to using pr_cont(), so it prints again: ., OK IP-Config: Got DHCP answer from 192.168.97.254, my address is 192.168.97.44 Absorb the printing of "my address ..." into the previous call to pr_info(), as there's no reason to use a continuation there. Convert one more pr_info() to print nameservers while we're at it. Fixes: 09605cc12c078306 ("net ipv4: use preferred log methods") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-24net: dsa: include gpio consumer header fileArnd Bergmann1-0/+1
After the introduction of the switch gpio reset API, I'm getting build errors in configurations that disable CONFIG_GPIOLIB: net/dsa/dsa.c:783:16: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration] The reason is that linux/gpio/consumer.h is not automatically included without gpiolib support. This adds an explicit #include statement to make it compile in all configurations. The reset functionality will not work without gpiolib, which is what you get when disabling the feature. As far as I can tell, gpiolib is supported on all architectures on which you can have DSA at the moment. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: cc30c16344fc ("net: dsa: Add support for a switch reset gpio") Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23VSOCK: constify vmci_transport_notify_ops structuresJulia Lawall4-5/+6
The vmci_transport_notify_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: atm: constify in_cache_ops and eg_cache_ops structuresJulia Lawall2-4/+4
The in_cache_ops and eg_cache_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: factor out common vif init codeNikolay Aleksandrov1-21/+19
Factor out common vif init code used in both tunnel and pimreg initialization and create ipmr_init_vif_indev() function. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: rearrange and cleanup setsockoptNikolay Aleksandrov1-84/+107
Take rtnl in the beginning unconditionally as most options already need it (one exception - MRT_DONE, see the comment inside), make the lock/unlock places central and move out the switch() local variables. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: drop ip_mr_init() mrt_cachep null check as we'll panic if it failsNikolay Aleksandrov1-2/+0
It's not necessary to check for null as SLAB_PANIC is used and we'll panic if the alloc fails, so just drop it. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: drop an instance of CONFIG_IP_MROUTE_MULTIPLE_TABLESNikolay Aleksandrov1-2/+2
Trivial replace of ifdef with IS_BUILTIN(). Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: make ip_mroute_getsockopt more understandableNikolay Aleksandrov1-14/+14
Use a switch to determine if optname is correct and set val accordingly. This produces a much more straight-forward and readable code. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: fix code and comment styleNikolay Aleksandrov2-147/+54
Trivial code and comment style fixes, also removed some extra newlines, spaces and tabs. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: remove some pimsm ifdefs and simplifyNikolay Aleksandrov1-96/+84
Add the helper pimsm_enabled() which replaces the old CONFIG_IP_PIMSM define and is used to check if any version of PIM-SM has been enabled. Use a single if defined(CONFIG_IP_PIMSM_V1) || defined(CONFIG_IP_PIMSM_V2) for the pim-sm shared code. This is okay w.r.t IGMPMSG_WHOLEPKT because only a VIFF_REGISTER device can send such packet, and it can't be created if pimsm_enabled() is false. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: always define mroute_reg_vif_numNikolay Aleksandrov1-8/+0
Before mroute_reg_vif_num was defined only if any of the CONFIG_PIMSM_ options were set, but that's not really necessary as the size of the struct is the same in both cases (checked with pahole, both cases size is 3256 bytes) and we can remove some unnecessary ifdefs to simplify the code. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23net: ipmr: move the tbl id check in ipmr_new_tableNikolay Aleksandrov1-11/+17
Move the table id check in ipmr_new_table and make it return error pointer. We need this change for the upcoming netlink table manipulation support in order to avoid code duplication and a race condition. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23intel: i40e: fix confused codeRasmus Villemoes1-14/+10
This code is pretty confused. The variable name 'bytes_not_copied' clearly indicates that the programmer knew the semantics of copy_{to,from}_user, but then the return value is checked for being negative and used as a -Exxx return value. I'm not sure this is the proper fix, but at least we get rid of the dead code which pretended to check for access faults. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-23ixgbevf: fix spoofed packets with random MACEmil Tantilov2-1/+4
If ixgbevf is loaded while the corresponding PF interface is down and the driver assigns a random MAC address, that address can be overwritten with the value of hw->mac.perm_addr, which would be 0 at that point. To avoid this case we init hw->mac.perm_addr to the randomly generated address and do not set it unless we receive ACK from ixgbe. Reported-by: John Greene <jogreene@redhat.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-23ixgbevf: use ether_addr_copy instead of memcpyEmil Tantilov1-8/+6
replace some instances of memcpy for setting up the mac address with ether_addr_copy() Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Darin Miller <darin.j.miller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-11-23i40evf: fix compiler warning of unused variableJesse Brandeburg1-4/+3
Compiler complained of an unused variable, which the driver was just using to store the result of a rd32 which is used to clear a register unconditionally. Just drop the unused variable and re-use one. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>