summaryrefslogtreecommitdiffstats
path: root/net/mac80211
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge remote-tracking branch 'mac80211/master' into mac80211-nextJohannes Berg2012-09-065-29/+30
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | mac80211: Various small fixes for cfg.c: mpath_set_pinfo()LEO Airwarosu Yoichi Shinoda2012-09-051-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>
| * | | | mac80211: clear bssid on auth/assoc failureEliad Peller2012-09-041-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>
| * | | | mac80211: fix DS to MBSS address translationThomas Pedersen2012-08-221-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>
| * | | | mac80211: cancel mesh path timerJohannes Berg2012-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mesh path timer needs to be canceled when leaving the mesh as otherwise it could fire after the interface has been removed already. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | | | mac80211: clear timer bits when disconnectingJohannes Berg2012-08-012-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a corner case that can happen when we suspend with a timer running, then resume and disconnect. If we connect again, suspend and resume we might start timers that shouldn't be running. Reset the timer flags to avoid this. This affects both mesh and managed modes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | | | mac80211: don't clear sched_scan_sdata on sched scan stop requestEliad Peller2012-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ieee80211_request_sched_scan_stop() cleared local->sched_scan_sdata. However, sched_scan_sdata should be cleared only after the driver calls ieee80211_sched_scan_stopped() (like with normal hw scan). Clearing sched_scan_sdata too early caused ieee80211_sched_scan_stopped_work to exit prematurely without properly cleaning all the sched scan resources and without calling cfg80211_sched_scan_stopped (so userspace wasn't notified about sched scan completion). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | | | Merge remote-tracking branch 'wireless/master' into mac80211Johannes Berg2012-07-3040-2002/+2150
| |\ \ \ \
| * | | | | mac80211: fix scan_sdata assignmentJohannes Berg2012-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to use RCU to assign scan_sdata. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | | | mac80211: use list_move instead of list_del/list_addWei Yongjun2012-09-061-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>
* | | | | | mac80211: don't use kerneldoc for ieee80211_add_rx_radiotap_headerJohannes Berg2012-09-051-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>
* | | | | | mac80211: Do not check for valid hw_queues for P2P_DEVICEIlan Peer2012-09-041-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>
* | | | | mac80211: Fix AP mode regressionSujith Manoharan2012-08-221-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>
* | | | mac80211: clean up ieee80211_subif_start_xmitJohannes Berg2012-08-201-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to carry around a return value that is always NETDEV_TX_OK anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: pass channel to ieee80211_send_probe_reqJohannes Berg2012-08-204-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In multi-channel scenarios, the channel that we will transmit a probe request on isn't always the current channel (which will be NULL anyway) but will instead be the channel that the AP is on. Pass the channel to the ieee80211_send_probe_req() function so it can be used in the different scenarios. The scan code continues to pass the current channel, of course. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: convert ops checks to WARN_ONJohannes Berg2012-08-201-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to BUG_ON when a driver registers invalid operations, warn and return an error. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: check operating channel in scanJohannes Berg2012-08-201-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The optimisation of scanning only on the current channel should check the operating channel. Also modify it to compare channel pointer rather than the frequency. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use RX status band instead of current bandJohannes Berg2012-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even for single-channel devices it is possible that we switch the channel temporarily (e.g. for scanning) but while doing so process a received frame that was still received on the old channel, so checking the current band is racy. Use the band from status instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: don't assume channel is set in tracingJohannes Berg2012-08-201-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the move to multi-channel and away from drv_config(), hw.conf.channel will not always be set, only for devices using the current API instead of the new channel context APIs. Check the channel is set before adding its frequency to the trace data. Also break some overly long lines in the code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use oper_channel in rate initJohannes Berg2012-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using hw.conf.channel is wrong as it could be the temporary channel if the station is added from the workqueue while the device is already on another channel. Use oper_channel instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: remove freq/chantype from debugfsJohannes Berg2012-08-201-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now get these values through iw, and they conflict with multi-channel work. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: remove almost unused local variableJohannes Berg2012-08-201-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In ieee80211_beacon_get_tim() we can use the txrc.sband instead of a separate local variable. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: mesh: don't use global channel typeJohannes Berg2012-08-202-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using local->_oper_channel_type in the mesh code is completely wrong as this value is the combination of the various interface channel types and can be a different value from the mesh interface in case there are multiple virtual interfaces. Use sdata->vif.bss_conf.channel_type instead as it tracks the per-vif channel type. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: simplify buffers in aes_128_cmac_vectorJohannes Berg2012-08-201-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to use a single scratch buffer and calculate offsets into it, just use two separate buffers for the separate variables. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: add IEEE80211_HW_P2P_DEV_ADDR_FOR_INTFJohannes Berg2012-08-201-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices like the current iwlwifi implementation require that the P2P interface address match the P2P Device address (only one P2P interface is supported.) Add the HW flag IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF that allows drivers to request that P2P Interfaces added while a P2P Device is active get the same MAC address by default. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: support P2P Device abstractionJohannes Berg2012-08-2010-96/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After cfg80211 got a P2P Device abstraction, add support to mac80211. Whether it really is supported or not will depend on whether or not the driver has support for it, but mac80211 needs to change to be able to support drivers that need a P2P Device. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | cfg80211: add P2P Device abstractionJohannes Berg2012-08-202-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support using a different MAC address for the P2P Device address we must first have a P2P Device abstraction that can be assigned a MAC address. This abstraction will also be useful to support offloading P2P operations to the device, e.g. periodic listen for discoverability. Currently, the driver is responsible for assigning a MAC address to the P2P Device, but this could be changed by allowing a MAC address to be given to the NEW_INTERFACE command. As it has no associated netdev, a P2P Device can only be identified by its wdev identifier but the previous patches allowed using the wdev identifier in various APIs, e.g. remain-on-channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: make ieee80211_beacon_connection_loss_work staticJohannes Berg2012-08-202-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to declare the function in the header file since it's only used in a single place, so make it static. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: check size of channel switch IE when parsingJohannes Berg2012-08-203-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The channel switch IE has a fixed size, so we can discard it in parsing if it's not the right size and use the right struct pointer. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: fix CSA handling timerJohannes Berg2012-08-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The time until the channel switch is in TU, not in milliseconds, so use TU_TO_EXP_TIME() to correctly program the timer. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: clean up CSA handling codeJohannes Berg2012-08-201-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the CSA handling code by moving some of it out of the if and using a C99 initializer for the struct passed to the driver method. While at it, also add a comment that we should wait for a beacon after switching the channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: remove unneeded 'bssid' variableJohannes Berg2012-08-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to copy the BSSID just to print it, remove the unnecessary variable. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: support A-MPDU status reportingJohannes Berg2012-08-201-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support getting A-MPDU status information from the drivers and reporting it to userspace via radiotap in the standard fields. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: add supported rates change notification in IBSSAntonio Quartulli2012-08-202-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In IBSS it is possible that the supported rates set for a station changes over time (e.g. it gets first initialised as an empty set because of no available information about rates and updated later). In this case the driver has to be notified about the change in order to update its internal table accordingly (if needed). This behaviour is needed by all those drivers that handle rc internally but leave stations management to mac80211 Reported-by: Gui Iribarren <gui@altermundi.net> Signed-off-by: Antonio Quartulli <ordex@autistici.org> [Johannes - add docs, validate IBSS mode only, fix compilation] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: clean up mpath_move_to_queue()Thomas Pedersen2012-08-203-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use skb_queue_walk_safe instead, and fix a few issues: - didn't free old skbs on moving - didn't react to failed skb alloc - needlessly held a local pointer to the destination frame queue - didn't check destination queue length before adding skb Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use skb_queue_walk() in mesh_path_assign_nexthopThomas Pedersen2012-08-201-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since all we really want is just to iterate over all skbs, do just that and avoid (de)queueing to a clusmy tmpq. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: avoid using synchronize_rcu in ieee80211_set_probe_respEyal Shapira2012-08-204-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This could take a while (100ms+) and may delay sending assoc resp in AP mode with WPS or P2P GO (as setting the probe resp takes place there). We've encountered situations where the delay was big enough to cause connection problems with devices like Galaxy Nexus. Switch to using call_rcu with a free handler. [Arik - rework to use plain buffer and instead of skb] Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: skb leak in mesh_plink_frame_tx()Thomas Pedersen2012-08-031-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although adding an IE is almost guaranteed to succeed since we already accounted for its length while allocating the skb, we should still free the skb in case of failure. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: don't request ack for peering closeThomas Pedersen2012-08-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make a lot of sense to wait for an ack in response to a peering close frame since either peer in this exchange could be going down. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: remove ieee80211_clean_sdata()Thomas Pedersen2012-08-031-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function was only used by mesh, and not really needed since any interface-specific cleanup already happens in the netdev handlers. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: improve cleanup when leaving meshThomas Pedersen2012-08-032-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not necessary to stop the mesh beacon in the mac80211 ndo_stop handler, since cfg80211 has already left the mesh on NETDEV_GOING_DOWN notification. Also some improvements to ieee80211_stop_mesh(): - flush mpath entries. - flush sta entries per-sdata so we don't remove entries belonging to other vifs on the same hw. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: reset station MLME flags upon new associationJohannes Berg2012-08-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When associating anew, the old station MLME flags should be cleared. The only exception is the 40 MHz disable flag as it might have been set while the channel was set in a previous authentication attempt so it needs to be kept intact. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use eth_broadcast_addrJohannes Berg2012-07-314-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Instead of memset(). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: enable WDS carrier only after adding stationJohannes Berg2012-07-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the carrier on WDS type interfaces only after having added the station entry for the WDS peer so outgoing frames will find it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: manage carrier state in meshJohannes Berg2012-07-312-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of assuming the carrier is on all the time in mesh manage it with joining and leaving the mesh. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use correct channel in TXJohannes Berg2012-07-312-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we only need the band, remove the channel pointer from struct ieee80211_tx_data and also assign it properly, depending on context, to the correct operating or current channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: fix current vs. operating channel in preq/beaconJohannes Berg2012-07-316-26/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sending probe requests, e.g. during software scanning, these will go out on the *current* channel, so their IEs need to be built from the current channel. At other times, e.g. for beacons or probe request templates, the IEs will be used on the *operating* channel and using the current channel instead might result in errors. Add the appropriate parameters to respect the difference. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use oper_channel in utils and configJohannes Berg2012-07-313-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using hw.conf.channel is wrong as it could be the temporary channel if any function like the beacon get function is called while scanning or during other temporary out-of-channel activities. Use oper_channel instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use oper_channel in managed mlmeJohannes Berg2012-07-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using hw.conf.channel is wrong as it could be the temporary channel if any function like the beacon get function is called while scanning or during other temporary out-of-channel activities. Use oper_channel instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | mac80211: use oper_channel in ibssJohannes Berg2012-07-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using hw.conf.channel is wrong as it could be the temporary channel if any function like the beacon get function is called while scanning or during other temporary out-of-channel activities. Use oper_channel instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
OpenPOWER on IntegriCloud