aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/debugfs_netdev.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-28mac80211: implement SMPS for APEmmanuel Grumbach1-9/+16
When the driver requests to move to STATIC or DYNAMIC SMPS, we send an action frame to each associated station and reconfigure the channel context / driver. Of course, non-MIMO stations are ignored. The beacon isn't updated. The association response will include the original capabilities. Stations that associate while in non-OFF SMPS mode will get an action frame right after association to inform them about our current state. Note that we wait until the end of the EAPOL. Sending an action frame before the EAPOL is finished can be an issue for a few clients. Clients aren't likely to send EAPOL frames in MIMO anyway. When the SMPS configuration gets more permissive (e.g. STATIC -> OFF), we don't wake up stations that are asleep We remember that they don't know about the change and send the action frame when they wake up. When the SMPS configuration gets more restrictive (e.g. OFF -> STATIC), we set the TIM bit for every sleeping STA. uAPSD stations might send MIMO until they poll the action frame, but this is for a short period of time. Signed-off-by: Emmanuel Grumbach <[email protected]> [fix vht streams loop, initialisation] Signed-off-by: Johannes Berg <[email protected]>
2013-05-25cfg80211/mac80211: use cfg80211 wdev mutex in mac80211Johannes Berg1-5/+5
Using separate locks in cfg80211 and mac80211 has always caused issues, for example having to unlock in places in mac80211 to call cfg80211, which even needed a framework to make cfg80211 calls after some functions returned etc. Additionally, I suspect some issues people have reported with the cfg80211 state getting confused could be due to such issues, when cfg80211 is asking mac80211 to change state but mac80211 is in the process of telling cfg80211 that the state changed (in another way.) Signed-off-by: Johannes Berg <[email protected]>
2013-05-24mac80211: Move mesh estab_plinks outside mesh_stats debug groupAshok Nagarajan1-2/+3
As estab_plinks is not a statistics member, don't show its debug information along with other mesh stat members Signed-off-by: Ashok Nagarajan <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-04-08mac80211: add beacon stats to debugfsBen Greear1-0/+11
Beacon-timeout and number of beacon loss events. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-03-18mac80211: move sdata debugfs dir to vifStanislaw Gruszka1-11/+11
There is need create driver own per interface debugfs files. This is currently done by drv_{add,remove}_interface_debugfs() callbacks. But it is possible that after we remove interface from the driver (i.e. on suspend) we call drv_remove_interface_debugfs() function. Fixing this problem will require to add call drv_{add,remove}_interface_debugfs() anytime we create and remove interface in mac80211. So it's better to add debugfs dir dentry to vif structure to allow to create/remove custom debugfs driver files on drv_{add,remove}_interface(). Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-02-04mac80211: mesh power save basicsMarco Porsch1-0/+5
Add routines to - maintain a PS mode for each peer and a non-peer PS mode - indicate own PS mode in transmitted frames - track neighbor STAs power modes - buffer frames when neighbors are in PS mode - add TIM and Awake Window IE to beacons - release frames in Mesh Peer Service Periods Add local_pm to sta_info to represent the link-specific power mode at this station towards the remote station. When a peer link is established, use the default power mode stored in mesh config. Update the PS status if the peering status of a neighbor changes. Maintain a mesh power mode for non-peer mesh STAs. Set the non-peer power mode to active mode during peering. Authenticated mesh peering is currently not working when either node is configured to be in power save mode. Indicate the current power mode in transmitted frames. Use QoS Nulls to indicate mesh power mode transitions. For performance reasons, calls to the function setting the frame flags are placed in HWMP routing routines, as there the STA pointer is already available. Add peer_pm to sta_info to represent the peer's link-specific power mode towards the local station. Add nonpeer_pm to represent the peer's power mode towards all non-peer stations. Track power modes based on received frames. Add the ps_data structure to ieee80211_if_mesh (for TIM map, PS neighbor counter and group-addressed frame buffer). Set WLAN_STA_PS flag for STA in PS mode to use the unicast frame buffering routines in the tx path. Update num_sta_ps to buffer and release group-addressed frames after DTIM beacons. Announce the awake window duration in beacons if in light or deep sleep mode towards any peer or non-peer. Create a TIM IE similarly to AP mode and add it to mesh beacons. Parse received Awake Window IEs and check TIM IEs for buffered frames. Release frames towards peers in mesh Peer Service Periods. Use the corresponding trigger frames and monitor the MPSP status. Append a QoS Null as trigger frame if neccessary to properly end the MPSP. Currently, in HT channels MPSPs behave imperfectly and show large delay spikes and frame losses. Signed-off-by: Marco Porsch <[email protected]> Signed-off-by: Ivan Bezyazychnyy <[email protected]> Signed-off-by: Mike Krinkin <[email protected]> Signed-off-by: Max Filippov <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-26mac80211: convert to channel definition structJohannes Berg1-2/+0
Convert mac80211 (and where necessary, some drivers a little bit) to the new channel definition struct. This will allow extending mac80211 for VHT, which is currently restricted to channel contexts since there are no drivers using that which makes it easier. As I also don't care about VHT for drivers not using the channel context API, I won't convert the previous API to VHT support. Signed-off-by: Johannes Berg <[email protected]>
2012-11-09mac80211: add debugfs file for HW queuesJohannes Berg1-0/+21
Add a debugfs file showing which HW queues were allocated to a virtual interface, including the CAB queue for AP interfaces. Change-Id: I486924e961b6ad6785a79db09620919ee644e703 Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: use kstrtoull return valueJohannes Berg1-1/+1
If kstrtoull() returns an error code (a value smaller than zero), use it since it can be an error other than -EINVAL. Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: fix race in TKIP MIC test debugfs fileJohannes Berg1-2/+5
Accessing sdata->vif.bss_conf.bssid without any protection here is racy, use u.mgd.associated instead and lock the correct mutex for it. Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: use mac_ptonJohannes Berg1-28/+2
Instead of implementing practically the same function (hwaddr_aton) use mac_pton. Signed-off-by: Johannes Berg <[email protected]>
2012-10-30mac80211: handle TX power per virtual interfaceJohannes Berg1-0/+6
Even before channel contexts/multi-channel, having a single global TX power limit was already problematic, in particular if two managed interfaces connected to two APs with different power constraints. The channel context introduction completely broke this though and in fact I had disabled TX power configuration there for drivers using channel contexts. Change everything to track TX power per interface so that different user settings and different channel maxima are treated correctly. Also continue tracking the global TX power though for compatibility with applications that attempt to configure the wiphy's TX power globally. Signed-off-by: Johannes Berg <[email protected]>
2012-10-19mac80211: make client powersave independent of interface typeMarco Porsch1-3/+3
This patch prepares mac80211 for a later implementation of mesh or ad-hoc powersave clients. The structures related to powersave (buffer, TIM map, counters) are moved from the AP-specific interface structure to a generic structure that can be embedded into any interface type. The functions related to powersave are prepared to allow easy extension with different interface types. For example with: + } else if (sta->sdata->vif.type == NL80211_IFTYPE_MESH_POINT) { + ps = &sdata->u.mesh.ps; Some references to the AP's beacon structure are removed where they were obviously not used. The patch compiles without warning and has been briefly tested as AP interface with one client in PS mode. Signed-off-by: Marco Porsch <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-10-17mac80211: move out the non-statistics variable estab_plinks from mesh_statAshok Nagarajan1-1/+1
estab_plinks is not a statistics member. Hence move estab_plinks from struct mesh_stat to struct ieee80211_if_mesh Signed-off-by: Ashok Nagarajan <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-10-17mac80211: track needed RX chains for channel contextsJohannes Berg1-1/+1
On each channel that the device is operating on, it may need to listen using one or more chains depending on the SMPS settings of the interfaces using it. The previous channel context changes completely removed this ability (before, it was available as the SMPS mode). Add per-context tracking of the required static and dynamic RX chains and notify the driver on changes. To achieve this, track the chains and SMPS mode used on each virtual interface and update the channel context whenever this changes. Signed-off-by: Johannes Berg <[email protected]>
2012-06-24mac80211: clean up debuggingJohannes Berg1-2/+3
There are a few things that make the logging and debugging in mac80211 less useful than it should be right now: * a lot of messages should be pr_info, not pr_debug * wholesale use of pr_debug makes it require *both* Kconfig and dynamic configuration * there are still a lot of ifdefs * the style is very inconsistent, sometimes the sdata->name is printed in front Clean up everything, introducing new macros and separating out the station MLME debugging into a new Kconfig symbol. Signed-off-by: Johannes Berg <[email protected]>
2012-06-18{nl,cfg,mac}80211: implement dot11MeshHWMPconfirmationIntervalChun-Yeow Yeoh1-0/+3
As defined in section 13.10.9.3 Case D (802.11-2012), this control variable is used to limit the mesh STA to send only one PREQ to a root mesh STA within this interval of time (in TUs). The default value for this variable is set to 2000 TUs. However, for current implementation, the maximum configurable of dot11MeshHWMPconfirmationInterval is restricted by dot11MeshHWMPactivePathTimeout. Signed-off-by: Chun-Yeow Yeoh <[email protected]> [line-break commit log] Signed-off-by: Johannes Berg <[email protected]>
2012-06-14{nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and ↵Chun-Yeow Yeoh1-0/+6
dot11MeshHWMPactivePathToRootTimeout Add the mesh configuration parameters dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout to be used by proactive PREQ mechanism. Signed-off-by: Chun-Yeow Yeoh <[email protected]> [line-break commit log] Signed-off-by: Johannes Berg <[email protected]>
2012-06-11{nl,cfg,mac}80211: fix the coding style related to mesh parametersChun-Yeow Yeoh1-17/+17
fix the coding style related to mesh parameters, especially the indentation, as pointed out by Johannes Berg. Signed-off-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-06-06mac80211: Add missing mesh parameter dot11MeshForwarding for debugfsChun-Yeow Yeoh1-0/+1
Signed-off-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-06-05net: mac80211: Convert printk(KERN_DEBUG to pr_debugJoe Perches1-1/+1
Standardize the debugging to be able to use dynamic_debug. Coalesce formats, align arguments. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-05-16mac80211: Add debugfs entry for mesh ht_opmodeAshok Nagarajan1-0/+2
Signed-off-by: Ashok Nagarajan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-24mac80211: rename AP variable num_sta_authorized to num_mcast_staFelix Fietkau1-2/+2
It is only used to test for BSS multicast receivers. Signed-off-by: Felix Fietkau <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-12Merge branch 'master' of ↵John W. Linville1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-04-10mac80211: Allow tsf increments via debugfsJavier Cardona1-0/+12
Reading and writing back the tsf value via tsf is too slow if one wants to make small increments to this timer. With this change you can use the syntax "+=<some value>" or "-=<some value>" to add or substract a value from the tsf counter. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-09mac80211: reduce code duplication in debugfs codeFelix Fietkau1-58/+13
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-05simple_open: automatically convert to simple_open()Stephen Boyd1-1/+1
Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [[email protected]: checkpatch fixes] Signed-off-by: Stephen Boyd <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Al Viro <[email protected]> Cc: Julia Lawall <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-03-15mac80211: make uapsd_* keys per-vifEliad Peller1-0/+58
uapsd_queues and uapsd_max_sp_len are relevant only for managed interfaces, and can be configured differently for each vif. Move them from the local struct to sdata->u.mgd, and update the debugfs functions accordingly. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-15mac80211: add NULL terminator to debugfs_netdev write bufEliad Peller1-8/+5
Some debugfs write functions call kstrto* functions, which assume the string is null-terminated. Make it valid by changing ieee80211_if_write() to use static buffer instead of allocating one, and set the last char to NULL. (The write functions try to parse some integer/mac address, so 64 bytes buffer should be enough) Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-06mac80211: Modify tsf via debugfs in mesh interfacesJavier Cardona1-1/+6
Signed-off-by: Javier Cardona <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-05{nl,cfg,mac}80211: Implement RSSI threshold for mesh peeringAshok Nagarajan1-0/+2
Mesh peer links are established only if average rssi of the peer candidate satisfies the threshold. This is not in 802.11s specification but was requested by David Fulgham, an open80211s user. This is a way to avoid marginal peer links with stations that are barely within range. This patch adds a new mesh configuration parameter, mesh_rssi_threshold. This feature is supported only for hardwares that report signal in dBm. Signed-off-by: Ashok Nagarajan <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-30mac80211: add support for mcs masksSimon Wunderlich1-0/+34
* Handle MCS masks set by the user. * Match rates provided by the rate control algorithm to the mask set, also in HT mode, and switch back to legacy mode if necessary. * add debugfs files to observate the rate selection Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-27{nl,cfg,mac}80211: Add support of setting non-forwarding entity in MeshChun-Yeow Yeoh1-0/+1
A mesh node that joins the mesh network is by default a forwarding entity. This patch allows the mesh node to set as non-forwarding entity. Whenever dot11MeshForwarding is set to 0, the mesh node can prevent itself from forwarding the traffic which is not destined to him. Signed-off-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-12-15mac80211: count authorized stations per BSSJohannes Berg1-0/+2
Currently, each AP interface will send multicast traffic if any interface has a station entry even if that station entry is allocated only. With the new station state management we can easily fix it by adding a counter that counts each authorized station only and send multicast traffic only when the correct interface has at least one authorized station. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-11-28{nl,cfg,mac}80211: implement dot11MeshHWMPperrMinIntervalThomas Pedersen1-0/+3
As per 802.11mb 13.9.11.3 Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-27mac80211: add ieee80211_vif param to tsf functionsEliad Peller1-1/+47
TSF can be kept per vif. Add ieee80211_vif param to set/get/reset_tsf, and move the debugfs entries to the per-vif directory. Update all the drivers that implement these callbacks. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-14mac80211: Stop forwarding mesh traffic when tx queues are fullJavier Cardona1-0/+3
Tx flow control for non-mesh modes of operation only needs to act on the net device queues: when the hardware queues are full we stop accepting traffic from the net device. In mesh, however, we also need to stop forwarding traffic. This patch checks the hardware queues before attempting to forward a mesh frame. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-24{nl,cfg,mac}80211: let userspace make meshif mesh gateJavier Cardona1-0/+3
Allow userspace to set NL80211_MESHCONF_GATE_ANNOUNCEMENTS attribute, which will advertise this mesh node as being a mesh gate. NL80211_HWMP_ROOTMODE must be set or this will do nothing. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-24{nl,cfg,mac}80211: let userspace set RANN intervalJavier Cardona1-0/+3
Allow userspace to set Root Announcement Interval for our mesh interface. Also, RANN interval is now in proper units of TUs. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-24{nl,mac}80211: add missing root mode meshconf entriesJavier Cardona1-1/+1
This fix allows userspace to mark a meshif as a root node. Signed-off-by: Javier Cardona <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-04-20mac80211: fix SMPS debugfs lockingJohannes Berg1-2/+2
The locking with SMPS requests means that the debugs file should lock the mgd mutex, not the iflist mutex. Calls to __ieee80211_request_smps() need to hold that mutex, so add an assertion. This has always been wrong, but for some reason never been noticed, probably because the locking error only happens while unassociated. Cc: [email protected] [2.6.34+] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-03mac80211: Add testing functionality for TKIPJouni Malinen1-1/+101
TKIP countermeasures depend on devices being able to detect Michael MIC failures on received frames and for stations to report errors to the AP. In order to test that behavior, it is useful to be able to send out TKIP frames with incorrect Michael MIC. This testing behavior has minimal effect on the TX path, so it can be added to mac80211 for convenient use. The interface for using this functionality is a file in mac80211 netdev debugfs (tkip_mic_test). Writing a MAC address to the file makes mac80211 generate a dummy data frame that will be sent out using invalid Michael MIC value. In AP mode, the address needs to be for one of the associated stations or ff:ff:ff:ff:ff:ff to use a broadcast frame. In station mode, the address can be anything, e.g., the current BSSID. It should be noted that this functionality works correctly only when associated and using TKIP. Signed-off-by: Jouni Malinen <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-03mac80211: Show configured channel-type in netdev debugfs.Ben Greear1-0/+6
Signed-off-by: Ben Greear <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-01-28mac80211: Add sdata state and flags to debugfs.Ben Greear1-0/+14
Signed-off-by: Ben Greear <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-12-06nl80211/mac80211: define and allow configuring mesh element TTLJavier Cardona1-0/+2
The TTL in path selection information elements is different from the mesh ttl used in mesh data frames. Version 7.03 of the 11s draft calls this ttl 'Element TTL'. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds1-0/+3
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits) bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL. vlan: Calling vlan_hwaccel_do_receive() is always valid. tproxy: use the interface primary IP address as a default value for --on-ip tproxy: added IPv6 support to the socket match cxgb3: function namespace cleanup tproxy: added IPv6 support to the TPROXY target tproxy: added IPv6 socket lookup function to nf_tproxy_core be2net: Changes to use only priority codes allowed by f/w tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled tproxy: added tproxy sockopt interface in the IPV6 layer tproxy: added udp6_lib_lookup function tproxy: added const specifiers to udp lookup functions tproxy: split off ipv6 defragmentation to a separate module l2tp: small cleanup nf_nat: restrict ICMP translation for embedded header can: mcp251x: fix generation of error frames can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set can-raw: add msg_flags to distinguish local traffic 9p: client code cleanup rds: make local functions/variables static ... Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and drivers/net/wireless/ath/ath9k/debug.c as per David
2010-09-27mac80211: Support multiple VIFS per AP in debugfs.Ben Greear1-0/+3
Create 'stations' sub-directory under each netdev:[vif-name] directory to hold all stations for that network device. Signed-off-by: Ben Greear <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-09-16net/wireless: use generic_file_llseek in debugfsArnd Bergmann1-0/+1
The default llseek operation is changing from default_llseek to no_llseek, so all code relying on the current behaviour needs to make that explicit. The wireless driver infrastructure and some of the drivers make use of generated debugfs files, so they cannot be converted by our script that automatically determines the right operation. All these files use debugfs and they typically rely on simple_read_from_buffer, so the best llseek operation here is generic_file_llseek. Signed-off-by: Arnd Bergmann <[email protected]> Cc: "John W. Linville" <[email protected]> Cc: [email protected] Cc: [email protected]
2010-04-15Merge branch 'master' of ↵John W. Linville1-0/+12
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/wl12xx/wl1271_main.c
2010-04-08Merge branch 'master' of ↵John W. Linville1-3/+7
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into merge Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-core.h drivers/net/wireless/iwlwifi/iwl-tx.c