summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-25cfg80211: Fix regulatory check for 60GHz band frequenciesVladimir Kondratiev1-5/+14
The current regulatory code on cfg80211 performs a check to see if a regulatory rule belongs to an IEEE band so that if a Country IE is received and no rules are specified for a band (which is allowed by IEEE) those bands are left intact. The current band check assumes a rule is bound to a band if the rule's start or end frequency is less than 2 GHz apart from the center of frequency being inspected. In order to support 60 GHz for 802.11ad we need to increase this to account for the channel spacing of 2160 MHz whereby a channel somewhere in the middle of a regulatory rule may be more than 2 GHz apart from either the beginning or end of the frequency rule. Without a fix for this even though channels 1-3 are allowed world wide on the rule (57240 - 63720 @ 2160), channel 2 at 60480 MHz will end up getting disabled given that it is 3240 MHz from both the frequency rule start and end frequency. Fix this by using 2 GHz separation assumption for the 2.4 and 5 GHz bands but for 60 GHz use a 10 GHz separation before assuming a rule is not part of the band. Since we have no 802.11ad drivers yet merged this change has no impact to existing Linux upstream device drivers. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-24rfkill: prevent unnecessary event generationVitaly Wool1-1/+7
Prevent unnecessary rfkill event generation when the state has not actually changed. These events have to be delivered to relevant userspace processes, causing these processes to wake up and do something while they could as well have slept. This obviously results in more CPU usage, longer time-to-sleep-again and therefore higher power consumption. Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Mykyta Iziumtsev <nikita.izyumtsev@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-21mac80211: don't send delBA on addBA failureJohannes Berg1-1/+1
There's no reason to send a delBA when the peer refused our addBA, so change that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-21mac80211: don't send delBA when removing stationsJohannes Berg1-1/+1
When a station is removed and we stop the aggregation sessions, it's not useful to send delBA since this is due to us or the station disassociating or dropping the connection in some other way, so change that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-21mac80211: don't send delBA before disassocJohannes Berg1-1/+1
When we disassociate, it's not really useful to send delBA action frames since we're going to send disassoc/deauth anyway, so change that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-20mac80211: fix IBSS auth TX debug messageSylvain Roger Rieunier1-1/+1
In the IBSS auth TX debug message the BSSID and DA address are reversed, fix that. Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com> [reword commit message and make it fit 72 cols] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-19cfg80211: constify name parameter to add_virtual_intfJohannes Berg6-7/+8
The name can't be modified by the driver, make it const. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-19mac80211: make reset debugfs depend on CONFIG_PMJohannes Berg1-0/+4
The suspend/resume code depends on CONFIG_PM, so the reset debugfs file can only be made available if that is enabled. Fengguang Wu's zero-day build testing found this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-18cfg80211/nl80211: Notify connection request failure in AP modePandiyarajan Pitchaimuthu5-0/+93
In AP mode, when a station requests connection to an AP and if the request is failed for particular reason, userspace is notified about the failure through NL80211_CMD_CONN_FAILED command. Reason for the failure is sent through the attribute NL80211_ATTR_CONN_FAILED_REASON. Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-18cfg80211: remove obsolete comment for .sched_scan_stop() callbackArend van Spriel1-3/+1
The kerneldoc comment for .sched_scan_stop() callback describes a driver_initiated flag, but the interface does not hold such a flag. Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-18wireless: remove unreachable codeAlan Cox1-19/+1
The only case where intersected_rd can become non NULL is within an if. All paths from that if return, so the end chunk has therefore squawked its last and is no more. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-14mac80211: allow re-open the blocked peer link in meshChun-Yeow Yeoh1-1/+2
Peer link which is blocked using the "iw mesh0 station set <MAC addr> plink_action block" is previously not able to re-open using "iw mesh0 station set <MAC addr> plink_action open". This patch is intended to solve this. If the station plink state remains at OPN_SNT once open, try block and open again should solve this problem. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-14mac80211: change locking around ieee80211_recalc_smpsJohannes Berg4-8/+5
Make the function acquire the necessary mutex itself to simplify the callers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-14mac80211: handle power constraint/country IE betterJohannes Berg3-22/+72
Currently, mac80211 uses the power constraint IE, and reduces the regulatory max TX power by it. This can cause issues if the AP is advertising a large power constraint value matching a high TX power in its country IE, for example in this case: ... Country: US Environment: Indoor/Outdoor ... Channels [157 - 157] @ 30 dBm ... Power constraint: 13 dB ... What happened here is that our local regulatory TX power is 15 dBm, and gets reduced by 13 dB so we end up with only 2 dBm effective TX power, which is way too low. Instead, handle the country IE/power constraint IE combined and restrict our TX power to the max of the regulatory power and the maximum power advertised by the AP, in this case 17 dBm (= 30 dBm - 13 dB). Also print a message when this happens to let the user know and help us debug issues with it. Reported-by: Carl A. Cook <CACook@quantum-equities.com> Tested-by: Carl A. Cook <CACook@quantum-equities.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-11mac80211: remove unneeded CONFIG_PM ifdefJohannes Berg1-13/+0
The functions are only called if CONFIG_PM is set as the callers are under an ifdef, so there's no need to also define no-op functions. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-10mac80211: validate skb->dev in the tx status pathFelix Fietkau1-18/+30
skb->dev might contain a stale reference to a device that was already deleted, and using it unchecked can lead to invalid pointer accesses. Since this is only used for nl80211 tx, iterate over active interfaces to find a match for skb->dev, and discard the tx status if the device is gone. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-10mac80211: use call_rcu() on sta deletionEliad Peller3-57/+81
mac80211 calls synchronize_rcu() on sta deletion, which increase the roaming time significantly. Convert it into a call_rcu() mechanism, in order to avoid blocking. Since some of the cleanup functions might sleep, schedule from the call_rcu callback a new work that will do the actual cleanup. In order to make sure the cleanup occurs before the interface went down, flush local->workqueue on ieee80211_do_stop(). Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-10mac80211: add key flag for management keysJohannes Berg6-6/+46
Mark keys that might be used to receive management frames so drivers can fall back on software crypto for them if they don't support hardware offload. As the new flag is only set correctly for RX keys and the existing IEEE80211_KEY_FLAG_SW_MGMT flag can only affect TX, also rename the latter to IEEE80211_KEY_FLAG_SW_MGMT_TX. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-07mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSSAntonio Quartulli1-1/+32
Whenever a host gets an AUTH frame it first allocates a new station and then replies with another AUTH frame. However, if sta allocations fails the host should send a DEAUTH frame instead to tell the other end that something went wrong. Signed-off-by: Antonio Quartulli <ordex@autistici.org> [reword commit message a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-07mac80211: move ieee80211_send_deauth_disassoc outside mlme codeAntonio Quartulli3-50/+54
Move ieee80211_send_deauth_disassoc() to util.c to make it available for the rest of the mac80211 code. Signed-off-by: Antonio Quartulli <ordex@autistici.org> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-07net/mac80211/scan.c: removes unnecessary semicolonPeter Senna Tschudin1-1/+1
removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06mac80211: refactor set_channel_typeMichal Kazior1-19/+48
Split functionality for further reuse. Will prevent code duplication when channel context channel_type merging is introduced. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06mac80211: use synchronize_net() on key destroyingEliad Peller1-1/+1
__ieee80211_key_destroy() calls synchronize_rcu() in order to sync the tx path before destroying the key. However, synching the tx path can be done with synchronize_net() as well, which is usually faster (the timing might be important for roaming scenarios). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06mac80211: check power constraint IE size when parsingJohannes Berg3-10/+6
The power constraint IE is always a single byte so check the size when parsing instead of later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06mac80211_hwsim: move module_init/exitJohannes Berg1-4/+1
These should be with the functions so move the module_init/exit statements. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06wireless: remove obsolete chan no/center freq conversion functionsJohannes Berg1-80/+0
There are a number of functions that shouldn't really be used when modern functions that take the band are available in cfg80211. Remove these, but for now keep * ieee80211_freq_to_dsss_chan and * ieee80211_dsss_chan_to_freq as they're used in older drivers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06Merge remote-tracking branch 'wireless-next/master' into mac80211-nextJohannes Berg146-1386/+4319
2012-09-06mac80211: disconnect if channel switch failsJohannes Berg2-18/+38
Disconnect from the AP if channel switching in the driver failed or if the new channel is unavailable. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06mac80211: don't hang on to sched_scan_iesJohannes Berg2-26/+14
There's no need to keep a copy of the scheduled scan IEs after the driver has been told, if it requires a copy it must make one. Therefore, we can move sched_scan_ies into the function. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06Merge remote-tracking branch 'mac80211/master' into mac80211-nextJohannes Berg11-44/+66
Pull in mac80211.git to let the next patch apply without conflicts, also resolving a hwsim conflict. Conflicts: drivers/net/wireless/mac80211_hwsim.c Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-06mac80211: use list_move instead of list_del/list_addWei Yongjun1-2/+1
Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-05cfg80211: fix indentationHila Gonen1-1/+1
checkpatch pointed out an issue, fix it. Signed-off-by: Hila Gonen <hila.gonen@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-05wext: include wireless event id when it has a size problemArend van Spriel1-4/+4
The wext code checks is the event data is within size limits. When this check fails a message is logged with violating size. This patch adds the event id to put us on the right track for resolving that violation. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-05mac80211: Various small fixes for cfg.c: mpath_set_pinfo()LEO Airwarosu Yoichi Shinoda1-5/+4
Various small fixes for net/mac80211/cfg.c:mpath_set_pinfo(): Initialize *pinfo before filling members in, handle MESH_PATH_RESOLVED correctly, and remove bogus assignment; result in correct display of FLAGS values and meaningful EXPTIME for expired paths in iw utility. Signed-off-by: Yoichi Shinoda <shinoda@jaist.ac.jp> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-05mac80211: don't use kerneldoc for ieee80211_add_rx_radiotap_headerJohannes Berg1-1/+1
Doing so creates warnings, but the function is internal and not part of the 802.11 docbooks, so it from kerneldoc. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-05cfg80211: add kerneldoc entry for "vht_cap"Robert P. J. Day1-0/+1
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-05cfg80211: use list_move_tail instead of list_del/list_add_tailWei Yongjun1-4/+2
Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-04nl80211: fix possible memory leak nl80211_connect()Wei Yongjun1-1/+3
connkeys is malloced in nl80211_parse_connkeys() and should be freed in the error handling case, otherwise it will cause memory leak. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-04mac80211: clear bssid on auth/assoc failureEliad Peller1-0/+4
ifmgd->bssid wasn't cleared properly in some auth/assoc failure cases, causing mac80211 and the low-level driver to go out of sync. Clear ifmgd->bssid on failure, and notify the driver. Cc: stable@kernel.org # 3.4+ Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-09-04mac80211: Do not check for valid hw_queues for P2P_DEVICEIlan Peer1-7/+9
A P2P Device interface does not have a netdev, and is not expected to be used for transmitting data, so there is no need to assign hw queues for it. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-08-23Merge branch 'for-john' of ↵John W. Linville3-1/+46
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-08-22Merge branch 'for-john' of ↵John W. Linville15-93/+241
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2012-08-22mac80211: Fix AP mode regressionSujith Manoharan1-1/+1
Commit mac80211: avoid using synchronize_rcu in ieee80211_set_probe_resp changed the return value when the probe response template is not present. Revert to the earlier value of 1 - this fixes AP mode for drivers like ath9k. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-08-22mac80211: fix DS to MBSS address translationThomas Pedersen1-22/+16
The destination address of unicast frames forwarded through a mesh gate was being replaced with the broadcast address. Instead leave the original destination address as the mesh DA. If the nexthop address is not in the mpath table it will be resolved. If that fails, the frame will be forwarded to known mesh gates. Reported-by: Cedric Voncken <cedric.voncken@acksys.fr> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-08-22carl9170: report A-MPDU statusChristian Lamparter2-4/+12
Because the hardware reports whenever an frame was either at the start, in the middle or at the end of a A-MPDU, we can easily report the information for radiotap. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-22ath9k_htc: implement sta_rc_update() mac80211 callbackAntonio Quartulli1-0/+29
In case of changes in the supported rates set for a given station, it is now possible to use this callback to update the current internal state of the station in the htc driver. Reported-by: Gui Iribarren <gui@altermundi.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-22bcma: detect and register NAND flash deviceRafał Miłecki5-4/+48
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-22bcma: detect and register serial flash deviceRafał Miłecki6-4/+146
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-22Merge branch 'for-john' of ↵John W. Linville84-617/+1245
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/mac80211_hwsim.c
2012-08-21Revert "rfkill: remove dead code"AceLan Kao2-0/+45
This reverts commit 2e48928d8a0f38c1b5c81eb3f1294de8a6382c68. Those functions are needed and should not be removed, or there is no way to set the rfkill led trigger name. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>