aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
Commit message (Collapse)AuthorAge
...
* wireless: remove cfg80211_reg_mutexJohannes Berg2008-10-31
| | | | | | | | | | | This mutex is wrong, we use cfg80211_drv_mutex (which should possibly be renamed to just cfg80211_mutex) everywhere except in one place, fix that and get rid of the extra mutex. Also get rid of a spurious regulatory_requests list definition. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: don't publish __regulatory_hintJohannes Berg2008-10-31
| | | | | | | | This function requires an internal lock to be held, so it cannot be published to other modules in the kernel. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Add nl80211 commands to get and set o11s mesh networking parameterscolin@cozybit.com2008-10-31
| | | | | | | | | | | | | | | | The two new commands are NL80211_CMD_GET_MESH_PARAMS and NL80211_CMD_SET_MESH_PARAMS. There is a new attribute enum, NL80211_ATTR_MESH_PARAMS, which enumerates the various mesh configuration parameters. Moved struct mesh_config from mac80211/ieee80211_i.h to net/cfg80211.h. nl80211_get_mesh_params and nl80211_set_mesh_params unpack the netlink messages and ask the driver to get or set the configuration. This is done via two new function stubs, get_mesh_params and set_mesh_params, in struct cfg80211_ops. Signed-off-by: Colin McCabe <colin@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: fix monitor flagsJohannes Berg2008-10-31
| | | | | | | | | | | | | NLA_NESTED attributes cannot be empty, but we want to be able to specify "no flags" (empty attribute) vs. "no change" (no attribute). Therefore, remove the NLA_NESTED policy so it can work as an empty attribute. I guess I should have used a u32 for these flags instead, but we're stuck with it now. Haven't noticed earlier because of a bug in iw... Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: export HT capabilitiesJohannes Berg2008-10-31
| | | | | | | This exports the local HT capabilities in nl80211. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: fix regression caused by regulatory config optionArjan van de Ven2008-10-26
| | | | | | | | | | | | | | | | | | | The default for the regulatory compatibility option is wrong; if you picked the default you ended up with a non-functional wifi system (at least I did on Fedora 9 with iwl4965). I don't think even the October 2008 releases of the various distros has the new userland so clearly the default is wrong, and also we can't just go about deleting this in 2.6.29... Change the default to "y" and also adjust the config text a little to reflect this. This patch fixes regression #11859 With thanks to Johannes Berg for the diagnostics Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cfg80211: fix debugfs error handlingJohannes Berg2008-10-14
| | | | | | | | | If something goes wrong creating the debugfs dir or when debugfs is not compiled in, the current code might lead to trouble; make it more robust. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: remove duplicated #includeHuang Weiyi2008-10-13
| | | | | | | | | Removed duplicated include <linux/list.h> in net/wireless/core.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* wireless: fix typo in Kconfig.Davide Pesavento2008-10-06
| | | | | Signed-off-by: Davide Pesavento <davidepesa@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: a global static to local static improvementDenis ChengRq2008-09-24
| | | | | | | | | | There are two improvements in this simple patch: 1. wiphy_counter is a static var only used in one function, so can use local static instead of global static; 2. wiphy_counter wrap handling killed one comparision; Signed-off-by: Denis ChengRq <crquan@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: reject invalid configuration itemsJohannes Berg2008-09-24
| | | | | | | Reject configuring mesh-id for non-mesh, monitor flags for non-monitor. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: allow set_interface without typeJohannes Berg2008-09-24
| | | | | | | Which then causes no type change. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: show interface typeJohannes Berg2008-09-24
| | | | | | | | | | This patch makes cfg80211 show the interface in the nl80211 information about a specific interface. API users are required to keep the type updated (everything else is fairly complicated) but you will get a warning if you fail to keep it updated. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: clean up static regdomain messJohannes Berg2008-09-24
| | | | | | | | | The statically defined regdomains are used in a very convoluted way, use them instead to prime the information we have and then continue operating normally. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: fix regulatory code constJohannes Berg2008-09-24
| | | | | | | | | | A few pointers and structures in the regulatory code are const, but because it wasn't done properly a whole bunch of bogus casts were needed to compile without warning. Mark everything const properly to avoid that kind of junk code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: clean up regulatory messJohannes Berg2008-09-24
| | | | | | | | | | The recent code from Luis is an #ifdef hell and contains lots of code that's stuffed into the wrong file making a whole bunch of things needlessly non-static, and besides, what is it doing in core.c?? Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: fix static regdomainsJohannes Berg2008-09-24
| | | | | | | | | | When Luis added the static regdomains back he used +/-20 of the centre frequencies to account for 40MHz bandwidth neglecting the fact that 40MHz bandwidth cannot be used on the channels close to the allowed band edges. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: Add new wireless regulatory infrastructureLuis R. Rodriguez2008-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the new wireless regulatory infrastructure. The main motiviation behind this was to centralize regulatory code as each driver was implementing their own regulatory solution, and to replace the initial centralized code we have where: * only 3 regulatory domains are supported: US, JP and EU * regulatory domains can only be changed through module parameter * all rules were built statically in the kernel We now have support for regulatory domains for many countries and regulatory domains are now queried through a userspace agent through udev allowing distributions to update regulatory rules without updating the kernel. Each driver can regulatory_hint() a regulatory domain based on either their EEPROM mapped regulatory domain value to a respective ISO/IEC 3166-1 country code or pass an internally built regulatory domain. We also add support to let the user set the regulatory domain through userspace in case of faulty EEPROMs to further help compliance. Support for world roaming will be added soon for cards capable of this. For more information see: http://wireless.kernel.org/en/developers/Regulatory/CRDA For now we leave an option to enable the old module parameter, ieee80211_regdom, and to build the 3 old regdomains statically (US, JP and EU). This option is CONFIG_WIRELESS_OLD_REGULATORY. These old static definitions and the module parameter is being scheduled for removal for 2.6.29. Note that if you use this you won't make use of a world regulatory domain as its pointless. If you leave this option enabled and if CRDA is present and you use US or JP we will try to ask CRDA to update us a regulatory domain for us. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-09-08
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: net/mac80211/mlme.c
| * net/wireless/Kconfig: clarify the description for CONFIG_WIRELESS_EXT_SYSFSFlorian Mickler2008-09-02
| | | | | | | | | | | | | | | | | | | | | | | | Current setup with hal and NetworkManager will fail to work without newest hal version with this config option disabled. Although this will solve itself by time, at the moment it is dishonest to say that we don't know any software that uses it, if there are many many people relying on old hal versions. Signed-off-by: Florian Mickler <florian@mickler.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: keep track of supported interface modesLuis R. Rodriguez2008-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is obviously good for userspace to know up front which interface modes a given piece of hardware might support (even if adding such an interface might fail later because of concurrency issues), so let's make cfg80211 aware of that. For good measure, disallow adding interfaces in all other modes so drivers don't forget to announce support for one mode when they add it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Stephen Blackheath <tramp.enshrine.stephen@blacksapphire.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211/cfg80211: HT capabilities for NEW_STAJouni Malinen2008-08-29
| | | | | | | | | | | | | | | | | | Allow userspace (e.g., hostapd) to set HT capabilities for associated STAs. This is based on a patch from Zhu Yi <yi.zhu@intel.com> (only the NL80211_ATTR_HT_CAPABILITY for NEW_STA part is included here). Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211/cfg80211: Add BSS configuration options for AP modeJouni Malinen2008-08-29
|/ | | | | | | | | | | | This change adds a new cfg80211 command, NL80211_CMD_SET_BSS, to allow AP mode BSS parameters to be changed from user space (e.g., hostapd). The drivers using mac80211 are expected to be modified with separate changes to use the new BSS info parameter for short slot time in the bss_info_changed() handler. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wext: Send name on eventsJamal Hadi Salim2008-08-13
| | | | | | | | In the minimal the wireless extensions oughta send at least the name in addition to the ifindex. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* nl80211: fix dump callbacksJohannes Berg2008-07-29
| | | | | | | | | | | Julius Volz pointed out that the dump callbacks in nl80211 were broken and fixed one of them. This patch fixes the other three and also addresses the TODOs there. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Julius Volz <juliusv@google.com> Cc: Thomas Graf <tgraf@suug.ch> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* netns: Use net_eq() to compare net-namespaces for optimization.YOSHIFUJI Hideaki2008-07-20
| | | | | | | | Without CONFIG_NET_NS, namespace is always &init_net. Compiler will be able to omit namespace comparisons with this patch. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: make sysfs bits optional and deprecate themJohannes Berg2008-07-14
| | | | | | | | | | | The /sys/class/net/*/wireless/ direcory is, as far as I know, not used by anyone. Additionally, the same data is available via wext ioctls. Hence the sysfs files are pretty much useless. This patch makes them optional and schedules them for removal. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net/wireless/nl80211.c: fix endless Netlink callback loop.Julius Volz2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although I only tested similar code (I don't use any of this wireless code), the state maintainance between Netlink dump callback invocations seems wrong here and should lead to an endless loop. There are also other examples in the same file which might have the same problem. Perhaps someone can actually test this (or refute my logic). Take the simple example with only one element in the list (which should fit into the message): 1. invocation: Start: idx = 0, start = 0 Loop: condition (++idx < start) => (1 < 0) => false => no continue, fill one entry, exit loop, return skb->len > 0 2. invocation: Start: idx = 0, start = 1 Loop: condition (++idx < start) => (1 < 1) => false => no continue, fill the same entry again, exit loop, return skb->len > 0 3. invocation: Same as 2. invocation, endless invocation of callback. Also, iterations where the filling of an element fails should not be counted as completed, so idx should not be incremented in this case. Signed-off-by: Julius Volz <juliusv@google.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wext: Create IW_REQUEST_FLAG_COMPAT and set it as needed.David S. Miller2008-06-16
| | | | | | | Now low-level WEXT ioctl handlers can do compat handling when necessary. Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Dispatch and handle compat ioctls entirely in net/wireless/wext.cDavid S. Miller2008-06-16
| | | | | | | | | Next we can kill the hacks in fs/compat_ioctl.c and also dispatch compat ioctls down into the driver and 80211 protocol helper layers in order to handle iw_point objects embedded in stream replies which need to be translated. Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Pull top-level ioctl dispatch logic into helper function.David S. Miller2008-06-16
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Pass iwreq pointer down into standard/private handlers.David S. Miller2008-06-16
| | | | | | They have no need to see the object as an ifreq. Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Parameterize the standard/private handlers.David S. Miller2008-06-16
| | | | | | | The WEXT standard and private handlers to use are now arguments to wireless_process_ioctl(). Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Pull ioctl permission checking out into helper function.David S. Miller2008-06-16
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Extract private call iw_point handling into seperate functions.David S. Miller2008-06-16
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Extract standard call iw_point handling into seperate function.David S. Miller2008-06-16
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Make adjust_priv_size() take a "struct iw_point *".David S. Miller2008-06-16
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* wext: Remove inline from get_priv_size() and adjust_priv_size().David S. Miller2008-06-16
| | | | | | The compiler inlines when appropriate. Signed-off-by: David S. Miller <davem@davemloft.net>
* mac80211: implement EU regulatory domainTony Vroon2008-06-14
| | | | | | | | | | | Implement missing EU regulatory domain for mac80211. Based on the information in IEEE 802.11-2007 (specifically pages 1142, 1143 & 1148) and ETSI 301 893 (V1.4.1). With thanks to Johannes Berg. Signed-off-by: Tony Vroon <tony@linx.net> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-06-10
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
| * netlink: Improve returned error codesThomas Graf2008-06-03
| | | | | | | | | | | | | | | | | | | | | | Make nlmsg_trim(), nlmsg_cancel(), genlmsg_cancel(), and nla_nest_cancel() void functions. Return -EMSGSIZE instead of -1 if the provided message buffer is not big enough. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* | wireless: Add missing locking to cfg80211_dev_renameEric W. Biederman2008-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | device_rename only performs useful and race free validity checking at the optional sysfs level so depending on it for all of the validity checking in cfg80211_dev_rename is racy. Instead implement all of the needed validity checking and locking in cfg80211_dev_rename. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: use get/put_unaligned_* helpersHarvey Harrison2008-05-14
|/ | | | | Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-04-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
| * nl80211: fix STA AID bugJohannes Berg2008-04-07
| | | | | | | | | | | | | | | | This fixes the STA AID setting and actually makes hostapd/mac80211 work properly in presence of power-saving stations. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: default to regulatory max power for channelJohn W. Linville2008-04-08
| | | | | | | | | | | | | | If the driver does not specify a maximum power output, default to the regulatory max. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: don't export ieee80211_get_channelJohannes Berg2008-03-27
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes ieee80211_get_channel a static inline defined in cfg80211's header file which simply calls __ieee80211_get_channel to avoid symbol clashes with the ieee80211 code. The problem was pointed out by David Miller, thanks! Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: David Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'net-2.6.26-netns-20080326' of ↵David S. Miller2008-03-25
|\ \ | | | | | | | | | git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev
| * | [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS.YOSHIFUJI Hideaki2008-03-25
| | | | | | | | | | | | | | | | | | | | | | | | Introduce per-net_device inlines: dev_net(), dev_net_set(). Without CONFIG_NET_NS, no namespace other than &init_net exists. Let's explicitly define them to help compiler optimizations. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* | | wireless: add wiphy channel freq to channel struct lookup helperJohannes Berg2008-03-25
|/ / | | | | | | | | | | | | | | Add ieee80211_get_channel() which gets you a channel struct for a specific wiphy if that channel is present in that wiphy. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>