summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* can: Update MAINTAINERS and CREDITS fileWolfgang Grandegger2009-05-182-0/+11
| | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: Documentation for the CAN device driver interfaceWolfgang Grandegger2009-05-181-38/+197
| | | | | | | | | This patch documents the CAN netowrk device drivers interface, removes obsolete documentation and adds some useful links to CAN resources. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add TI DaVinci EMAC driverAnant Gole2009-05-183-0/+2844
| | | | | | | | | | | | | | | | Add support for TI DaVinci EMAC driver. TI DaVinci Ethernet Media Access Controller module is based upon TI CPPI 3.0 DMA engine and supports 10/100 Mbps on all and Gigabit modes on some TI devices. It supports MII/RMII and has up to 8Kbytes of internal descriptor memory. This driver has been working on several TI devices including DM644x, DM646x and DA830 platforms. The specs of this device are available at: http://www.ti.com/litv/pdf/sprue24a Signed-off-by: Anant Gole <anantgole@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: cleanup: remove unnecessary include.Rami Rosen2009-05-181-1/+0
| | | | | | | | There is no need for net/icmp.h header in net/ipv4/fib_frontend.c. This patch removes the #include net/icmp.h from it. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: cleanup - remove two unused parameters from fib_semantic_match().Rami Rosen2009-05-184-7/+3
| | | | | Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan: use struct netdev_queue counters instead of dev->statsEric Dumazet2009-05-182-8/+9
| | | | | | | | | | | We can update netdev_queue tx_bytes/tx_packets/tx_dropped counters instead of dev->stats ones, to reduce number of cache lines dirtied in xmit path. This fixes a performance problem on SMP when many different cpus take vlan tx path. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: add tx_packets/tx_bytes/tx_dropped counters in struct netdev_queueEric Dumazet2009-05-182-3/+23
| | | | | | | | | | | | | | | | | | | | | offsetof(struct net_device, features)=0x44 offsetof(struct net_device, stats.tx_packets)=0x54 offsetof(struct net_device, stats.tx_bytes)=0x5c offsetof(struct net_device, stats.tx_dropped)=0x6c Network drivers that touch dev->stats.tx_packets/stats.tx_bytes in their tx path can slow down SMP operations, since they dirty a cache line that should stay shared (dev->features is needed in rx and tx paths) We could move away stats field in net_device but it wont help that much. (Two cache lines dirtied in tx path, we can do one only) Better solution is to add tx_packets/tx_bytes/tx_dropped in struct netdev_queue because this structure is already touched in tx path and counters updates will then be free (no increase in size) Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Increase the driver version numberPeter P Waskiewicz Jr2009-05-181-1/+1
| | | | | | | | | Marching along, let's bump the version number to indicate things actually have happened to the driver. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Add generic XAUI support to 82599Peter P Waskiewicz Jr2009-05-183-0/+7
| | | | | | | | This patch adds the generic XAUI device support for 82599 controllers. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: set max desc to prevent total RSC packet size of 64KAlexander Duyck2009-05-182-11/+20
| | | | | | | | | | The performance of hardware RSC is greatly reduced if the total for max rsc descriptors multiplied by the buffer size is greater than 65535. To prevent this we need to adjust the max rsc descriptors appropriately. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-05-1849-1013/+1116
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * mac80211: make noack test availableJohannes Berg2009-05-134-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | There's this internal wifi_wme_noack_test variable that we use to set the QoS control if set. For one, it is unlikely that it is set. Secondly, if set it needs to influence the IEEE80211_TX_CTL_NO_ACK TX control flag, and finally we should also be able to set it at all, so make it available in debugfs. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: IBSS supported rate fixesJohannes Berg2009-05-131-27/+40
| | | | | | | | | | | | | | | | | | | | Currently mac80211 announces a rate set with no basic rates, this fixes it to use 1/2 or 6/9 Mbit as basic rates by default. Additionally, mac80211 will currently adopt the peer's entire rate set, rather than just the basic rate set; fix that too. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: don't connect to IBSS network with different privacyJohannes Berg2009-05-131-2/+8
| | | | | | | | | | | | | | | | | | | | Even when we find an IBSS with the SSID we're looking for, we may not be able to connect to it because it has a key and we don't, or vice versa. Avoid such situations by checking the privacy capability bit. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: split out and decrease probe wait timeJohannes Berg2009-05-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | The time we wait for a probe response after probing an AP due to beacon loss is currently the same as the monitoring interval, 2s. This is far too long, APs should respond to probes within a fraction of that time. To be able to adjust both values, add a new constant IEEE80211_PROBE_WAIT, use it for checking the probe response, and adjust it down to 200ms instead of 2 seconds. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: respond to beacon loss report only onceJohannes Berg2009-05-131-0/+11
| | | | | | | | | | | | | | | | | | | | The driver might keep reporting beacon loss until we disassociate -- catch that and don't respond to any subsequent events until the probe is either successful or we disassociate. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * wext: remove seq_start/stop sparse annotationsJohannes Berg2009-05-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Even though they are true, they cause sparse to complain because it doesn't see the __acquires(dev_base_lock) on dev_seq_start() because it is only added to the function in net/core/dev.c, not the header file. To keep track of the nesting correctly we should probably annotate those functions publically, but for now let's just remove the annotation I added to wext. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * nl80211: Add RSC configuration for new keysJouni Malinen2009-05-136-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | When setting a key with NL80211_CMD_NEW_KEY, we should allow the key sequence number (RSC) to be set in order to allow replay protection to work correctly for group keys. This patch documents this use for nl80211 and adds the couple of missing pieces in nl80211/cfg80211 and mac80211 to support this. In addition, WEXT SIOCSIWENCODEEXT compat processing in cfg80211 is extended to handle the RSC (this was already specified in WEXT, but just not implemented in cfg80211/mac80211). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * nl80211: Add IEEE 802.1X PAE control for station modeJouni Malinen2009-05-137-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new NL80211_ATTR_CONTROL_PORT flag for NL80211_CMD_ASSOCIATE to allow user space to indicate that it will control the IEEE 802.1X port in station mode. Previously, mac80211 was always marking the port authorized in station mode. This was enough when drop_unencrypted flag was set. However, drop_unencrypted can currently be controlled only with WEXT and the current nl80211 design does not allow fully secure configuration. Fix this by providing a mechanism for user space to control the IEEE 802.1X port in station mode (i.e., do the same that we are already doing in AP mode). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * nl80211: improve station flags handlingJohannes Berg2009-05-134-44/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is currently not possible to modify station flags, but that capability would be very useful. This patch introduces a new nl80211 attribute that contains a set/mask for station flags, and updates the internal API (and mac80211) to mirror that. The new attribute is parsed before falling back to the old so that userspace can specify both (if it can) to work on all kernels. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * nl80211: Validate MFP flag type when parsing STA flagsJouni Malinen2009-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | NL80211_STA_FLAG_MFP was forgotten from sta_flags_policy. The previous version added the flag due to the loop used in parse_station_flags, but the proper behavior would be to allow nla_parse_nested() to go through the policy for all flags. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * cfg80211: implement wext key handlingJohannes Berg2009-05-137-317/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move key handling wireless extension ioctls from mac80211 to cfg80211 so that all drivers that implement the cfg80211 operations get wext compatibility. Note that this drops the SIOCGIWENCODE ioctl support for getting IW_ENCODE_RESTRICTED/IW_ENCODE_OPEN. This means that iwconfig will no longer report "Security mode:open" or "Security mode:restricted" for mac80211. However, what we displayed there (the authentication algo used) was actually wrong -- linux/wireless.h states that this setting is meant to differentiate between "Refuse non-encoded packets" and "Accept non-encoded packets". (Combined with "cfg80211: fix a couple of bugs with key ioctls". -- JWL) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * wext: fix get_wireless_stats lockingJohannes Berg2009-05-111-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, get_wireless_stats is racy by _design_. This is because it returns a buffer, which needs to be statically allocated since it cannot be freed if it was allocated dynamically. Also, SIOCGIWSTATS and /proc/net/wireless use no common lock, and /proc/net/wireless accesses are not synchronised against each other. This is a design flaw in get_wireless_stats since the beginning. This patch fixes it by wrapping /proc/net/wireless accesses with the RTNL so they are protected against each other and SIOCGIWSTATS. The more correct method of fixing this would be to pass in the buffer instead of returning it and have the caller take care of synchronisation of the buffer, but even then most drivers probably assume that their callback is protected by the RTNL like all other wext callbacks. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * cfg80211: disallow interfering with stations on non-APJohannes Berg2009-05-111-0/+12
| | | | | | | | | | | | | | | | | | | | On non-AP interfaces userspace has no business interfering with the station management, this can confuse mac80211 (and other drivers probably wouldn't support it anyway). Allow adding and removing stations only on AP interfaces. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Robust Action frame categories for MFPJouni Malinen2009-05-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IEEE 802.11w/D9.0 introduces a mechanism for Action field Category values to be used to select which Action frames are Robust. Public and Vendor-specific categories are marked as not Robust in IEEE 802.11w; HT will be marked not Robust in IEEE 802.11n. A new Vendor-specific Protected category is allocated for Robust vendor-specific Action frames. Another new category, Protected Dual of Action, is introduced for protecting some existing Public Action frames (e.g., IEEE 802.11y protected enablement). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * cfg80211: put wext data into substructureJohannes Berg2009-05-113-34/+36
| | | | | | | | | | | | | | | | | | To make it more apparent in the code what is for wext only (and needs to be #ifdef'ed) put all the info for wext into a substruct in each wireless_dev. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * cfg80211: constify key mac address in opsJohannes Berg2009-05-112-6/+6
| | | | | | | | | | | | | | The address pointed to by mac_addr can be marked as const. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Cleanup ineffective return valuesVasanthakumar Thiagarajan2009-05-116-85/+36
| | | | | | | | | | | | | | | | This patch makes the return type of some of the functions void as those functions always return true Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Remove bogus break after returnVasanthakumar Thiagarajan2009-05-111-2/+0
| | | | | | | | | | Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: default WMM AC parametersWey-Yi Guy2009-05-111-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the default WMM AC parameters for BK/BE/VI/VO parameters: AC CWmin CW max AIFSN TXOP Limit TXOP Limit (802.11b) (802.11a/g) AC_BK 15 1023 7 0 0 AC_BE 15 1023 3 0 0 AC_VI 7 15 2 188 94 (6.016ms) (3.008ms) AC_VO 3 7 2 102 47 (3.264ms) (1.504ms) Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: show qos AC parametersWey-Yi Guy2009-05-111-1/+21
| | | | | | | | | | | | | | | | Show current qos AC parameters in sysfs Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlagn: show current rate scale data in debugfsWey-Yi Guy2009-05-111-0/+42
| | | | | | | | | | | | | | | | | | Add "rate_scale_data" debugfs file to show current bit rate (HT and Legacy), plus additional information (rssi, noise, tsf, beacon time stamp). Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: use #define instead of hard coded valueWey-Yi Guy2009-05-112-10/+12
| | | | | | | | | | | | | | | | | | | | Instead of hard coded value, use the define in iwl-commands.h for better code maintenance Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwl3945: read rev id in nic configAbhijeet Kolekar2009-05-111-7/+5
| | | | | | | | | | | | | | | | | | | | Read rev id in nic_config instead of nic_init. Nic_config has some checking for rev_id but we actually don't read the rev_id in there. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: more descriptive unsupported hardware messageReinette Chatre2009-05-111-1/+1
| | | | | | | | | | | | | | | | | | Somehow these pre-production cards are showing up in the community. With this message we hope that it will be clear that the hardware is not supported. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlagn: improve rate scale table searchMohamed Abbas2009-05-112-9/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | iwlagn rate scaling will periodically search other rate scale tables to switch to the best table regarding performance. In the past the number of search tables were 3. Every time the rate scale algorithm goes through these available tables in will stay in current table for some time before start searching again. Recent driver support more feature and antenna, so we have more tables to search. This patch make sure we go through all available tables. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: clean up PS codeJohannes Berg2009-05-117-292/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes all the dead code that tries to adjust the power saving level based on the system AC state (inacceptable policy in the kernel) or based on overtemp conditions (unused). Also, pass _all_ policy wrt. enabling PS to mac80211, since we do not use the power_disabled internally I now use that to mirror the mac80211 CONF_PS setting. When mac80211 turns off CONF_PS we follow suit. This means that the user power level (which can currently only be set from sysfs) is not touched for mac80211 powersave changes. This means no "association status" checks are necessary since mac80211 will not allow power save to be enabled when not associated. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: fix PS disable status raceJohannes Berg2009-05-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iwlwifi internally needs to keep track of whether PS is enabled in the firmware or not. To do this, it keeps a bit in the status flags, called STATUS_POWER_PMI. The code to set this bit looks as follows: static int iwl_set_power(struct iwl_priv *priv, void *cmd) { return iwl_send_cmd_pdu_async(priv, POWER_TABLE_CMD, sizeof(struct iwl_powertable_cmd), cmd, NULL); } int iwl_power_update_mode(...) { [...] if (final_mode != IWL_POWER_MODE_CAM) set_bit(STATUS_POWER_PMI, &priv->status); iwl_update_power_cmd(priv, &cmd, final_mode); cmd.keep_alive_beacons = 0; if (final_mode == IWL_POWER_INDEX_5) cmd.flags |= IWL_POWER_FAST_PD; ret = iwl_set_power(priv, &cmd); if (final_mode == IWL_POWER_MODE_CAM) clear_bit(STATUS_POWER_PMI, &priv->status); else set_bit(STATUS_POWER_PMI, &priv->status); if (priv->cfg->ops->lib->update_chain_flags && update_chains) priv->cfg->ops->lib->update_chain_flags(priv); [...] } Now, this bit really needs to track what the _firmware_ thinks, not what the driver thinks. Therefore, there is a race condition here -- the driver sets the bit before it knows that the async command sent to the card in the iwl_set_power function has been processed. As a result, the call to update_chain_flags() may think that the card has been woken up (PMI bit cleared) while in reality it hasn't processed the async POWER_TABLE_CMD yet. This leads to bugs -- any commands the update_chain_flags function sends can get stuck and subsequent commands also fail. The fix is almost trivial: since there's no reason to send an async command here (in fact, there almost never should be since many mac80211 callbacks can sleep) just make the function wait for the card to process the command and then return and clear the PMI bit. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: do proper hw restartJohannes Berg2009-05-114-61/+24
| | | | | | | | | | | | | | | | | | When the microcode fails for any reason, ask mac80211 to recover instead of trying ourselves and failing at it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: remove ieee80211_ht_bss_infoJohannes Berg2009-05-111-16/+0
| | | | | | | | | | | | | | This struct is no longer used (and hasn't been for a while). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: properly track HT operation_modeJohannes Berg2009-05-112-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | When we disassociate, we set the channel to non-HT which obviously invalidates any ht_operation_mode setting. But when we then associate with the next AP again, we might still have the ht_operation_mode from the previous AP cached and fail to configure the hardware with the new (but unchanged) operation mode. This patch fixes it by separately tracking whether our cache is valid. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: move HT operation mode BSS infoJohannes Berg2009-05-115-20/+11
| | | | | | | | | | | | | | | | | | There really is no need to have a separate struct for a single variable. The fact that it exists is due to the code legacy, but we can remove that now. Very simple. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rt2x00: Fix chipset detection for rt73usbIvo van Doorn2009-05-111-1/+1
| | | | | | | | | | | | | | | | | | The lower 4 bytes of the chipset revision must contain a non-zero value. This bug was introduced by "rt2x00: Simplify rt2x00_check_rev". Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: improve scan timingJohannes Berg2009-05-111-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to ieee80211_hw_config() is supposed to apply changes synchronously, so once it returns the parameters are applied to the hardware. Thus, there really is no need to delay the probing by the channel switch time again since the channel switch has already happened once we get to this code. Additionally, there is no need to wait for a NAV update (probe delay) when the channel is passively scanned. Remove that extra time too. This cuts scanning time from over 7 seconds to under 4 on ar9170, which is due to the number of channels scanned and ar9170's switch time being advertised as 135ms (my test now indicates it is about 77ms with the current driver, but the difference might also be due to using a different machine with different USB controllers). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: MFP - Drop unprotected Action frames prior key setupJouni Malinen2009-05-111-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When management frame protection (IEEE 802.11w) is used, unprotected Robust Action frames are not allowed prior to key configuration. However, unprotected Deauthentication and Disassociation frames are allowed at that point, but not after key configuration. Make ieee80211_drop_unencrypted() handle the special cases for MFP by separating the basic Data frame case from Management frame processing and handle the Management frames only if MFP has been negotiated. In addition, do not use sdata->drop_unencrypted for Management frames since the decision on whether to accept the frame depends on the key being configured. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: Drop unencrypted frames based on key setupJouni Malinen2009-05-111-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using nl80211, we do not have a mechanism to set sdata->drop_unencrypted. Currently, this breaks code that is supposed to drop unencrypted frames when protection is expected since ieee80211_rx_h_decrypt() is optimized to not set rx->key when the frame is not protected. This patch modifies ieee80211_rx_h_decrypt() to set rx->key for all frames and only skip decryption if the frame is not protected. This allows ieee80211_drop_unencrypted() to correctly drop frames even if drop_unencrypted is not set. The changes here are not enough to handle all cases, though. Additional patches will be needed to implement proper IEEE 802.1X PAE for station mode (currently, this is only used for AP mode) and some additional rules are needed for MFP to drop unprotected Robust Action frames prior to having PTK and IGTK configured. In theory, the unprotected frames could and should be dropped in ieee80211_rx_h_decrypt(). However, due to the special case with EAPOL frames that have to be allowed to be received unprotected even when keys are set, it is simpler to only set rx->key and allow the ieee80211_frame_allowed() function to handle the actual dropping of data frames after 802.11->802.3 header conversion. In addition, unprotected robust management frames are dropped before they are processed. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: make iwl_set_rate staticJohannes Berg2009-05-112-4/+1
| | | | | | | | | | | | | | | | It's not needed outside iwl-core.c Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * cfg80211: fix wext iw_freq parsingJohannes Berg2009-05-111-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function to parse a struct iw_freq has a stupid bug, it returns NULL when the channel cannot be found at all, but NULL is supposed to mean "auto". Fix this by checking the return value of ieee80211_get_channel() and returning ERR_PTR(-EINVAL) if it returned NULL (channel not found). This fixes an issue where you could say (in IBSS mode) iwconfig wlan0 channel 21 and it would use channel 1 instead because that's the first available channel with IBSS allowed (which is what the "auto" setting uses). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: set default QoS values according to specJohannes Berg2009-05-112-12/+52
| | | | | | | | | | | | | | | | | | | | | | We've never really cared about the default QoS (WMM) values, but we really should if the AP doesn't send any. This patch makes mac80211 use the default values according to 802.11-2007, and additionally syncs the default values when we disassociate so whatever the last AP said gets "unconfigured". Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * mac80211: fix scan channel raceJohannes Berg2009-05-113-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a software scan starts, it first sets sw_scanning, but leaves the scan_channel "unset" (it currently actually gets initialised to a default). Now, when something else tries to (re)configure the hardware in the window between these two events (after sw_scanning = true, but before scan_channel is set), the current code switches to the (unset!) scan_channel. This causes trouble, especially when switching bands and sending frames on the wrong channel. To work around this, leave scan_channel initialised to NULL and use it to determine whether or not a switch to a different channel should occur (and also use the same condition to check whether to adjust power for scan or not). Additionally, avoid reconfiguring the hardware completely when recalculating idle resulted in no changes, this was the problem that originally led us to discover the race condition in the first place, which was helpfully bisected by Pavel. This part of the patch should not be necessary with the other fixes, but not calling the ieee80211_hw_config function when we know it to be unnecessary is certainly a correct thing to do. Unfortunately, this patch cannot and does not fix the race condition completely, but due to the way the scan code is structured it makes the particular problem Pavel discovered (race while changing channel at the same time as transmitting frames) go away. To fix it completely, more work especially with locking configuration is needed. Bisected-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud