aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2013-02-15SUNRPC: rework cache upcall logicStanislav Kinsbursky3-23/+7
For most of SUNRPC caches (except NFS DNS cache) cache_detail->cache_upcall is redundant since all that it's implementations are doing is calling sunrpc_cache_pipe_upcall() with proper function address argument. Cache request function address is now stored on cache_detail structure and thus all the code can be simplified. Now, for those cache details, which doesn't have cache_upcall callback (the only one, which still has is nfs_dns_resolve_template) sunrpc_cache_pipe_upcall will be called instead. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2013-02-15SUNRPC: introduce cache_detail->cache_request callbackStanislav Kinsbursky2-3/+6
This callback will allow to simplify upcalls in further patches in this series. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2013-02-15mac80211: clean up mesh codeJohannes Berg10-263/+252
There's various code with strange indentation, questionable loop and locking constructs, etc. The bigger change is moving the "sdata" argument to the first argument of all functions, like all other mac80211 functions that have one. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: prevent spurious HT/VHT downgrade messageJohannes Berg1-0/+4
Even when connecting to an AP that doesn't support VHT, and even when the local device doesn't support it either, the downgrade message gets printed. Suppress the message if HT and/or VHT is disabled. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15nl80211: renumber NL80211_FEATURE_FULL_AP_CLIENT_STATEJohannes Berg1-2/+1
Adding the flag to mac80211 already without testing was clearly a mistake, one that we now pay for by having to reserve bit 13 forever. The problem is cfg80211 doesn't allow capability/rate changes for station entries that were added unassociated, so the station entries cannot be set up properly when marked associated. Change the NL80211_FEATURE_FULL_AP_CLIENT_STATE value to make it clear to userspace implementations that all current kernels don't actually support it, even though the previous bit is set, and of course also remove the flag from mac80211 until we test and fix the issues. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_stationJouni Malinen2-11/+85
The information of the peer's capabilities is required for the driver to perform TDLS Peer UAPSD operations. This information of the peer is passed by the supplicant using NL80211_CMD_SET_STATION command. This commit enhances the function nl80211_set_station to pass this information of the peer to the driver in case this command is used with the TDLS peer STA. In addition, make the HT/VHT capability configuration handled more consistently for other STA cases (reject both instead of just HT). Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15cfg80211: Pass station (extended) capability info to kernelJouni Malinen1-0/+36
The information of the peer's capabilities and extended capabilities are required for the driver to perform TDLS Peer UAPSD operations and off channel operations. This information of the peer is passed from user space using NL80211_CMD_SET_STATION command. This commit enhances the function nl80211_set_station to pass the capability information of the peer to the driver. Similarly, there may be need for capability information for other modes, so allow this to be provided with both add_station and change_station. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: advertise operating mode notification capabilityJohannes Berg1-0/+9
Use the new extended capabilities advertising to advertise the fact that operating mode notification is supported. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15cfg80211: advertise extended capabilities to userspaceJohannes Berg1-0/+9
In many cases, userspace may need to know which of the 802.11 extended capabilities ("Extended Capabilities element") are implemented in the driver or device, to include them e.g. in beacons, assoc request/response or other frames. Add a new nl80211 attribute to hold the extended capabilities bitmap for this. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: stop modifying HT SMPS capabilityJohannes Berg4-15/+28
Instead of modifying the HT SMPS capability field for stations, track the SMPS mode explicitly in a new field in the station struct and use it in the drivers that care about it. This simplifies the code using it. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: generate mesh probe responsesThomas Pedersen2-2/+63
Mesh interfaces will now respond to any broadcast (or matching directed mesh) probe requests with a probe response. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: cache mesh beaconThomas Pedersen6-65/+171
Previously, the entire mesh beacon would be generated each time the beacon timer fired. Instead generate a beacon head and tail (so the TIM can easily be inserted when mesh power save is on) when starting a mesh or the MBSS parameters change. Also add a mutex for protecting beacon updates and preventing leaks. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: constify IE parsingJohannes Berg8-86/+95
Make all the parsed IE pointers const, and propagate the change to all the users etc. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15nl80211: advertise HT/VHT channel limitationsJohannes Berg2-1/+14
When drivers or regulatory have limitations on 40, 80 or 160 MHz channels, advertise these to userspace via nl80211. Also add a new feature flag to let userspace know this is supported. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15cfg80211: allow drivers to selectively disable 80/160 MHzJohannes Berg2-1/+20
Some drivers might support 80 or 160 MHz only on some channels for whatever reason, so allow them to disable these channel widths. Also maintain the new flags when regulatory bandwidth limitations would disable these wide channels. Reviewed-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: properly track HT/VHT operation changesJohannes Berg1-68/+168
A while ago, I made the mac80211 station code never change the channel type after association. This solved a number of issues but is ultimately wrong, we should react if the AP changes the HT operation IE and switches bandwidth. One of the issues is that we associate as HT40 capable, but if the AP ever switches to 40 MHz we won't be able to receive such frames because we never set our channel to 40 MHz. This addresses this and VHT operation changes. If there's a change that is incompatible with our setup, e.g. if the AP decides to change the channel entirely (and for some reason we still hear the beacon) we'll just disconnect. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: move ieee80211_determine_chantype functionJohannes Berg1-195/+195
The next patch will need it further up in the file, so move it unchanged now. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: add ieee80211_vif_change_bandwidthJohannes Berg2-0/+53
For HT and VHT the current bandwidth can change, add the function ieee80211_vif_change_bandwidth() to take care of this. It returns a failure if the new bandwidth isn't compatible with the existing channel context, the caller has to handle that. When it happens, also inform the driver that the bandwidth changed for this virtual interface (no drivers would actually care today though.) Changing to/from HT/VHT isn't allowed though. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: clean up channel use in ieee80211_config_ht_txJohannes Berg1-11/+3
The channel use is confusing, some uses the channel context and some the bss_conf.chandef. The latter is fine, so get rid of the channel context part. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: disable HT/VHT if AP has no HT/VHT capabilityJohannes Berg1-2/+14
Having HT/VHT operation IEs but not capability IEs leads to a strange situation where we configure the channel to an HT or VHT bandwidth and then can't actually use it. Prevent this by checking that the HT and VHT capability IEs are present as well as the operation IEs; if not, disable HT and/or VHT. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: handle operating mode notif in beacon/assoc responseJohannes Berg5-6/+38
In beacons and association response frames an AP may include an operating mode notification element to advertise changes in the number of spatial streams it can receive. Handle this using the existing function that handles the action frame, but only handle NSS changes, not bandwidth changes which aren't allowed here. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: fix ieee80211_change_chandef nameJohannes Berg1-3/+3
This should be called ieee80211_change_chanctx() since it changes the channel context, not a chandef. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: fix HT/VHT disable flagsJohannes Berg1-2/+2
The code to disable HT and VHT if VHT was advertised without VHT is wrong -- it accidentally uses the wrong flags. Fix that. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: init HT TX data before rate controlJohannes Berg1-20/+19
In case of connection, the station data is initialised from the beacon/probe response first and then updated from the association response. If the latter is different we update the rate control algorithm and driver. Instead of doing it this way, set the station data properly with data from the association response before initializing rate control. Also simplify the code by passing the station pointer. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: handle VHT operating mode notificationJohannes Berg5-10/+124
Handle the operating mode notification action frame. When the supported streams or the bandwidth change let the driver and rate control algorithm know. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: track number of spatial streamsJohannes Berg3-0/+44
With VHT, a station can change the number of spatial streams it can receive on the fly, not unlike spatial multiplexing in HT. Prepare for that by tracking the maximum number of spatial streams it can receive when the connection is established. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: stop toggling IEEE80211_HT_CAP_SUP_WIDTH_20_40Johannes Berg10-94/+130
For VHT, many more bandwidth changes are possible. As a first step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag in the HT capabilities and instead introduce a bandwidth field indicating the currently usable bandwidth to transmit to the station. Of course, make all drivers use it. To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get the station as an argument, rather than the new capabilities, so it can set up the new bandwidth field. If the station is a VHT station and VHT bandwidth is in use, also set the bandwidth accordingly. Doing this allows us to get rid of the supports_40mhz flag as the HT capabilities now reflect the true capability instead of the current setting. While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not ignore HT cap overrides when MCS TX isn't supported (not that it really happens...) Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: pass station to ieee80211_vht_cap_ie_to_sta_vht_capJohannes Berg4-8/+9
Like with HT, make things a bit simpler in future patches by passing the station to ieee80211_vht_cap_ie_to_sta_vht_cap() instead of the vht_cap pointer. Also disable VHT here if HT isn't supported. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15Merge remote-tracking branch 'mac80211/master' into HEADJohannes Berg3-6/+10
2013-02-15mac80211: use spin_lock_bh() for TKIP lockJohannes Berg2-9/+6
Since no driver calls the TKIP functions from interrupt context, there's no need to use spin_lock_irqsave(). Just use spin_lock_bh() (and spin_lock() in the TX path where we're in a BH or they're already disabled.) Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: use spin_lock_bh() for tim_lockJohannes Berg2-7/+4
There's no need to use _irqsave() as the lock is never used in interrupt context. This also fixes a problem in the iwlwifi MVM driver that calls spin_unlock_bh() within its set_tim() callback. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: don't pick up WPA vendor IEJohannes Berg2-7/+1
There's no use for it, WPA is entirely handled in wpa_supplicant in userspace, so don't pick the IE. Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: always unblock CSA queue stop when disconnectingJohannes Berg1-2/+2
In some cases when disconnecting after (or during?) CSA the queues might not recover, and then the only way to recover is reloading the module. Fix this by always unblocking the queue CSA reason when disconnecting. Cc: [email protected] Reported-by: Jan-Michael Brummer <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: don't call bss_info_changed on p2p-device/monitorJohannes Berg2-9/+18
Since the idle decision rework, mac80211 started calling bss_info_changed() for the driver's monitor interface, which causes a crash for iwlwifi, but drivers generally don't expect this to happen. Therefore, avoid it. While at it, also prevent calling it in such cases and only print a warning. For the P2P Device interface the idle will no longer be called (no channel context), so also prevent that and warn on it. Reported-by: Chaitanya <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: fix auth/assoc timeout handlingJohannes Berg4-4/+25
In my commit 1672c0e31917f49d31d30d79067103432bc20cc7 ("mac80211: start auth/assoc timeout on frame status") I broke auth/assoc timeout handling: in case we wait for the TX status, it now leaves the timeout field set to 0, which is a valid time and can compare as being before now ("jiffies"). Thus, if the work struct runs for some other reason, the auth/assoc is treated as having timed out. Fix this by introducing a separate "timeout_started" variable that tracks whether the timeout has started and is checked before timing out. Additionally, for proper TX status handling the change requires that the skb->dev pointer is set up for all the frames, so set it up for all frames in mac80211. Reported-by: Wojciech Dubowik <[email protected]> Tested-by: Wojciech Dubowik <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: fix ieee80211_sta_tx_notify for nullfuncWojciech Dubowik1-4/+5
Function ieee80211_sta_reset_conn_monitor has been resetting probe_send_count too early and nullfunc check was never called after succesfull ack. Reported-by: Magnus Cederlöf <[email protected]> Tested-by: Magnus Cederlöf <[email protected]> Signed-off-by: Wojciech Dubowik <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: consolidate MBSS change notificationThomas Pedersen5-37/+55
A few mesh utility functions will call ieee80211_bss_info_change_notify(), and then the caller might notify the driver of the same change again. Avoid this redundancy by propagating the BSS changes and generally calling bss_info_change_notify() once per change. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: fix WPA with VLAN on AP side with ps-staMichael Braun1-0/+1
When sending a broadcast while at least on of the connected stations is sleeping, it gets queued and send after a DTIM beacon is sent. If the packet was to be sent on a vlan interface, the vif used for dequeing from the per-bss queue does not hold the per-vlan sdata. The correct sdata is required to use the correct per-vlan broadcast/multicast key. This patch fixes this by restoring the per-vlan sdata using the skb->dev entry. Signed-off-by: Michael Braun <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: free ps->bc_buf skbs on vlan device stopMichael Braun1-0/+14
When the vlan device is removed, ps->bc_buf processing can no longer send its frames. Signed-off-by: Michael Braun <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15mac80211: add radar detection command/eventSimon Wunderlich10-1/+190
Add command to trigger radar detection in the driver/FW. Once radar detection is started it should continuously monitor for radars as long as the channel active. If radar is detected usermode notified with 'radar detected' event. Scanning and remain on channel functionality must be disabled while doing radar detection/scanning, and vice versa. Based on original patch by Victor Goldenshtein <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-15nl80211/cfg80211: add radar detection command/eventSimon Wunderlich9-17/+463
Add new NL80211_CMD_RADAR_DETECT, which starts the Channel Availability Check (CAC). This command will also notify the usermode about events (CAC finished, CAC aborted, radar detected, NOP finished). Once radar detection has started it should continuously monitor for radars as long as the channel is active. This patch enables DFS for AP mode in nl80211/cfg80211. Based on original patch by Victor Goldenshtein <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]> [remove WIPHY_FLAG_HAS_RADAR_DETECT again -- my mistake] Signed-off-by: Johannes Berg <[email protected]>
2013-02-14net: Don't write to current task flags on every packet received.David S. Miller1-18/+28
Even for non-pfmalloc SKBs, __netif_receive_skb() will do a tsk_restore_flags() on current unconditionally. Make __netif_receive_skb() a shim around the existing code, renamed to __netif_receive_skb_core(). Let __netif_receive_skb() wrap the __netif_receive_skb_core() call with the task flag modifications, if necessary. Signed-off-by: David S. Miller <[email protected]>
2013-02-14Merge branch 'master' of ↵John W. Linville5-9/+26
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c
2013-02-14Merge branch 'master' of ↵David S. Miller6-39/+425
git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== 1) Remove a duplicated call to skb_orphan() in pf_key, from Cong Wang. 2) Prepare xfrm and pf_key for algorithms without pf_key support, from Jussi Kivilinna. 3) Fix an unbalanced lock in xfrm_output_one(), from Li RongQing. 4) Add an IPsec state resolution packet queue to handle packets that are send before the states are resolved. 5) xfrm4_policy_fini() is unused since 2.6.11, time to remove it. From Michal Kubecek. 6) The xfrm gc threshold was configurable just in the initial namespace, make it configurable in all namespaces. From Michal Kubecek. 7) We currently can not insert policies with mark and mask such that some flows would be matched from both policies. Allow this if the priorities of these policies are different, the one with the higher priority is used in this case. ==================== Signed-off-by: David S. Miller <[email protected]>
2013-02-14bridge: make ifla_br_policy and br_af_ops staticCong Wang1-2/+2
They are only used within this file. Cc: Vlad Yasevich <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-14Merge branch 'master' of git://1984.lsi.us.es/nfDavid S. Miller3-4/+9
Pablo Neira Ayuso says: ==================== The following patchset contains three Netfilter fixes, they are: * Fix conntrack helper re-assignment after NAT mangling if only if the same helper is attached to the conntrack again, from Florian Westphal. * Don't allow the creation of conntrack entries via ctnetlink if the original and reply tuples are missing, from Florian Westphal. * Fix broken sysctl interface in nf_ct_reasm while adding netns support to it, from Michal Kubecek. ==================== Signed-off-by: David S. Miller <[email protected]>
2013-02-14iucv: fix kernel panic at rebootHendrik Brueckner1-1/+4
The iucv base layer is initialized during the registration of the first iucv handler. If no handler is registered and the iucv_reboot_event() notifier is called, a missing check can cause a kernel panic in iucv_block_cpu(). To solve this issue, check the IRQ masks invoke iucv_block_cpu() for enabled CPUs only. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-13libceph: don't require r_num_pages for bio requestsAlex Elder1-3/+4
There is a check in the completion path for osd requests that ensures the number of pages allocated is enough to hold the amount of incoming data expected. For bio requests coming from rbd the "number of pages" is not really meaningful (although total length would be). So stop requiring that nr_pages be supplied for bio requests. This is done by checking whether the pages pointer is null before checking the value of nr_pages. Note that this value is passed on to the messenger, but there it's only used for debugging--it's never used for validation. While here, change another spot that used r_pages in a debug message inappropriately, and also invalidate the r_con_filling_msg pointer after dropping a reference to it. This resolves: http://tracker.ceph.com/issues/3875 Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Josh Durgin <[email protected]>
2013-02-13rbd: don't take extra bio reference for osd clientAlex Elder2-5/+1
Currently, if the OSD client finds an osd request has had a bio list attached to it, it drops a reference to it (or rather, to the first entry on that list) when the request is released. The code that added that reference (i.e., the rbd client) is therefore required to take an extra reference to that first bio structure. The osd client doesn't really do anything with the bio pointer other than transfer it from the osd request structure to outgoing (for writes) and ingoing (for reads) messages. So it really isn't the right place to be taking or dropping references. Furthermore, the rbd client already holds references to all bio structures it passes to the osd client, and holds them until the request is completed. So there's no need for this extra reference whatsoever. So remove the bio_put() call in ceph_osdc_release_request(), as well as its matching bio_get() call in rbd_osd_req_create(). This change could lead to a crash if old libceph.ko was used with new rbd.ko. Add a compatibility check at rbd initialization time to avoid this possibilty. This resolves: http://tracker.ceph.com/issues/3798 and http://tracker.ceph.com/issues/3799 Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Josh Durgin <[email protected]>
2013-02-13libceph: add a compatibility check interfaceAlex Elder1-0/+16
An upcoming change implements semantic change that could lead to a crash if an old version of the libceph kernel module is used with a new version of the rbd kernel module. In order to preclude that possibility, this adds a compatibilty check interface. If this interface doesn't exist, the modules are obviously not compatible. But if it does exist, this provides a way of letting the caller know whether it will operate properly with this libceph module. Perhaps confusingly, it returns false right now. The semantic change mentioned above will make it return true. This resolves: http://tracker.ceph.com/issues/3800 Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Josh Durgin <[email protected]>