aboutsummaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAge
* NFC: llcp: Add support in getsockopt for RW, LTO, and MIU remote parametersThierry Escande2013-04-11
| | | | | | | Useful for LLCP validation tests. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: llcp: Reset RW, LTO, and MIU remote parameters when link goes downThierry Escande2013-04-11
| | | | | | | | | This resets remote parameters in both local and socket llcp structures when the link goes down. That way, nfc_llcp_getsockopt won't return values corresponding to the previous link parameters. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: llcp: Use localy stored remote_miu value if not set at socket levelThierry Escande2013-04-11
| | | | | | | | If remote_miu value is not set in the socket (i.e. connection-less socket) the value stored in the local is used. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: llcp: Aggregated frames supportThierry Escande2013-04-11
| | | | | | | | This adds support for AGF PDUs. For each PDU contained in the AGF, a new sk_buff is allocated and dispatched to its corresponding handler. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: llcp: Fix zero octets length SDU handlingOlivier Guiter2013-04-11
| | | | | | | | LLCP Validation test #2 (Connection-less information transfer) send a service data unit of zero octets length. This is now handled correctly. Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: llcp: Fall back to local values when getting socket optionsSamuel Ortiz2013-04-11
| | | | | | | If a socket option has not been set by the user, fall back to the LLCP local ones. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* NFC: llcp: Socket miux is a big endian fieldSamuel Ortiz2013-04-11
| | | | | | | The MIUX must be transmitted in big endian and as such we have to convert it properly. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge branch 'for-john' of ↵John W. Linville2013-04-10
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/ath/carl9170/debug.c drivers/net/wireless/ath/carl9170/main.c net/mac80211/ieee80211_i.h
| * mac80211: make ieee802_11_parse_elems an inlineJohannes Berg2013-04-08
| | | | | | | | | | | | This (slightly) reduces the code size. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: don't start new netdev queues if driver stoppedJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | | | | | If a new netdev (e.g. an AP VLAN) is created while the driver has queues stopped, the new netdev queues will be started even though they shouldn't. This will lead to frames accumulating on the internal mac80211 pending queues instead of properly being held on the netdev queues. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: replace some dead code by a warningJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | Given the (nested) switch statements, this code can't be reached, so make it warn instead of manipulating the carrier state which seems purposeful. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: don't fiddle with netdev queues in MLME codeJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The netdev queues should always represent the state that the driver gave them, so fiddling with them isn't really appropriate in the mlme code. Also, since we stop queues for flushing now, this really isn't necessary any more. As the scan/offchannel code has also been modified to no longer do this a while ago, remove the outdated smp_mb() and comments about it. While at it, also add a pair of braces that was missing. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: disable uAPSD if all ACs are under ACMAlexander Bondar2013-04-08
| | | | | | | | | | | | | | | | | | | | | | It's unlikely that an AP requires WMM mandatory admission control for all access categories, and if it does then we still transmit on the background AC without requesting admission. However, avoid using uAPSD in this case since the implementation could run into issues and might use other ACs etc. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: fix do_stop handling while suspendedJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device is unplugged while suspended, mac80211 is de-initialized and all interfaces are removed while no state is actually present in the driver. This can cause warnings and driver confusion. Fix this by reordering the do_stop code to not call the driver when it is suspended, i.e. when there's no state in the driver anyway. The previous patches removed a few corner cases in ROC and virtual monitor interfaces so that now this is safe to do and no state should be left over. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: destroy virtual monitor interface across suspendJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | | | It has to be removed from the driver, but completely destroying it helps handle unplug of a device during suspend since then the channel context handling etc. doesn't have to happen later when it's removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: purge remain-on-channel items when suspendingJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | | | | | They can't really be executed while suspended and could trigger work warnings, so abort all ROC items. When the system resumes the notifications about this will be delivered to userspace which can then act accordingly (though it will assume they were canceled/finished.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: remove outdated comment referring to master interfaceJohannes Berg2013-04-08
| | | | | | | | | | | | | | The code now explicitly calls ieee80211_configure_filter() anyway, so nothing needs to be explained. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: return new mpath from mesh_path_add()Bob Copeland2013-04-08
| | | | | | | | | | | | | | | | | | | | | | | | Most times that mesh_path_add() is called, it is followed by a lookup to get the just-added mpath. We can instead just return the new mpath in the case that we allocated one (or the existing one if already there), so do that. Also, reorder the code in mesh_path_add a bit so that we don't need to allocate in the pre-existing case. Signed-off-by: Bob Copeland <bob@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: fix the PREP mesh hwmp debug messageChun-Yeow Yeoh2013-04-08
| | | | | | | | | | | | | | | | | | | | The mesh hwmp debug message is a bit confusing. The "sending PREP to %p" should be the MAC address of mesh STA that has originated the PREQ message and the "received PREP from %pM" should be the MAC address of the mesh STA that has originated the PREP message. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: parse Timeout Interval Element using a structJohannes Berg2013-04-08
| | | | | | | | | | | | | | | | Instead of open-coding the accesses and length check do the length check in the IE parser and assign a struct pointer for use in the remaining code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: check ERP info IE length in parserJohannes Berg2013-04-08
| | | | | | | | | | | | | | It's always just one byte, so check for that and remove the length field from the parser struct. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: check DSSS params IE length in parserJohannes Berg2013-04-08
| | | | | | | | | | | | | | It's always just one byte, so check for that and remove the length field from the parser struct. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: remove unused IE pointers from parserJohannes Berg2013-04-08
| | | | | | | | | | | | | | There's no need to parse IEs that aren't used so just remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: remove ancient reference to master interfaceJohannes Berg2013-04-08
| | | | | | | | | | | | | | The master interface no longer exists ... and hasn't for a few years now, so remove this reference :-) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: be more careful about sending beacon-loss-eventsBen Greear2013-04-08
| | | | | | | | | | | | | | | | I don't think we should send the events unless it was actually a beacon that was lost...not just any probe of an AP. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add beacon stats to debugfsBen Greear2013-04-08
| | | | | | | | | | | | | | Beacon-timeout and number of beacon loss events. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: let drivers not supporting channel contexts use VHTKarl Beldan2013-04-08
| | | | | | | | | | | | | | | | It is possible since the global hw config and local switched to cfg80211_chan_def. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan2013-03-25
| | | | | | | | | | | | | | | | | | | | Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: allow drivers to set default uAPSD parametersAlexander Bondar2013-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mac80211 currently sets uAPSD parameters to have VO AC trigger- and delivery-enabled, with maximum service period length. Allow drivers to change these default settings since different uAPSD client implementations may handle errors differently and be able to recover from some errors. Note: some APs may not function correctly if one or all ACs are trigger- and delivery-enabled, see http://thread.gmane.org/gmane.linux.kernel.wireless.general/93577. We retested with this AP and later firmware doesn't have this bug any more. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: ibss: use beacon_data struct for beacon and probe responseJohannes Berg2013-03-25
| | | | | | | | | | | | | | | | Instead of having an SKB all the time, use a beacon_data struct with just the information required. This also allows removing a synchronize_rcu() and using kfree_rcu() instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: ibss: disable beaconing before freeing beaconJohannes Berg2013-03-25
| | | | | | | | | | | | | | | | If we don't disable beaconing, the driver might attempt to continue, but would fail to request a beacon. That's strange, so disable beaconing first. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add P2P NoA settingsJanusz Dziedzic2013-03-22
| | | | | | | | | | | | | | | | Add P2P NoA settings for STA mode. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> [fix docs] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: use ieee80211_p2p_noa_attr structureJanusz Dziedzic2013-03-22
| | | | | | | | | | | | | | | | Use ieee80211_p2p_noa_attr structure during P2P_PS (oppps) detection. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: make beacon-loss-count configurableBen Greear2013-03-22
| | | | | | | | | | | | | | | | | | | | | | | | On loaded systems with lots of VIFs, I see lots of beacon timeouts, even though the connection to the AP is very good. Allow tuning the beacon-loss-count variable to give the system longer to process beacons if the user prefers. Signed-off-by: Ben Greear <greearb@candelatech.com> [add the number of beacons to the message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: return the RSSI in dBmEmmanuel Grumbach2013-03-20
| | | | | | | | | | | | | | | | | | For the sake of speed of calculation and number accuracy, mac80211 tracks the RSSI in dBm * 16. But it forgot to divide back by 16 when the RSSI is asked by the driver. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge branch 'master' of ↵John W. Linville2013-04-10
|\ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/rt2x00/rt2x00pci.c
| * \ Merge branch 'for-john' of ↵John W. Linville2013-04-03
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
| | * | cfg80211: sched_scan_mtx lock in cfg80211_conn_work()Artem Savkov2013-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced in f9f475292dbb0e7035fb6661d1524761ea0888d9 ("cfg80211: always check for scan end on P2P device") cfg80211_conn_scan() which requires sched_scan_mtx to be held can be called from cfg80211_conn_work(). Without this we are hitting multiple warnings like the following: WARNING: at net/wireless/sme.c:88 cfg80211_conn_scan+0x1dc/0x3a0 [cfg80211]() Hardware name: 0578A21 Modules linked in: ... Pid: 620, comm: kworker/3:1 Not tainted 3.9.0-rc4-next-20130328+ #326 Call Trace: [<c1036992>] warn_slowpath_common+0x72/0xa0 [<c10369e2>] warn_slowpath_null+0x22/0x30 [<faa4b0ec>] cfg80211_conn_scan+0x1dc/0x3a0 [cfg80211] [<faa4b344>] cfg80211_conn_do_work+0x94/0x380 [cfg80211] [<faa4c3b2>] cfg80211_conn_work+0xa2/0x130 [cfg80211] [<c1051858>] process_one_work+0x198/0x450 Signed-off-by: Artem Savkov <artem.savkov@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | | Merge tag 'nfc-fixes-3.9-2' of ↵John W. Linville2013-04-01
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-fixes Samuel Ortiz <sameo@linux.intel.com> says: "This is the 2nd batch of NFC fixes for 3.9. This time we have: - A crash fix for when a DGRAM LLCP socket is listening while the NFC adapter is physically removed. - A potential double skb free when the LLCP socket receive queue is full. - A fix for properly handling multiple and consecutive LLCP connections, and not trash the socket ack log. - A build failure for the MEI microread physical layer, now that the MEI bus APIs have been merged into char-misc-next." Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * | | NFC: llcp: Keep the connected socket parent pointer aliveSamuel Ortiz2013-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And avoid decreasing the ack log twice when dequeueing connected LLCP sockets. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| | * | | NFC: llcp: Remove possible double call to kfree_skbThierry Escande2013-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kfree_skb was called twice when the socket receive queue is full Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| | * | | NFC: llcp: Detach socket from process context only when releasing the socketSamuel Ortiz2013-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling sock_orphan when e.g. the NFC adapter is removed can lead to kernel crashes when e.g. a connection less client is sleeping on the Rx workqueue, waiting for data to show up. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * | | | Merge branch 'for-john' of ↵John W. Linville2013-04-01
| |\ \ \ \ | | | |/ / | | |/| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
| | * | | mac80211: fix idle handling sequenceJohannes Berg2013-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corey Richardson reported that my idle handling cleanup (commit fd0f979a1b, "mac80211: simplify idle handling") broke ath9k_htc. The reason appears to be that it wants to go out of idle before switching channels. To fix it, reimplement that sequence. Reported-by: Corey Richardson <corey@octayn.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| | * | | mac80211: fix remain-on-channel cancel crashJohannes Berg2013-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a ROC item is canceled just as it expires, the work struct may be scheduled while it is running (and waiting for the mutex). This results in it being run after being freed, which obviously crashes. To fix this don't free it when aborting is requested but instead mark it as "to be freed", which makes the work a no-op and allows freeing it outside. Cc: stable@vger.kernel.org [3.6+] Reported-by: Jouni Malinen <j@w1.fi> Tested-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | | Merge branch 'master' of ↵John W. Linville2013-03-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: net/mac80211/sta_info.c net/wireless/core.h
| * | | | Merge branch 'for-john' of ↵John W. Linville2013-03-25
| |\| | | | | |/ / | |/| | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
| | * | mac80211: Don't restart sta-timer if not associated.Ben Greear2013-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found another crash when deleting lots of virtual stations in a congested environment. I think the problem is that the ieee80211_mlme_notify_scan_completed could call ieee80211_restart_sta_timer for a stopped interface that was about to be deleted. With the following patch I am unable to reproduce the crash. Signed-off-by: Ben Greear <greearb@candelatech.com> [move check, also make the same change in mesh] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| | * | cfg80211: always check for scan end on P2P deviceJohannes Berg2013-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a P2P device wdev is removed while it has a scan, then the scan completion might crash later as it is already freed by that time. To avoid the crash always check the scan completion when the P2P device is being removed for some reason. If the driver already canceled it, don't want and free it, otherwise warn and leak it to avoid later crashes. In order to do this, locking needs to be changed away from the rdev mutex (which can't always be guaranteed). For now, use the sched_scan_mtx instead, I'll rename it to just scan_mtx in a later patch. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| | * | mac80211: fix virtual monitor interface lockingJohannes Berg2013-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The virtual monitor interface has a locking issue, it calls into the channel context code with the iflist mutex held which isn't allowed since it is usually acquired the other way around. The mutex is still required for the interface iteration, but need not be held across the channel calls. Signed-off-by: Johannes Berg <johannes.berg@intel.com>