1. 06 Mar, 2013 10 commits
  2. 02 Mar, 2013 1 commit
  3. 01 Mar, 2013 2 commits
  4. 28 Feb, 2013 1 commit
  5. 27 Feb, 2013 2 commits
    • Sasha Levin's avatar
      hlist: drop the node parameter from iterators · b67bfe0d
      Sasha Levin authored
      
      
      I'm not sure why, but the hlist for each entry iterators were conceived
      
              list_for_each_entry(pos, head, member)
      
      The hlist ones were greedy and wanted an extra parameter:
      
              hlist_for_each_entry(tpos, pos, head, member)
      
      Why did they need an extra pos parameter? I'm not quite sure. Not only
      they don't really need it, it also prevents the iterator from looking
      exactly like the list iterator, which is unfortunate.
      
      Besides the semantic patch, there was some manual work required:
      
       - Fix up the actual hlist iterators in linux/list.h
       - Fix up the declaration of other iterators based on the hlist ones.
       - A very small amount of places were using the 'node' parameter, this
       was modified to use 'obj->member' instead.
       - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
       properly, so those had to be fixed up manually.
      
      The semantic patch which is mostly the work of Peter Senna Tschudin is here:
      
      @@
      iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;
      
      type T;
      expression a,c,d,e;
      identifier b;
      statement S;
      @@
      
      -T b;
          <+... when != b
      (
      hlist_for_each_entry(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue(a,
      - b,
      c) S
      |
      hlist_for_each_entry_from(a,
      - b,
      c) S
      |
      hlist_for_each_entry_rcu(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_rcu_bh(a,
      - b,
      c, d) S
      |
      hlist_for_each_entry_continue_rcu_bh(a,
      - b,
      c) S
      |
      for_each_busy_worker(a, c,
      - b,
      d) S
      |
      ax25_uid_for_each(a,
      - b,
      c) S
      |
      ax25_for_each(a,
      - b,
      c) S
      |
      inet_bind_bucket_for_each(a,
      - b,
      c) S
      |
      sctp_for_each_hentry(a,
      - b,
      c) S
      |
      sk_for_each(a,
      - b,
      c) S
      |
      sk_for_each_rcu(a,
      - b,
      c) S
      |
      sk_for_each_from
      -(a, b)
      +(a)
      S
      + sk_for_each_from(a) S
      |
      sk_for_each_safe(a,
      - b,
      c, d) S
      |
      sk_for_each_bound(a,
      - b,
      c) S
      |
      hlist_for_each_entry_safe(a,
      - b,
      c, d, e) S
      |
      hlist_for_each_entry_continue_rcu(a,
      - b,
      c) S
      |
      nr_neigh_for_each(a,
      - b,
      c) S
      |
      nr_neigh_for_each_safe(a,
      - b,
      c, d) S
      |
      nr_node_for_each(a,
      - b,
      c) S
      |
      nr_node_for_each_safe(a,
      - b,
      c, d) S
      |
      - for_each_gfn_sp(a, c, d, b) S
      + for_each_gfn_sp(a, c, d) S
      |
      - for_each_gfn_indirect_valid_sp(a, c, d, b) S
      + for_each_gfn_indirect_valid_sp(a, c, d) S
      |
      for_each_host(a,
      - b,
      c) S
      |
      for_each_host_safe(a,
      - b,
      c, d) S
      |
      for_each_mesh_entry(a,
      - b,
      c, d) S
      )
          ...+>
      
      [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
      [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
      [akpm@linux-foundation.org: checkpatch fixes]
      [akpm@linux-foundation.org: fix warnings]
      [akpm@linux-foudnation.org: redo intrusive kvm changes]
      Tested-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b67bfe0d
    • Tejun Heo's avatar
      mac80211: convert to idr_alloc() · 9475af6e
      Tejun Heo authored
      
      
      Convert to the much saner new idr interface.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9475af6e
  6. 26 Feb, 2013 5 commits
  7. 25 Feb, 2013 2 commits
  8. 18 Feb, 2013 4 commits
  9. 15 Feb, 2013 13 commits
    • Seth Forshee's avatar
      mac80211: Fix incorrect use of STA_PR_FMT in trace points · 15ac7c47
      Seth Forshee authored
      
      
      Several tracepoints are using STA_PR_FMT where STA_PR_ARG should be
      used, resulting in messages like "phy0 sta:ARG TYPE NOT FIELD BUT 1".
      Change these to STA_PR_ARG.
      Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      15ac7c47
    • Bob Copeland's avatar
      mac80211: enable vif.cab_queue for mesh · 8ffb5c00
      Bob Copeland authored
      
      
      Since mesh powersaving was added, pending bcast/mcast frames may go out the
      CAB queue now.  Unfortunately, the queue was only set up for AP mode, so we
      would try to tx on the IEEE80211_INVAL_HW_QUEUE.  Allow cab_queue for mesh
      interfaces as well.
      
      Fixes the following warning (or crash without MAC80211_VERBOSE_DEBUG):
      
      WARNING: at net/mac80211/tx.c:1223 __ieee80211_tx+0x162/0x35f [mac80211]()
      Modules linked in: mac80211_hwsim mac80211 cfg80211 [...]
      Pid: 3085, comm: avahi-daemon Tainted: G        W    3.8.0-rc1+ #377
      Call Trace:
       [<ffffffff81045c20>] warn_slowpath_common+0x83/0x9c
       [<ffffffff81045c53>] warn_slowpath_null+0x1a/0x1c
       [<ffffffffa083aef0>] __ieee80211_tx+0x162/0x35f [mac80211]
       [<ffffffffa083cb1d>] ieee80211_tx+0xd3/0xf9 [mac80211]
       [<ffffffffa083cc0f>] ieee80211_xmit+0xcc/0xd5 [mac80211]
       [<ffffffffa083db59>] ieee80211_subif_start_xmit+0xc53/0xcd8 [mac80211]
       [<ffffffff81319acd>] dev_hard_start_xmit+0x259/0x3ce
       [<ffffffff81333d6b>] sch_direct_xmit+0x74/0x17d
       [<ffffffff8131a0b1>] dev_queue_xmit+0x230/0x414
       [<ffffffff8134877a>] ip_finish_output2+0x348/0x3aa
       [<ffffffff81349029>] ip_finish_output+0x6c/0x71
       [<ffffffff81349046>] NF_HOOK_COND.constprop.44+0x18/0x58
       [<ffffffff8134a03a>] ip_mc_output+0x134/0x13c
       [<ffffffff8134835a>] dst_output+0x18/0x1c
       [<ffffffff81349a24>] ip_local_out+0x20/0x24
       [<ffffffff8134a8cf>] ip_send_skb+0x16/0x3c
       [<ffffffff8136bfba>] udp_send_skb+0x254/0x2b9
       [<ffffffff8136c85e>] udp_sendmsg+0x5a8/0x7d4
      Signed-off-by: default avatarBob Copeland <bob@cozybit.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8ffb5c00
    • Johannes Berg's avatar
      mac80211: clean up mesh code · bf7cd94d
      Johannes Berg authored
      
      
      There's various code with strange indentation,
      questionable loop and locking constructs, etc.
      
      The bigger change is moving the "sdata" argument
      to the first argument of all functions, like all
      other mac80211 functions that have one.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      bf7cd94d
    • Johannes Berg's avatar
      mac80211: prevent spurious HT/VHT downgrade message · 586e01ed
      Johannes Berg authored
      
      
      Even when connecting to an AP that doesn't support VHT,
      and even when the local device doesn't support it either,
      the downgrade message gets printed. Suppress the message
      if HT and/or VHT is disabled.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      586e01ed
    • Johannes Berg's avatar
      nl80211: renumber NL80211_FEATURE_FULL_AP_CLIENT_STATE · 932dd97c
      Johannes Berg authored
      
      
      Adding the flag to mac80211 already without testing was
      clearly a mistake, one that we now pay for by having to
      reserve bit 13 forever. The problem is cfg80211 doesn't
      allow capability/rate changes for station entries that
      were added unassociated, so the station entries cannot
      be set up properly when marked associated.
      
      Change the NL80211_FEATURE_FULL_AP_CLIENT_STATE value
      to make it clear to userspace implementations that all
      current kernels don't actually support it, even though
      the previous bit is set, and of course also remove the
      flag from mac80211 until we test and fix the issues.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      932dd97c
    • Jouni Malinen's avatar
      cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_station · df881293
      Jouni Malinen authored
      
      
      The information of the peer's capabilities is required for the driver
      to perform TDLS Peer UAPSD operations. This information of the peer is
      passed by the supplicant using NL80211_CMD_SET_STATION command. This
      commit enhances the function nl80211_set_station to pass this
      information of the peer to the driver in case this command is used
      with the TDLS peer STA.
      
      In addition, make the HT/VHT capability configuration handled more
      consistently for other STA cases (reject both instead of just HT).
      Signed-off-by: default avatarJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      df881293
    • Johannes Berg's avatar
      mac80211: advertise operating mode notification capability · c6f9d6c3
      Johannes Berg authored
      
      
      Use the new extended capabilities advertising to advertise
      the fact that operating mode notification is supported.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c6f9d6c3
    • Johannes Berg's avatar
      mac80211: stop modifying HT SMPS capability · af0ed69b
      Johannes Berg authored
      
      
      Instead of modifying the HT SMPS capability field
      for stations, track the SMPS mode explicitly in a
      new field in the station struct and use it in the
      drivers that care about it. This simplifies the
      code using it.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      af0ed69b
    • Thomas Pedersen's avatar
      mac80211: generate mesh probe responses · 9fb04b50
      Thomas Pedersen authored
      
      
      Mesh interfaces will now respond to any broadcast (or
      matching directed mesh) probe requests with a probe
      response.
      Signed-off-by: default avatarThomas Pedersen <thomas@cozybit.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      9fb04b50
    • Thomas Pedersen's avatar
      mac80211: cache mesh beacon · 2b5e1967
      Thomas Pedersen authored
      
      
      Previously, the entire mesh beacon would be generated each
      time the beacon timer fired. Instead generate a beacon
      head and tail (so the TIM can easily be inserted when mesh
      power save is on) when starting a mesh or the MBSS
      parameters change.
      
      Also add a mutex for protecting beacon updates and
      preventing leaks.
      Signed-off-by: default avatarThomas Pedersen <thomas@cozybit.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      2b5e1967
    • Johannes Berg's avatar
      mac80211: constify IE parsing · 4a3cb702
      Johannes Berg authored
      
      
      Make all the parsed IE pointers const, and propagate
      the change to all the users etc.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4a3cb702
    • Johannes Berg's avatar
      mac80211: properly track HT/VHT operation changes · 30eb1dc2
      Johannes Berg authored
      
      
      A while ago, I made the mac80211 station code never change
      the channel type after association. This solved a number of
      issues but is ultimately wrong, we should react if the AP
      changes the HT operation IE and switches bandwidth. One of
      the issues is that we associate as HT40 capable, but if the
      AP ever switches to 40 MHz we won't be able to receive such
      frames because we never set our channel to 40 MHz.
      
      This addresses this and VHT operation changes. If there's a
      change that is incompatible with our setup, e.g. if the AP
      decides to change the channel entirely (and for some reason
      we still hear the beacon) we'll just disconnect.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      30eb1dc2
    • Johannes Berg's avatar
      mac80211: move ieee80211_determine_chantype function · 6565ec9b
      Johannes Berg authored
      
      
      The next patch will need it further up in the file, so
      move it unchanged now.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6565ec9b