Merge remote-tracking branch 'mac80211/master' into HEAD
authorJohannes Berg <johannes.berg@intel.com>
Wed, 6 Mar 2013 15:33:12 +0000 (16:33 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Mar 2013 15:33:12 +0000 (16:33 +0100)
There are a few things that would otherwise conflict.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1  2 
net/mac80211/tx.c
net/wireless/core.c

diff --combined net/mac80211/tx.c
index de8548bf0a7f27cef20e06077d3c603ad22a7baa,0d74f24595850919b1532887e659822ad2078695..8914d2d2881aab77c5741479d6dbf516db59e3b3
@@@ -1231,34 -1231,40 +1231,40 @@@ static bool ieee80211_tx_frags(struct i
                if (local->queue_stop_reasons[q] ||
                    (!txpending && !skb_queue_empty(&local->pending[q]))) {
                        if (unlikely(info->flags &
-                                       IEEE80211_TX_INTFL_OFFCHAN_TX_OK &&
-                                    local->queue_stop_reasons[q] &
-                                       ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL))) {
+                                    IEEE80211_TX_INTFL_OFFCHAN_TX_OK)) {
+                               if (local->queue_stop_reasons[q] &
+                                   ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL)) {
+                                       /*
+                                        * Drop off-channel frames if queues
+                                        * are stopped for any reason other
+                                        * than off-channel operation. Never
+                                        * queue them.
+                                        */
+                                       spin_unlock_irqrestore(
+                                               &local->queue_stop_reason_lock,
+                                               flags);
+                                       ieee80211_purge_tx_queue(&local->hw,
+                                                                skbs);
+                                       return true;
+                               }
+                       } else {
                                /*
-                                * Drop off-channel frames if queues are stopped
-                                * for any reason other than off-channel
-                                * operation. Never queue them.
+                                * Since queue is stopped, queue up frames for
+                                * later transmission from the tx-pending
+                                * tasklet when the queue is woken again.
                                 */
-                               spin_unlock_irqrestore(
-                                       &local->queue_stop_reason_lock, flags);
-                               ieee80211_purge_tx_queue(&local->hw, skbs);
-                               return true;
+                               if (txpending)
+                                       skb_queue_splice_init(skbs,
+                                                             &local->pending[q]);
+                               else
+                                       skb_queue_splice_tail_init(skbs,
+                                                                  &local->pending[q]);
+                               spin_unlock_irqrestore(&local->queue_stop_reason_lock,
+                                                      flags);
+                               return false;
                        }
-                       /*
-                        * Since queue is stopped, queue up frames for later
-                        * transmission from the tx-pending tasklet when the
-                        * queue is woken again.
-                        */
-                       if (txpending)
-                               skb_queue_splice_init(skbs, &local->pending[q]);
-                       else
-                               skb_queue_splice_tail_init(skbs,
-                                                          &local->pending[q]);
-                       spin_unlock_irqrestore(&local->queue_stop_reason_lock,
-                                              flags);
-                       return false;
                }
                spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
  
@@@ -1844,9 -1850,24 +1850,24 @@@ netdev_tx_t ieee80211_subif_start_xmit(
                }
  
                if (!is_multicast_ether_addr(skb->data)) {
+                       struct sta_info *next_hop;
+                       bool mpp_lookup = true;
                        mpath = mesh_path_lookup(sdata, skb->data);
-                       if (!mpath)
+                       if (mpath) {
+                               mpp_lookup = false;
+                               next_hop = rcu_dereference(mpath->next_hop);
+                               if (!next_hop ||
+                                   !(mpath->flags & (MESH_PATH_ACTIVE |
+                                                     MESH_PATH_RESOLVING)))
+                                       mpp_lookup = true;
+                       }
+                       if (mpp_lookup)
                                mppath = mpp_path_lookup(sdata, skb->data);
+                       if (mppath && mpath)
+                               mesh_path_del(mpath->sdata, mpath->dst);
                }
  
                /*
                skb = skb_clone(skb, GFP_ATOMIC);
                if (skb) {
                        unsigned long flags;
 -                      int id, r;
 +                      int id;
  
                        spin_lock_irqsave(&local->ack_status_lock, flags);
 -                      r = idr_get_new_above(&local->ack_status_frames,
 -                                            orig_skb, 1, &id);
 -                      if (r == -EAGAIN) {
 -                              idr_pre_get(&local->ack_status_frames,
 -                                          GFP_ATOMIC);
 -                              r = idr_get_new_above(&local->ack_status_frames,
 -                                                    orig_skb, 1, &id);
 -                      }
 -                      if (WARN_ON(!id) || id > 0xffff) {
 -                              idr_remove(&local->ack_status_frames, id);
 -                              r = -ERANGE;
 -                      }
 +                      id = idr_alloc(&local->ack_status_frames, orig_skb,
 +                                     1, 0x10000, GFP_ATOMIC);
                        spin_unlock_irqrestore(&local->ack_status_lock, flags);
  
 -                      if (!r) {
 +                      if (id >= 0) {
                                info_id = id;
                                info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
                        } else if (skb_shared(skb)) {
@@@ -2350,9 -2381,9 +2371,9 @@@ static int ieee80211_beacon_add_tim(str
        if (local->tim_in_locked_section) {
                __ieee80211_beacon_add_tim(sdata, ps, skb);
        } else {
-               spin_lock(&local->tim_lock);
+               spin_lock_bh(&local->tim_lock);
                __ieee80211_beacon_add_tim(sdata, ps, skb);
-               spin_unlock(&local->tim_lock);
+               spin_unlock_bh(&local->tim_lock);
        }
  
        return 0;
@@@ -2724,7 -2755,8 +2745,8 @@@ ieee80211_get_buffered_bc(struct ieee80
                                cpu_to_le16(IEEE80211_FCTL_MOREDATA);
                }
  
-               sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
+               if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+                       sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
                if (!ieee80211_tx_prepare(sdata, &tx, skb))
                        break;
                dev_kfree_skb_any(skb);
diff --combined net/wireless/core.c
index 5ffff039b0174eefb8f3967dc6f5307ea7cb2f8c,9220021050624d681f0fa9b842b73d07ccebcff9..ea4155fe97334f91794dbb7a55f0dab28219c2a3
@@@ -367,8 -367,7 +367,7 @@@ struct wiphy *wiphy_new(const struct cf
        rdev->wiphy.rts_threshold = (u32) -1;
        rdev->wiphy.coverage_class = 0;
  
-       rdev->wiphy.features = NL80211_FEATURE_SCAN_FLUSH |
-                              NL80211_FEATURE_ADVERTISE_CHAN_LIMITS;
+       rdev->wiphy.features = NL80211_FEATURE_SCAN_FLUSH;
  
        return &rdev->wiphy;
  }
@@@ -875,7 -874,8 +874,7 @@@ static int cfg80211_netdev_notifier_cal
                /* allow mac80211 to determine the timeout */
                wdev->ps_timeout = -1;
  
 -              if (!dev->ethtool_ops)
 -                      dev->ethtool_ops = &cfg80211_ethtool_ops;
 +              netdev_set_default_ethtool_ops(dev, &cfg80211_ethtool_ops);
  
                if ((wdev->iftype == NL80211_IFTYPE_STATION ||
                     wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||