summaryrefslogtreecommitdiffstats
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11NFC: llcp: Add support in getsockopt for RW, LTO, and MIU remote parametersThierry Escande1-1/+22
Useful for LLCP validation tests. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Reset RW, LTO, and MIU remote parameters when link goes downThierry Escande3-2/+13
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>
2013-04-11NFC: llcp: Use localy stored remote_miu value if not set at socket levelThierry Escande3-3/+12
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>
2013-04-11NFC: llcp: Aggregated frames supportThierry Escande2-12/+69
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>
2013-04-11NFC: llcp: Fix zero octets length SDU handlingOlivier Guiter1-8/+8
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>
2013-04-11NFC: llcp: Fall back to local values when getting socket optionsSamuel Ortiz1-3/+13
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>
2013-04-11NFC: llcp: Socket miux is a big endian fieldSamuel Ortiz3-6/+9
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>
2013-04-10Merge branch 'for-john' of ↵John W. Linville19-373/+406
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
2013-04-10Merge branch 'master' of ↵John W. Linville8-24/+44
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/rt2x00/rt2x00pci.c
2013-04-08mac80211: make ieee802_11_parse_elems an inlineJohannes Berg2-8/+6
This (slightly) reduces the code size. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: don't start new netdev queues if driver stoppedJohannes Berg1-2/+22
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>
2013-04-08mac80211: replace some dead code by a warningJohannes Berg1-1/+2
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>
2013-04-08mac80211: don't fiddle with netdev queues in MLME codeJohannes Berg1-24/+2
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>
2013-04-08mac80211: disable uAPSD if all ACs are under ACMAlexander Bondar1-1/+2
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>
2013-04-08mac80211: fix do_stop handling while suspendedJohannes Berg1-25/+49
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>
2013-04-08mac80211: destroy virtual monitor interface across suspendJohannes Berg4-6/+11
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>
2013-04-08mac80211: purge remain-on-channel items when suspendingJohannes Berg4-5/+8
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>
2013-04-08mac80211: remove outdated comment referring to master interfaceJohannes Berg1-6/+1
The code now explicitly calls ieee80211_configure_filter() anyway, so nothing needs to be explained. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: return new mpath from mesh_path_add()Bob Copeland4-51/+42
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>
2013-04-08mac80211: fix the PREP mesh hwmp debug messageChun-Yeow Yeoh1-2/+2
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>
2013-04-08mac80211: parse Timeout Interval Element using a structJohannes Berg3-7/+8
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>
2013-04-08mac80211: check ERP info IE length in parserJohannes Berg4-7/+7
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>
2013-04-08mac80211: check DSSS params IE length in parserJohannes Berg5-6/+7
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>
2013-04-08mac80211: remove unused IE pointers from parserJohannes Berg2-28/+0
There's no need to parse IEs that aren't used so just remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: remove ancient reference to master interfaceJohannes Berg1-1/+1
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>
2013-04-08mac80211: be more careful about sending beacon-loss-eventsBen Greear1-3/+5
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>
2013-04-08mac80211: add beacon stats to debugfsBen Greear2-0/+13
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>
2013-04-08mac80211: let drivers not supporting channel contexts use VHTKarl Beldan1-13/+1
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>
2013-04-03Merge branch 'for-john' of ↵John W. Linville1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
2013-04-01Merge tag 'nfc-fixes-3.9-2' of ↵John W. Linville2-11/+3
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>
2013-04-01Merge branch 'for-john' of ↵John W. Linville5-13/+39
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
2013-03-30cfg80211: sched_scan_mtx lock in cfg80211_conn_work()Artem Savkov1-0/+2
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>
2013-03-29Merge branch 'master' of ↵John W. Linville12-74/+145
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: net/mac80211/sta_info.c net/wireless/core.h
2013-03-26NFC: llcp: Keep the connected socket parent pointer aliveSamuel Ortiz1-1/+3
And avoid decreasing the ack log twice when dequeueing connected LLCP sockets. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-25Merge branch 'for-upstream' of ↵John W. Linville16-971/+1272
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2013-03-25Merge branch 'for-john' of ↵John W. Linville22-210/+318
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-03-25Merge branch 'for-john' of ↵John W. Linville12-76/+154
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
2013-03-25mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan9-71/+83
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>
2013-03-25mac80211: fix idle handling sequenceJohannes Berg3-4/+16
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>
2013-03-25mac80211: allow drivers to set default uAPSD parametersAlexander Bondar2-2/+4
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>
2013-03-25mac80211: ibss: use beacon_data struct for beacon and probe responseJohannes Berg3-71/+70
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>
2013-03-25mac80211: ibss: disable beaconing before freeing beaconJohannes Berg1-9/+12
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>
2013-03-25mac80211: fix remain-on-channel cancel crashJohannes Berg3-9/+23
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>
2013-03-24mac80211: Don't restart sta-timer if not associated.Ben Greear2-3/+6
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>
2013-03-24cfg80211: always check for scan end on P2P deviceJohannes Berg6-47/+92
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>
2013-03-22mac80211: add P2P NoA settingsJanusz Dziedzic4-30/+46
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>
2013-03-22mac80211: use ieee80211_p2p_noa_attr structureJanusz Dziedzic1-11/+15
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>
2013-03-22mac80211: make beacon-loss-count configurableBen Greear1-3/+7
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>
2013-03-20mac80211: fix virtual monitor interface lockingJohannes Berg1-16/+19
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>
2013-03-20cfg80211: fix wdev tracing crashJohannes Berg1-1/+2
Arend reported a crash in tracing if the driver returns an ERR_PTR() value from the add_virtual_intf() callback. This is due to the tracing then still attempting to dereference the "pointer", fix this by using IS_ERR_OR_NULL(). Reported-by: Arend van Spriel <arend@broadcom.com> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>