]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commitdiff
Merge branch 'linux-3.8.y' of http://git.kernel.org/pub/scm/linux/kernel/git/stable...
authorDan Murphy <dmurphy@ti.com>
Thu, 28 Mar 2013 19:56:01 +0000 (14:56 -0500)
committerDan Murphy <dmurphy@ti.com>
Thu, 28 Mar 2013 19:56:01 +0000 (14:56 -0500)
* 'linux-3.8.y' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (99 commits)
  Linux 3.8.5
  rt2x00: error in configurations with mesh support disabled
  ARM: DMA-mapping: add missing GFP_DMA flag for atomic buffer allocation
  usb: musb: da8xx: Fix build breakage due to typo
  USB: io_ti: fix get_icount for two port adapters
  USB: garmin_gps: fix memory leak on disconnect
  udf: Fix bitmap overflow on large filesystems with small block size
  ACPI: Rework acpi_get_child() to be more efficient
  efivars: Fix check for CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE
  efivars: Add module parameter to disable use as a pstore backend
  efivars: Allow disabling use as a pstore backend
  USB: serial: fix interface refcounting
  usb: gadget: ffs: fix enable multiple instances
  USB: EHCI: fix regression in QH unlinking
  USB: EHCI: fix regression during bus resume
  USB: cdc-acm: fix device unregistration
  USB: xhci: correctly enable interrupts
  USB: xhci - fix bit definitions for IMAN register
  x86-64: Fix the failure case in copy_user_handle_tail()
  clockevents: Don't allow dummy broadcast timers
  ...

Signed-off-by: Dan Murphy <dmurphy@ti.com>
1  2 
drivers/net/wireless/mwifiex/join.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/usb/host/ehci-hcd.c
net/ipv4/tcp.c

index a537297866c610e179788821ed26d4f402dd1a7a,34738762196c3f6b28c922978331de921a26d0e7..56884d7af22c7f95c6c53f872022485f342a983e
@@@ -157,8 -157,8 +157,8 @@@ static int mwifiex_get_common_rates(str
  
        memset(rate1, 0, rate1_size);
  
 -      for (i = 0; rate2[i] && i < rate2_size; i++) {
 -              for (j = 0; tmp[j] && j < rate1_size; j++) {
 +      for (i = 0; i < rate2_size && rate2[i]; i++) {
 +              for (j = 0; j < rate1_size && tmp[j]; j++) {
                        /* Check common rate, excluding the bit for
                           basic rate */
                        if ((rate2[i] & 0x7F) == (tmp[j] & 0x7F)) {
@@@ -398,6 -398,8 +398,6 @@@ int mwifiex_cmd_802_11_associate(struc
  
        pos = (u8 *) assoc;
  
 -      mwifiex_cfg_tx_buf(priv, bss_desc);
 -
        cmd->command = cpu_to_le16(HostCmd_CMD_802_11_ASSOCIATE);
  
        /* Save so we know which BSS Desc to use in the response handler */
@@@ -613,33 -615,23 +613,33 @@@ int mwifiex_ret_802_11_associate(struc
        struct ieee_types_assoc_rsp *assoc_rsp;
        struct mwifiex_bssdescriptor *bss_desc;
        u8 enable_data = true;
 +      u16 cap_info, status_code;
  
        assoc_rsp = (struct ieee_types_assoc_rsp *) &resp->params;
  
 +      cap_info = le16_to_cpu(assoc_rsp->cap_info_bitmap);
 +      status_code = le16_to_cpu(assoc_rsp->status_code);
 +
        priv->assoc_rsp_size = min(le16_to_cpu(resp->size) - S_DS_GEN,
                                   sizeof(priv->assoc_rsp_buf));
  
        memcpy(priv->assoc_rsp_buf, &resp->params, priv->assoc_rsp_size);
  
 -      if (le16_to_cpu(assoc_rsp->status_code)) {
 +      if (status_code) {
                priv->adapter->dbg.num_cmd_assoc_failure++;
                dev_err(priv->adapter->dev,
                        "ASSOC_RESP: failed, status code=%d err=%#x a_id=%#x\n",
 -                      le16_to_cpu(assoc_rsp->status_code),
 -                      le16_to_cpu(assoc_rsp->cap_info_bitmap),
 -                      le16_to_cpu(assoc_rsp->a_id));
 +                      status_code, cap_info, le16_to_cpu(assoc_rsp->a_id));
 +
 +              if (cap_info == MWIFIEX_TIMEOUT_FOR_AP_RESP) {
 +                      if (status_code == MWIFIEX_STATUS_CODE_AUTH_TIMEOUT)
 +                              ret = WLAN_STATUS_AUTH_TIMEOUT;
 +                      else
 +                              ret = WLAN_STATUS_UNSPECIFIED_FAILURE;
 +              } else {
 +                      ret = status_code;
 +              }
  
 -              ret = le16_to_cpu(assoc_rsp->status_code);
                goto done;
        }
  
@@@ -977,16 -969,6 +977,16 @@@ mwifiex_cmd_802_11_ad_hoc_start(struct 
                                        priv->adapter->config_bands);
                mwifiex_fill_cap_info(priv, radio_type, ht_cap);
  
 +              if (adapter->sec_chan_offset ==
 +                                      IEEE80211_HT_PARAM_CHA_SEC_NONE) {
 +                      u16 tmp_ht_cap;
 +
 +                      tmp_ht_cap = le16_to_cpu(ht_cap->ht_cap.cap_info);
 +                      tmp_ht_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
 +                      tmp_ht_cap &= ~IEEE80211_HT_CAP_SGI_40;
 +                      ht_cap->ht_cap.cap_info = cpu_to_le16(tmp_ht_cap);
 +              }
 +
                pos += sizeof(struct mwifiex_ie_types_htcap);
                cmd_append_size += sizeof(struct mwifiex_ie_types_htcap);
  
@@@ -1110,10 -1092,9 +1110,9 @@@ mwifiex_cmd_802_11_ad_hoc_join(struct m
                adhoc_join->bss_descriptor.bssid,
                adhoc_join->bss_descriptor.ssid);
  
-       for (i = 0; bss_desc->supported_rates[i] &&
-                       i < MWIFIEX_SUPPORTED_RATES;
-                       i++)
-                       ;
+       for (i = 0; i < MWIFIEX_SUPPORTED_RATES &&
+                   bss_desc->supported_rates[i]; i++)
+               ;
        rates_size = i;
  
        /* Copy Data Rates from the Rates recorded in scan response */
index 1031db66474a6403e67ab5a8f5789820343ac1a6,cdbfc303f67a0f1a5c20200d1c83661c971bbd30..c7a5d26481c855b7823dd9122805c60b14a54dec
@@@ -271,50 -271,6 +271,50 @@@ void rt2x00lib_dmadone(struct queue_ent
  }
  EXPORT_SYMBOL_GPL(rt2x00lib_dmadone);
  
 +static inline int rt2x00lib_txdone_bar_status(struct queue_entry *entry)
 +{
 +      struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
 +      struct ieee80211_bar *bar = (void *) entry->skb->data;
 +      struct rt2x00_bar_list_entry *bar_entry;
 +      int ret;
 +
 +      if (likely(!ieee80211_is_back_req(bar->frame_control)))
 +              return 0;
 +
 +      /*
 +       * Unlike all other frames, the status report for BARs does
 +       * not directly come from the hardware as it is incapable of
 +       * matching a BA to a previously send BAR. The hardware will
 +       * report all BARs as if they weren't acked at all.
 +       *
 +       * Instead the RX-path will scan for incoming BAs and set the
 +       * block_acked flag if it sees one that was likely caused by
 +       * a BAR from us.
 +       *
 +       * Remove remaining BARs here and return their status for
 +       * TX done processing.
 +       */
 +      ret = 0;
 +      rcu_read_lock();
 +      list_for_each_entry_rcu(bar_entry, &rt2x00dev->bar_list, list) {
 +              if (bar_entry->entry != entry)
 +                      continue;
 +
 +              spin_lock_bh(&rt2x00dev->bar_list_lock);
 +              /* Return whether this BAR was blockacked or not */
 +              ret = bar_entry->block_acked;
 +              /* Remove the BAR from our checklist */
 +              list_del_rcu(&bar_entry->list);
 +              spin_unlock_bh(&rt2x00dev->bar_list_lock);
 +              kfree_rcu(bar_entry, head);
 +
 +              break;
 +      }
 +      rcu_read_unlock();
 +
 +      return ret;
 +}
 +
  void rt2x00lib_txdone(struct queue_entry *entry,
                      struct txdone_entry_desc *txdesc)
  {
        rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TXDONE, entry->skb);
  
        /*
 -       * Determine if the frame has been successfully transmitted.
 +       * Determine if the frame has been successfully transmitted and
 +       * remove BARs from our check list while checking for their
 +       * TX status.
         */
        success =
 +          rt2x00lib_txdone_bar_status(entry) ||
            test_bit(TXDONE_SUCCESS, &txdesc->flags) ||
            test_bit(TXDONE_UNKNOWN, &txdesc->flags);
  
@@@ -538,50 -491,6 +538,50 @@@ static void rt2x00lib_sleep(struct work
                                 IEEE80211_CONF_CHANGE_PS);
  }
  
 +static void rt2x00lib_rxdone_check_ba(struct rt2x00_dev *rt2x00dev,
 +                                    struct sk_buff *skb,
 +                                    struct rxdone_entry_desc *rxdesc)
 +{
 +      struct rt2x00_bar_list_entry *entry;
 +      struct ieee80211_bar *ba = (void *)skb->data;
 +
 +      if (likely(!ieee80211_is_back(ba->frame_control)))
 +              return;
 +
 +      if (rxdesc->size < sizeof(*ba) + FCS_LEN)
 +              return;
 +
 +      rcu_read_lock();
 +      list_for_each_entry_rcu(entry, &rt2x00dev->bar_list, list) {
 +
 +              if (ba->start_seq_num != entry->start_seq_num)
 +                      continue;
 +
 +#define TID_CHECK(a, b) (                                             \
 +      ((a) & cpu_to_le16(IEEE80211_BAR_CTRL_TID_INFO_MASK)) ==        \
 +      ((b) & cpu_to_le16(IEEE80211_BAR_CTRL_TID_INFO_MASK)))          \
 +
 +              if (!TID_CHECK(ba->control, entry->control))
 +                      continue;
 +
 +#undef TID_CHECK
 +
 +              if (compare_ether_addr(ba->ra, entry->ta))
 +                      continue;
 +
 +              if (compare_ether_addr(ba->ta, entry->ra))
 +                      continue;
 +
 +              /* Mark BAR since we received the according BA */
 +              spin_lock_bh(&rt2x00dev->bar_list_lock);
 +              entry->block_acked = 1;
 +              spin_unlock_bh(&rt2x00dev->bar_list_lock);
 +              break;
 +      }
 +      rcu_read_unlock();
 +
 +}
 +
  static void rt2x00lib_rxdone_check_ps(struct rt2x00_dev *rt2x00dev,
                                      struct sk_buff *skb,
                                      struct rxdone_entry_desc *rxdesc)
@@@ -764,12 -673,6 +764,12 @@@ void rt2x00lib_rxdone(struct queue_entr
         */
        rt2x00lib_rxdone_check_ps(rt2x00dev, entry->skb, &rxdesc);
  
 +      /*
 +       * Check for incoming BlockAcks to match to the BlockAckReqs
 +       * we've send out.
 +       */
 +      rt2x00lib_rxdone_check_ba(rt2x00dev, entry->skb, &rxdesc);
 +
        /*
         * Update extra components
         */
@@@ -1236,8 -1139,7 +1236,8 @@@ static inline void rt2x00lib_set_if_com
         */
        if_limit = &rt2x00dev->if_limits_ap;
        if_limit->max = rt2x00dev->ops->max_ap_intf;
 -      if_limit->types = BIT(NL80211_IFTYPE_AP);
 +      if_limit->types = BIT(NL80211_IFTYPE_AP) |
 +                      BIT(NL80211_IFTYPE_MESH_POINT);
  
        /*
         * Build up AP interface combinations structure.
@@@ -1281,8 -1183,6 +1281,8 @@@ int rt2x00lib_probe_dev(struct rt2x00_d
  
        spin_lock_init(&rt2x00dev->irqmask_lock);
        mutex_init(&rt2x00dev->csr_mutex);
 +      INIT_LIST_HEAD(&rt2x00dev->bar_list);
 +      spin_lock_init(&rt2x00dev->bar_list_lock);
  
        set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
  
                rt2x00dev->hw->wiphy->interface_modes |=
                    BIT(NL80211_IFTYPE_ADHOC) |
                    BIT(NL80211_IFTYPE_AP) |
+ #ifdef CONFIG_MAC80211_MESH
                    BIT(NL80211_IFTYPE_MESH_POINT) |
+ #endif
                    BIT(NL80211_IFTYPE_WDS);
  
        rt2x00dev->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
@@@ -1447,7 -1349,7 +1449,7 @@@ EXPORT_SYMBOL_GPL(rt2x00lib_remove_dev)
  #ifdef CONFIG_PM
  int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state)
  {
 -      NOTICE(rt2x00dev, "Going to sleep.\n");
 +      DEBUG(rt2x00dev, "Going to sleep.\n");
  
        /*
         * Prevent mac80211 from accessing driver while suspended.
@@@ -1487,7 -1389,7 +1489,7 @@@ EXPORT_SYMBOL_GPL(rt2x00lib_suspend)
  
  int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev)
  {
 -      NOTICE(rt2x00dev, "Waking up.\n");
 +      DEBUG(rt2x00dev, "Waking up.\n");
  
        /*
         * Restore/enable extra components.
index 303b0222cd6d20d716de9f1abf8f59fc18b0303b,416a6dce5e11c8adeeed2eef487b93c93dd5d728..442b7915ab81c6ddd7ecb52f3f4eb089e1ec840d
@@@ -302,6 -302,7 +302,7 @@@ static void ehci_quiesce (struct ehci_h
  
  static void end_unlink_async(struct ehci_hcd *ehci);
  static void unlink_empty_async(struct ehci_hcd *ehci);
+ static void unlink_empty_async_suspended(struct ehci_hcd *ehci);
  static void ehci_work(struct ehci_hcd *ehci);
  static void start_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh);
  static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh);
@@@ -748,11 -749,9 +749,9 @@@ static irqreturn_t ehci_irq (struct usb
                /* guard against (alleged) silicon errata */
                if (cmd & CMD_IAAD)
                        ehci_dbg(ehci, "IAA with IAAD still set?\n");
-               if (ehci->async_iaa) {
+               if (ehci->async_iaa)
                        COUNT(ehci->stats.iaa);
-                       end_unlink_async(ehci);
-               } else
-                       ehci_dbg(ehci, "IAA with nothing unlinked?\n");
+               end_unlink_async(ehci);
        }
  
        /* remote wakeup [4.3.1] */
@@@ -1252,6 -1251,11 +1251,6 @@@ MODULE_LICENSE ("GPL")
  #define PLATFORM_DRIVER               ehci_hcd_sh_driver
  #endif
  
 -#ifdef CONFIG_USB_EHCI_HCD_OMAP
 -#include "ehci-omap.c"
 -#define        PLATFORM_DRIVER         ehci_hcd_omap_driver
 -#endif
 -
  #ifdef CONFIG_PPC_PS3
  #include "ehci-ps3.c"
  #define       PS3_SYSTEM_BUS_DRIVER   ps3_ehci_driver
        !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \
        !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \
        !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \
 +      !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \
        !defined(PLATFORM_DRIVER) && \
        !defined(PS3_SYSTEM_BUS_DRIVER) && \
        !defined(OF_PLATFORM_DRIVER) && \
diff --combined net/ipv4/tcp.c
index 035663d9de5ce568d8c9be553363d32f82d8bd07,45b63ca5b48c802fd3a3377a52a93c98582b72d7..f3a58afb821ebcb92fa0a5913d3281412a0f47e8
@@@ -773,7 -773,7 +773,7 @@@ struct sk_buff *sk_stream_alloc_skb(str
                         * Make sure that we have exactly size bytes
                         * available to the caller, no more, no less.
                         */
-                       skb->avail_size = size;
+                       skb->reserved_tailroom = skb->end - skb->tail - size;
                        return skb;
                }
                __kfree_skb(skb);
@@@ -1406,10 -1406,10 +1406,10 @@@ static void tcp_service_net_dma(struct 
                return;
  
        last_issued = tp->ucopy.dma_cookie;
 -      dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
 +      dma_async_issue_pending(tp->ucopy.dma_chan);
  
        do {
 -              if (dma_async_memcpy_complete(tp->ucopy.dma_chan,
 +              if (dma_async_is_tx_complete(tp->ucopy.dma_chan,
                                              last_issued, &done,
                                              &used) == DMA_SUCCESS) {
                        /* Safe to free early-copied skbs now */
@@@ -1751,7 -1751,7 +1751,7 @@@ int tcp_recvmsg(struct kiocb *iocb, str
                                tcp_service_net_dma(sk, true);
                                tcp_cleanup_rbuf(sk, copied);
                        } else
 -                              dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
 +                              dma_async_issue_pending(tp->ucopy.dma_chan);
                }
  #endif
                if (copied >= target) {
@@@ -1844,7 -1844,7 +1844,7 @@@ do_prequeue
                                        break;
                                }
  
 -                              dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
 +                              dma_async_issue_pending(tp->ucopy.dma_chan);
  
                                if ((offset + used) == skb->len)
                                        copied_early = true;