summaryrefslogtreecommitdiffstats
path: root/net/mac80211
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵John W. Linville2012-04-2614-118/+226
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-testmode.c
| * mac80211: Adds clean sdata helperAndrei Emeltchenko2012-04-242-5/+18
| | | | | | | | | | | | | | | | | | Adds hepler to clean sdata ieee80211_clean_sdata similar way as ieee80211_setup_sdata is implemented. The function will be used by other interfaces later. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix num_mcast_sta counting issuesFelix Fietkau2012-04-242-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving a STA to an AP VLAN prevents num_mcast_sta from being decremented once the STA leaves, because sta->sdata changes. Fix this by checking for AP VLANs as well. Also exclude 4-addr VLAN stations from num_mcast_sta - remote 4-addr stations ignore 3-address multicast frames anyway. In a typical bridge configuration they receive the same packets as 4-address unicast. This patch also fixes clearing the sdata->u.vlan.sta pointer when the STA is removed from a 4-addr VLAN. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: rename AP variable num_sta_authorized to num_mcast_staFelix Fietkau2012-04-244-6/+6
| | | | | | | | | | | | | | | | It is only used to test for BSS multicast receivers. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: check for non-managed interfaceWey-Yi Guy2012-04-241-0/+4
| | | | | | | | | | | | | | | | Average beacon signal only keep tracked by managed interface, give warning and return 0 for the others. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: declare ieee80211_ave_rssi as EXPORTWey-Yi Guy2012-04-231-0/+1
| | | | | | | | | | | | | | ieee80211_ave_rssi need to be declare as export for driver to use it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fixup for mesh TSF adjustment latency in Toffset setpointJavier Cardona2012-04-231-1/+1
| | | | | | | | | | | | | | | | | | The original patch defined the correction margin but did not apply it. Signed-off-by: Shinichi Hotori <hotorinn@gmail.com> Signed-off-by: Yu Niiro <yu.niiro@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix STA channel width fieldThomas Pedersen2012-04-231-1/+3
| | | | | | | | | | | | | | | | According to IEEE 802.11 8.4.2.59, set the "STA channel width" bit to 0 if transmitting STA is using a 20mhz channel. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: don't set mesh peer ht caps if ht disabledThomas Pedersen2012-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | Blindly setting ht caps on a mesh peer's station entry would result in MCS rates being used by the rate control algorithm even if no ht had been configured. Fix this by checking the channel type before assigning ht capabilites. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: refactor mesh peer rate handlingThomas Pedersen2012-04-233-29/+25Star
| | | | | | | | | | | | | | | | To avoid passing supp_rates and basic_rates around all the time, just derive these when needed in mesh_matches_local() and mesh_peer_init(). Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: refactor mesh peer initializationThomas Pedersen2012-04-231-54/+72
| | | | | | | | | | | | | | | | | | | | | | | | This patch unifies the previous two paths toward mesh peer creation a bit. It also fixes a bug where a peer's changing rates or HT mode wouldn't register on leaving and then returning to the mesh with a sta entry still present. Also clean up locking and clear possibly stale ht cap. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Support on-channel scan option.Ben Greear2012-04-234-27/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This based on an idea posted by Stanislaw Gruszka, though I accept full blame for the implementation! This has been tested with ath9k. The idea is to let users scan on the current operating channel without interrupting normal traffic more than absolutely necessary (changing power level might reset some hardware, for instance). Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2012-04-242-6/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Fix merge between commit 3adadc08cc1e ("net ax25: Reorder ax25_exit to remove races") and commit 0ca7a4c87d27 ("net ax25: Simplify and cleanup the ax25 sysctl handling") The former moved around the sysctl register/unregister calls, the later simply removed them. With help from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac80211: fix logic error in ibss channel type checkFelix Fietkau2012-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The broken check leads to rate control attempting to use HT40 while the driver is configured for HT20. This leads to interesting hardware issues. HT40 can only be used if the channel type is either HT40- or HT40+ and if the channel type of the cell matches the local type. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix truncated packets in cooked monitor rxFelix Fietkau2012-04-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Cooked monitor rx was recently changed to use ieee80211_add_rx_radiotap_header instead of generating only limited radiotap information. ieee80211_add_rx_radiotap_header assumes that FCS info is still present if the hardware supports receiving it, however when cooked monitor rx packets are processed, FCS info has already been stripped. Fix this by adding an extra flag indicating FCS presence. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: add function retrieve average rssiWey-Yi Guy2012-04-161-0/+8
| | | | | | | | | | | | | | Add utility function to provide the average rssi per vif Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: Take into account TSF adjustment latency in Toffset setpointJavier Cardona2012-04-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When testing mesh synchronization we observed a global TSF slowdown that was dependent on the number of synchronized mesh stations. This seems to be caused by the TSF adjustment (read/write) latency. Adding a small margin to the Toffset setpoint solved the problem. Signed-off-by: Shinichi Hotori <hotorinn@gmail.com> Signed-off-by: Yu Niiro <yu.niiro@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: Choose a new toffset setpoint if a big tsf jump is detected.Javier Cardona2012-04-161-6/+20
| | | | | | | | | | Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: check IEEE80211_HW_QUEUE_CONTROL in ieee80211_check_queues()Luciano Coelho2012-04-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | Commit 3a25a8c8 (mac80211: add improved HW queue control) introduced a bug when running in AP mode without the IEEE80211_HW_QUEUE_CONTROL flag set. The ieee80211_check_queues() function always returns -EINVAL, preventing AP mode from starting. To fix this, check whether this flag is set before checking if cab_queue is set properly. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: remove ieee80211_rx_bss_getMohammed Shafi Shajakhan2012-04-132-17/+0Star
| | | | | | | | | | | | | | | | its not used where, while we directly obtain ieee80211_bss's pointer in ibss.c by calling cfg80211_get_bss Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: remove hw.conf.channel usage where possibleMichal Kazior2012-04-135-31/+27Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes hw.conf.channel usage from the following functions: * ieee80211_mandatory_rates * ieee80211_sta_get_rates * ieee80211_frame_duration * ieee80211_rts_duration * ieee80211_ctstoself_duration This is in preparation for multi-channel operation. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: fix an issue in ieee80211_tx_info count field managementLorenzo Bianconi2012-04-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | I noticed a possible issue in the status count field management of the ieee80211_tx_info data structure. In particular, when the AGGR processing is employed, status.rates[].count is set just for the first frame and not for others belonging to the same burst, leading to wrong statistic data in the mac80211 debug file system. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: Add channel information to NL80211_CMD_GET_INTERFACEPontus Fuchs2012-04-131-1/+3
| | | | | | | | | | | | | | | | If the current channel is known, add frequency and channel type to NL80211_CMD_GET_INTERFACE. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: protect ->scanning by mutex in ieee80211_work_work()Stanislaw Gruszka2012-04-131-3/+5
| | | | | | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: do not scan and monitor connection in parallelStanislaw Gruszka2012-04-134-19/+53
| | | | | | | | | | | | | | | | | | Before we send probes in connection monitoring we check if scan is not pending. But we do that check without locking. Fix that and also do not start scan if connection monitoring is in progress. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: fix the assignment of PREQ's MAC address for Proactive RANNChun-Yeow Yeoh2012-04-122-2/+5
| | | | | | | | | | | | | | | | | | Record the RANN sender's address only for RANNs that meet the acceptance criteria (per sections 13.10.12.4.2). Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Reviewed-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2012-04-128-19/+11Star
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * mac80211: fix association beacon wait timeoutJohannes Berg2012-04-091-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | The TU_TO_EXP_TIME() macro already includes the "jiffies +" piece of the calculation, so don't add jiffies again. Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * Merge branch 'akpm' (Andrew's patch-bomb)Linus Torvalds2012-04-066-16/+9Star
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion." * emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
| | * simple_open: automatically convert to simple_open()Stephen Boyd2012-04-066-16/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | mac80211: fix oper channel timestamp updationRajkumar Manoharan2012-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever the station informs the AP that it is about to leave the operating channel, the timestamp should be recorded. It is handled in scan resume but not in scan start. Fix that. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | cfg80211/mac80211: enable proper device_set_wakeup_enable handlingJohannes Berg2012-04-113-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In WoWLAN, we only get the triggers when we actually get to suspend. As a consequence, drivers currently don't know that the device should enable wakeup. However, the device_set_wakeup_enable() API is intended to be called when the wakeup is enabled, not later when needed. Add a new set_wakeup() call to cfg80211 and mac80211 to allow drivers to properly call device_set_wakeup_enable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: clean up an ieee80211_do_open error pathJohannes Berg2012-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliad's comment prompted me to look closer at the error paths in ieee80211_do_open() and I found one that should use the error labels. Also add a comment about the clear_bit since in many error cases the bit hasn't been set. Cc: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: add improved HW queue controlJohannes Berg2012-04-117-38/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mac80211 currently only supports one hardware queue per AC. This is already problematic for off-channel uses since if we go off channel while the BE queue is full and then try to send an off-channel frame the frame will never go out. This will become worse when we support multi-channel since then a queue on one channel might be full, but we have to stop the software queue for all channels. That is obviously not desirable. To address this problem allow drivers to register more hardware queues, and allow them to map them to virtual interfaces. When they stop a hardware queue the corresponding AC software queues on the correct interfaces will be stopped as well. Additionally, there's an off-channel queue to solve that problem and a per-interface after-DTIM beacon queue. This allows drivers to manage software queues closer to how the hardware works. Currently, there's a limit of 16 hardware queues. This may or may not be sufficient, we can adjust it as needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: add explicit monitor interface if neededJohannes Berg2012-04-116-3/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The queue mapping redesign that I'm planning to do will break pure injection unless we handle monitor interfaces explicitly. One possible option would be to have the driver tell mac80211 about monitor mode queues etc., but that would duplicate the API since we already need to have queue assignments handled per virtual interface. So in order to solve this, have a virtual monitor interface that is added whenever all active vifs are monitors. We could also use the state of one of the monitor interfaces, but managing that would be complicated, so allocate separate state. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: manage AP netdev carrier stateJohannes Berg2012-04-112-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | The AP netdev is really only active when beaconing, so manage the carrier state accordingly. Also do that for VLAN interfaces enslaved to a given AP interface. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: Check basic rates when peeringAshok Nagarajan2012-04-113-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Section 13.2.3 of IEEE 80211s standard requires BSSBasicRateSet of mesh nodes to be identical to establish peer link. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: Modify sta_get_rates to give basic ratesAshok Nagarajan2012-04-115-11/+23
| | | | | | | | | | | | | | | | | | Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: Indicate basic rates when adding rate IEsAshok Nagarajan2012-04-114-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Basic rates are added with supported rates IE and extended supported rates IE. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: Use mandatory rates as basic rates when starting meshAshok Nagarajan2012-04-111-0/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | {nl,cfg}80211: Support for mesh synchronizationJavier Cardona2012-04-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report Toffset to userspace. Let userspace select the mesh synchronization method. Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: Implement mesh synchronization frameworkJavier Cardona2012-04-109-8/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds MBSS extensible synchronization framework (Sec. 13.13.2 of IEEE Std. 802.11-2012). The framework is implemented via an ops table which defines the following functions: rx_bcn_presp() - this is called every time a mesh beacon is received. adjust_tbtt() - this is called immediately before a beacon is about to be transmitted. The default neighbor offset synchronization defined in the standard is implemented. We also provide template functions for vendor specific methods. When neighbor offset synchronization is active (which is the default) mesh neighbors in the same MBSS will track timing offsets to each other and compensate clock drift. In our tests we observed that this mesh synchronization implementation successfully corrected drifts between stations of ~2PPM while introducing a jitter of ~20us. It is also possible to test this framework on mac80211_hwsim simulated phys to see how it behaves under different topologies, over poor links, etc. Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: Allow tsf increments via debugfsJavier Cardona2012-04-101-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 <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: sanity check for null SSIDStanislaw Gruszka2012-04-102-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While associated we should never have empty SSID, but life can be full of surprises, and is allways better to print a warning than crash. Before memcpy() in ieee80211_probereq_get() check ssid_len instead of ssid pointer, sice pointer it always passed by "ssidie + 2" expression to send probe functions, so practically never can be NULL. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: use IEEE80211_NUM_ACSJohannes Berg2012-04-105-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | When comparing hw->queues to determine if the device is QoS capable, use IEEE80211_NUM_ACS instead of just 4. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: lazily stop queues in add_pendingJohannes Berg2012-04-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding pending SKBs there's no need to stop all queues, we only need to stop those that we're adding frames to. Implement that by lazily stopping a queue as we add an SKB. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: debounce queue stop/wakeJohannes Berg2012-04-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | When the queue status changes we need to do a fair bit of work, so ignore no-op changes early. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: decouple # of netdev queues from HW queuesJohannes Berg2012-04-102-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we get more hardware queues, we'll still want to only have netdev queues per AC, so set it up in that way. If the hardware doesn't support QoS (by not supporting at least 4 queues) the netdevs get a single queue only (this is no change in behavior as there are no drivers with 2 or 3 queues today.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | mac80211: refuse TX queue configuration on non-QoS HWJohannes Berg2012-04-103-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drivers that don't support QoS also don't support setting up their ACs, catch that early. While at it, remove the input check since cfg80211 does it now. Also fix up the restart code to not try to set up the queues in this case. Finally also change the tx_conf array to have IEEE80211_NUM_ACS entries instead of # of queues since that's what it really needs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | cfg80211/nl80211: clarify TX queue APIJohannes Berg2012-04-103-15/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the plan to change mac80211's queue API to not map ACs to queues 1:1, it seems necessary to clarify some APIs that act on ACs rather than on queues to spell that out explicitly. Do this. Also verify that the AC number given is valid. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>