Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
authorJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Mar 2014 18:05:12 +0000 (13:05 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Mar 2014 18:05:12 +0000 (13:05 -0500)
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/mwifiex/pcie.c

22 files changed:
1  2 
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/iwlwifi/dvm/mac80211.c
drivers/net/wireless/iwlwifi/iwl-drv.c
drivers/net/wireless/iwlwifi/iwl-modparams.h
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/tx.c
drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/mwifiex/pcie.c
drivers/net/wireless/mwifiex/usb.c
drivers/net/wireless/mwifiex/wmm.c
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c
net/mac80211/rx.c
net/mac80211/sta_info.h
net/mac80211/tx.c
net/mac80211/util.c
net/wireless/reg.c

Simple merge
index 076dae1e5ab7f6de22bfdf5c179b6bd4bb09ba1b,82e340d3ec60a81cc83d2427bd9280e55ca3af3a..6c9accdb52e4140076d7378f530e975c34f68433
@@@ -853,10 -1055,8 +857,8 @@@ static int ath9k_rx_skb_preprocess(stru
         * everything but the rate is checked here, the rate check is done
         * separately to avoid doing two lookups for a rate for each frame.
         */
-       if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter)) {
-               ret = -EINVAL;
-               goto exit;
-       }
 -      if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
++      if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter))
+               return -EINVAL;
  
        if (ath_is_mybeacon(common, hdr)) {
                RX_STAT_INC(rx_beacons);
        /*
         * This shouldn't happen, but have a safety check anyway.
         */
-       if (WARN_ON(!ah->curchan)) {
-               ret = -EINVAL;
-               goto exit;
-       }
+       if (WARN_ON(!ah->curchan))
+               return -EINVAL;
  
 -      if (ath9k_process_rate(common, hw, rx_stats, rx_status))
 +      if (ath9k_cmn_process_rate(common, hw, rx_stats, rx_status)) {
 +              /*
 +               * No valid hardware bitrate found -- we should not get here
 +               * because hardware has already validated this frame as OK.
 +               */
 +              ath_dbg(common, ANY, "unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
 +                      rx_stats->rs_rate);
 +              RX_STAT_INC(rx_rate_err);
-               ret =-EINVAL;
-               goto exit;
+               return -EINVAL;
 +      }
  
 -      ath9k_process_rssi(common, hw, rx_stats, rx_status);
 +      ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status);
  
        rx_status->band = ah->curchan->chan->band;
        rx_status->freq = ah->curchan->chan->center_freq;
                sc->rx.num_pkts++;
  #endif
  
- exit:
-       sc->rx.discard_next = false;
-       return ret;
+       return 0;
+ corrupt:
+       sc->rx.discard_next = rx_stats->rs_more;
+       return -EINVAL;
  }
  
 -static void ath9k_rx_skb_postprocess(struct ath_common *common,
 -                                   struct sk_buff *skb,
 -                                   struct ath_rx_status *rx_stats,
 -                                   struct ieee80211_rx_status *rxs,
 -                                   bool decrypt_error)
 -{
 -      struct ath_hw *ah = common->ah;
 -      struct ieee80211_hdr *hdr;
 -      int hdrlen, padpos, padsize;
 -      u8 keyix;
 -      __le16 fc;
 -
 -      /* see if any padding is done by the hw and remove it */
 -      hdr = (struct ieee80211_hdr *) skb->data;
 -      hdrlen = ieee80211_get_hdrlen_from_skb(skb);
 -      fc = hdr->frame_control;
 -      padpos = ieee80211_hdrlen(fc);
 -
 -      /* The MAC header is padded to have 32-bit boundary if the
 -       * packet payload is non-zero. The general calculation for
 -       * padsize would take into account odd header lengths:
 -       * padsize = (4 - padpos % 4) % 4; However, since only
 -       * even-length headers are used, padding can only be 0 or 2
 -       * bytes and we can optimize this a bit. In addition, we must
 -       * not try to remove padding from short control frames that do
 -       * not have payload. */
 -      padsize = padpos & 3;
 -      if (padsize && skb->len>=padpos+padsize+FCS_LEN) {
 -              memmove(skb->data + padsize, skb->data, padpos);
 -              skb_pull(skb, padsize);
 -      }
 -
 -      keyix = rx_stats->rs_keyix;
 -
 -      if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error &&
 -          ieee80211_has_protected(fc)) {
 -              rxs->flag |= RX_FLAG_DECRYPTED;
 -      } else if (ieee80211_has_protected(fc)
 -                 && !decrypt_error && skb->len >= hdrlen + 4) {
 -              keyix = skb->data[hdrlen + 3] >> 6;
 -
 -              if (test_bit(keyix, common->keymap))
 -                      rxs->flag |= RX_FLAG_DECRYPTED;
 -      }
 -      if (ah->sw_mgmt_crypto &&
 -          (rxs->flag & RX_FLAG_DECRYPTED) &&
 -          ieee80211_is_mgmt(fc))
 -              /* Use software decrypt for management frames. */
 -              rxs->flag &= ~RX_FLAG_DECRYPTED;
 -}
 -
  /*
   * Run the LNA combining algorithm only in these cases:
   *
Simple merge
index b5ded8a57cb041a744bc882fcef30651fd7b1cdb,119ee6eaf1c3df944b6482957be5350220433753..5c2706e50775b3a871d6cadf158cf4966b012386
@@@ -2124,8 -1953,9 +2122,9 @@@ static int brcmf_sdio_txpkt_prep_sg(str
                memcpy(pkt_pad->data,
                       pkt->data + pkt->len - tail_chop,
                       tail_chop);
 -              *(u32 *)(pkt_pad->cb) = ALIGN_SKB_FLAG + tail_chop;
 +              *(u16 *)(pkt_pad->cb) = ALIGN_SKB_FLAG + tail_chop;
                skb_trim(pkt, pkt->len - tail_chop);
+               skb_trim(pkt_pad, tail_pad + tail_chop);
                __skb_queue_after(pktq, pkt, pkt_pad);
        } else {
                ntail = pkt->data_len + tail_pad -
@@@ -4164,10 -4045,9 +4159,9 @@@ void brcmf_sdio_remove(struct brcmf_sdi
                                brcmf_sdio_clkctl(bus, CLK_NONE, false);
                                sdio_release_host(bus->sdiodev->func[1]);
                        }
 -                      brcmf_sdio_chip_detach(&bus->ci);
 +                      brcmf_chip_detach(bus->ci);
                }
  
-               brcmu_pkt_buf_free_skb(bus->txglom_sgpad);
                kfree(bus->rxbuf);
                kfree(bus->hdrbuf);
                kfree(bus);
index 1d100f24804c4a7ab4b57867c0ff222be65028ec,b29075c3da8e2e65e8c621c89fda3b5f9b586e79..d994317db85b72cbfc11f602e2d414efc54233b1
@@@ -90,10 -93,10 +93,10 @@@ enum iwl_disable_11n 
   *
   * @sw_crypto: using hardware encryption, default = 0
   * @disable_11n: disable 11n capabilities, default = 0,
-  *    use IWL_DISABLE_HT_* constants
+  *    use IWL_[DIS,EN]ABLE_HT_* constants
   * @amsdu_size_8K: enable 8K amsdu size, default = 0
   * @restart_fw: restart firmware, default = 1
 - * @wd_disable: enable stuck queue check, default = 0
 + * @wd_disable: disable stuck queue check, default = 1
   * @bt_coex_active: enable bt coex, default = true
   * @led_mode: system default, default = 0
   * @power_save: disable power save, default = false
Simple merge
Simple merge
index d2af2127b41a2a2a57c694372a974084bef1340f,7fe7b53fb17a28d75cb7fa9a6fc315c9f0ddd937..9f1683b5f28f8e7c385751c8a34b239b2c2ff903
@@@ -1213,7 -1211,15 +1213,13 @@@ static int mwifiex_pcie_process_recv_da
                rd_index = card->rxbd_rdptr & reg->rx_mask;
                skb_data = card->rx_buf_list[rd_index];
  
 -              MWIFIEX_SKB_PACB(skb_data, &buf_pa);
 -              pci_unmap_single(card->dev, buf_pa, MWIFIEX_RX_DATA_BUF_SIZE,
 -                               PCI_DMA_FROMDEVICE);
+               /* If skb allocation was failed earlier for Rx packet,
+                * rx_buf_list[rd_index] would have been left with a NULL.
+                */
+               if (!skb_data)
+                       return -ENOMEM;
 +              mwifiex_unmap_pci_memory(adapter, skb_data, PCI_DMA_FROMDEVICE);
                card->rx_buf_list[rd_index] = NULL;
  
                /* Get data length from interface header -
Simple merge
index e0ba0115e5aefcb79690559ee1b953ab58f52290,981cf6e7c73be5b65f4a90bb05ef0e9023c592f4..1c5f2b66f0578304f1613eb2df49cd6fe30f151d
@@@ -554,12 -559,10 +554,13 @@@ mwifiex_clean_txrx(struct mwifiex_priva
        mwifiex_wmm_delete_all_ralist(priv);
        memcpy(tos_to_tid, ac_to_tid, sizeof(tos_to_tid));
  
-       if (priv->adapter->if_ops.clean_pcie_ring)
+       if (priv->adapter->if_ops.clean_pcie_ring &&
+           !priv->adapter->surprise_removed)
                priv->adapter->if_ops.clean_pcie_ring(priv->adapter);
        spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags);
 +
 +      skb_queue_walk_safe(&priv->tdls_txq, skb, tmp)
 +              mwifiex_write_data_complete(priv->adapter, skb, 0, -1);
  }
  
  /*
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 6b6f33ad78f2b25be6b1d1318cb237705c17e6ba,f0541370e68eb9071caa429772a0a55d952c27d4..90b82e08ae699b31bd405a495375a88dd5dd1af3
@@@ -1798,15 -1700,12 +1798,15 @@@ static void reg_process_hint(struct reg
                return;
        case NL80211_REGDOM_SET_BY_USER:
                treatment = reg_process_hint_user(reg_request);
-               if (treatment == REG_REQ_OK ||
+               if (treatment == REG_REQ_IGNORE ||
                    treatment == REG_REQ_ALREADY_SET)
                        return;
 -              schedule_delayed_work(&reg_timeout, msecs_to_jiffies(3142));
 +              queue_delayed_work(system_power_efficient_wq,
 +                                 &reg_timeout, msecs_to_jiffies(3142));
                return;
        case NL80211_REGDOM_SET_BY_DRIVER:
 +              if (!wiphy)
 +                      goto out_free;
                treatment = reg_process_hint_driver(wiphy, reg_request);
                break;
        case NL80211_REGDOM_SET_BY_COUNTRY_IE: