···8383 * never goes inactive EVER.8484 */8585 cur_ep_dist->dist_flags |= HTC_EP_ACTIVE;8686- } else if (cur_ep_dist->svc_id == WMI_DATA_BK_SVC)8787- /* this is the lowest priority data endpoint */8888- /* FIXME: this looks fishy, check */8989- cred_info->lowestpri_ep_dist = cur_ep_dist->list;8686+ }90879188 /*9289 * Streams have to be created (explicit | implicit) for all···9699 * as traffic activity demands97100 */98101 }102102+103103+ /*104104+ * For ath6kl_credit_seek function,105105+ * it use list_for_each_entry_reverse to walk around the whole ep list.106106+ * Therefore assign this lowestpri_ep_dist after walk around the ep_list107107+ */108108+ cred_info->lowestpri_ep_dist = cur_ep_dist->list;99109100110 WARN_ON(cred_info->cur_free_credits <= 0);101111···762758 u32 txb_mask;763759 u8 ac = WMM_NUM_AC;764760765765- if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||761761+ if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&766762 (WMI_CONTROL_SVC != endpoint->svc_id))767763 ac = target->dev->ar->ep2ac_map[endpoint->eid];768764···797793 * itself798794 */799795 txb_mask = ((1 << ac) - 1);800800- /*801801- * when the scatter request resources drop below a802802- * certain threshold, disable Tx bundling for all803803- * AC's with priority lower than the current requesting804804- * AC. Otherwise re-enable Tx bundling for them805805- */806806- if (scat_req->scat_q_depth < ATH6KL_SCATTER_REQS)807807- target->tx_bndl_mask &= ~txb_mask;808808- else809809- target->tx_bndl_mask |= txb_mask;796796+797797+ /*798798+ * when the scatter request resources drop below a799799+ * certain threshold, disable Tx bundling for all800800+ * AC's with priority lower than the current requesting801801+ * AC. Otherwise re-enable Tx bundling for them802802+ */803803+ if (scat_req->scat_q_depth < ATH6KL_SCATTER_REQS)804804+ target->tx_bndl_mask &= ~txb_mask;805805+ else806806+ target->tx_bndl_mask |= txb_mask;810807 }811808812809 ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx pkts to scatter: %d\n",···854849 int bundle_sent;855850 int n_pkts_bundle;856851 u8 ac = WMM_NUM_AC;852852+ int status;857853858854 spin_lock_bh(&target->tx_lock);859855···872866 */873867 INIT_LIST_HEAD(&txq);874868875875- if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) ||869869+ if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) &&876870 (WMI_CONTROL_SVC != endpoint->svc_id))877871 ac = target->dev->ar->ep2ac_map[endpoint->eid];878872···916910917911 ath6kl_htc_tx_prep_pkt(packet, packet->info.tx.flags,918912 0, packet->info.tx.seqno);919919- ath6kl_htc_tx_issue(target, packet);913913+ status = ath6kl_htc_tx_issue(target, packet);914914+915915+ if (status) {916916+ packet->status = status;917917+ packet->completion(packet->context, packet);918918+ }920919 }921920922921 spin_lock_bh(&target->tx_lock);
+3-8
drivers/net/wireless/ath/ath6kl/htc_pipe.c
···108108109109 /* get packet at head, but don't remove it */110110 packet = list_first_entry(&ep->txq, struct htc_packet, list);111111- if (packet == NULL)112112- break;113111114112 ath6kl_dbg(ATH6KL_DBG_HTC,115113 "%s: got head packet:0x%p , queue depth: %d\n",···801803802804 /* get first packet to find out which ep the packets will go into */803805 packet = list_first_entry(pkt_queue, struct htc_packet, list);804804- if (packet == NULL)805805- return -EINVAL;806806807807 if (packet->endpoint >= ENDPOINT_MAX) {808808 WARN_ON_ONCE(1);···13781382 /* copy all the callbacks */13791383 ep->ep_cb = conn_req->ep_cb;1380138413851385+ /* initialize tx_drop_packet_threshold */13861386+ ep->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM;13871387+13811388 status = ath6kl_hif_pipe_map_service(ar, ep->svc_id,13821389 &ep->pipe.pipeid_ul,13831390 &ep->pipe.pipeid_dl);···16351636 return -EINVAL;1636163716371638 first = list_first_entry(pkt_queue, struct htc_packet, list);16381638- if (first == NULL) {16391639- WARN_ON_ONCE(1);16401640- return -EINVAL;16411641- }1642163916431640 if (first->endpoint >= ENDPOINT_MAX) {16441641 WARN_ON_ONCE(1);