diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/txrx.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/txrx.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index ebb24045a8ae..40432fe7a5d2 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c | |||
@@ -125,8 +125,9 @@ static bool ath6kl_process_uapsdq(struct ath6kl_sta *conn, | |||
125 | *flags |= WMI_DATA_HDR_FLAGS_UAPSD; | 125 | *flags |= WMI_DATA_HDR_FLAGS_UAPSD; |
126 | spin_unlock_bh(&conn->psq_lock); | 126 | spin_unlock_bh(&conn->psq_lock); |
127 | return false; | 127 | return false; |
128 | } else if (!conn->apsd_info) | 128 | } else if (!conn->apsd_info) { |
129 | return false; | 129 | return false; |
130 | } | ||
130 | 131 | ||
131 | if (test_bit(WMM_ENABLED, &vif->flags)) { | 132 | if (test_bit(WMM_ENABLED, &vif->flags)) { |
132 | ether_type = be16_to_cpu(datap->h_proto); | 133 | ether_type = be16_to_cpu(datap->h_proto); |
@@ -316,8 +317,9 @@ int ath6kl_control_tx(void *devt, struct sk_buff *skb, | |||
316 | cookie = NULL; | 317 | cookie = NULL; |
317 | ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n", | 318 | ath6kl_err("wmi ctrl ep full, dropping pkt : 0x%p, len:%d\n", |
318 | skb, skb->len); | 319 | skb, skb->len); |
319 | } else | 320 | } else { |
320 | cookie = ath6kl_alloc_cookie(ar); | 321 | cookie = ath6kl_alloc_cookie(ar); |
322 | } | ||
321 | 323 | ||
322 | if (cookie == NULL) { | 324 | if (cookie == NULL) { |
323 | spin_unlock_bh(&ar->lock); | 325 | spin_unlock_bh(&ar->lock); |
@@ -359,7 +361,7 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
359 | struct ath6kl_vif *vif = netdev_priv(dev); | 361 | struct ath6kl_vif *vif = netdev_priv(dev); |
360 | u32 map_no = 0; | 362 | u32 map_no = 0; |
361 | u16 htc_tag = ATH6KL_DATA_PKT_TAG; | 363 | u16 htc_tag = ATH6KL_DATA_PKT_TAG; |
362 | u8 ac = 99 ; /* initialize to unmapped ac */ | 364 | u8 ac = 99; /* initialize to unmapped ac */ |
363 | bool chk_adhoc_ps_mapping = false; | 365 | bool chk_adhoc_ps_mapping = false; |
364 | int ret; | 366 | int ret; |
365 | struct wmi_tx_meta_v2 meta_v2; | 367 | struct wmi_tx_meta_v2 meta_v2; |
@@ -449,8 +451,9 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) | |||
449 | if (ret) | 451 | if (ret) |
450 | goto fail_tx; | 452 | goto fail_tx; |
451 | } | 453 | } |
452 | } else | 454 | } else { |
453 | goto fail_tx; | 455 | goto fail_tx; |
456 | } | ||
454 | 457 | ||
455 | spin_lock_bh(&ar->lock); | 458 | spin_lock_bh(&ar->lock); |
456 | 459 | ||
@@ -702,7 +705,6 @@ void ath6kl_tx_complete(struct htc_target *target, | |||
702 | 705 | ||
703 | /* reap completed packets */ | 706 | /* reap completed packets */ |
704 | while (!list_empty(packet_queue)) { | 707 | while (!list_empty(packet_queue)) { |
705 | |||
706 | packet = list_first_entry(packet_queue, struct htc_packet, | 708 | packet = list_first_entry(packet_queue, struct htc_packet, |
707 | list); | 709 | list); |
708 | list_del(&packet->list); | 710 | list_del(&packet->list); |
@@ -1089,8 +1091,9 @@ static void aggr_deque_frms(struct aggr_info_conn *agg_conn, u8 tid, | |||
1089 | else | 1091 | else |
1090 | skb_queue_tail(&rxtid->q, node->skb); | 1092 | skb_queue_tail(&rxtid->q, node->skb); |
1091 | node->skb = NULL; | 1093 | node->skb = NULL; |
1092 | } else | 1094 | } else { |
1093 | stats->num_hole++; | 1095 | stats->num_hole++; |
1096 | } | ||
1094 | 1097 | ||
1095 | rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next); | 1098 | rxtid->seq_next = ATH6KL_NEXT_SEQ_NO(rxtid->seq_next); |
1096 | idx = AGGR_WIN_IDX(rxtid->seq_next, rxtid->hold_q_sz); | 1099 | idx = AGGR_WIN_IDX(rxtid->seq_next, rxtid->hold_q_sz); |
@@ -1211,7 +1214,7 @@ static bool aggr_process_recv_frm(struct aggr_info_conn *agg_conn, u8 tid, | |||
1211 | return is_queued; | 1214 | return is_queued; |
1212 | 1215 | ||
1213 | spin_lock_bh(&rxtid->lock); | 1216 | spin_lock_bh(&rxtid->lock); |
1214 | for (idx = 0 ; idx < rxtid->hold_q_sz; idx++) { | 1217 | for (idx = 0; idx < rxtid->hold_q_sz; idx++) { |
1215 | if (rxtid->hold_q[idx].skb) { | 1218 | if (rxtid->hold_q[idx].skb) { |
1216 | /* | 1219 | /* |
1217 | * There is a frame in the queue and no | 1220 | * There is a frame in the queue and no |
@@ -1265,7 +1268,6 @@ static void ath6kl_uapsd_trigger_frame_rx(struct ath6kl_vif *vif, | |||
1265 | is_apsdq_empty_at_start = is_apsdq_empty; | 1268 | is_apsdq_empty_at_start = is_apsdq_empty; |
1266 | 1269 | ||
1267 | while ((!is_apsdq_empty) && (num_frames_to_deliver)) { | 1270 | while ((!is_apsdq_empty) && (num_frames_to_deliver)) { |
1268 | |||
1269 | spin_lock_bh(&conn->psq_lock); | 1271 | spin_lock_bh(&conn->psq_lock); |
1270 | skb = skb_dequeue(&conn->apsdq); | 1272 | skb = skb_dequeue(&conn->apsdq); |
1271 | is_apsdq_empty = skb_queue_empty(&conn->apsdq); | 1273 | is_apsdq_empty = skb_queue_empty(&conn->apsdq); |
@@ -1606,16 +1608,18 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) | |||
1606 | if (!conn) | 1608 | if (!conn) |
1607 | return; | 1609 | return; |
1608 | aggr_conn = conn->aggr_conn; | 1610 | aggr_conn = conn->aggr_conn; |
1609 | } else | 1611 | } else { |
1610 | aggr_conn = vif->aggr_cntxt->aggr_conn; | 1612 | aggr_conn = vif->aggr_cntxt->aggr_conn; |
1613 | } | ||
1611 | 1614 | ||
1612 | if (aggr_process_recv_frm(aggr_conn, tid, seq_no, | 1615 | if (aggr_process_recv_frm(aggr_conn, tid, seq_no, |
1613 | is_amsdu, skb)) { | 1616 | is_amsdu, skb)) { |
1614 | /* aggregation code will handle the skb */ | 1617 | /* aggregation code will handle the skb */ |
1615 | return; | 1618 | return; |
1616 | } | 1619 | } |
1617 | } else if (!is_broadcast_ether_addr(datap->h_dest)) | 1620 | } else if (!is_broadcast_ether_addr(datap->h_dest)) { |
1618 | vif->net_stats.multicast++; | 1621 | vif->net_stats.multicast++; |
1622 | } | ||
1619 | 1623 | ||
1620 | ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); | 1624 | ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); |
1621 | } | 1625 | } |
@@ -1710,8 +1714,9 @@ void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid_mux, u16 seq_no, | |||
1710 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); | 1714 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); |
1711 | if (sta) | 1715 | if (sta) |
1712 | aggr_conn = sta->aggr_conn; | 1716 | aggr_conn = sta->aggr_conn; |
1713 | } else | 1717 | } else { |
1714 | aggr_conn = vif->aggr_cntxt->aggr_conn; | 1718 | aggr_conn = vif->aggr_cntxt->aggr_conn; |
1719 | } | ||
1715 | 1720 | ||
1716 | if (!aggr_conn) | 1721 | if (!aggr_conn) |
1717 | return; | 1722 | return; |
@@ -1766,7 +1771,6 @@ void aggr_conn_init(struct ath6kl_vif *vif, struct aggr_info *aggr_info, | |||
1766 | skb_queue_head_init(&rxtid->q); | 1771 | skb_queue_head_init(&rxtid->q); |
1767 | spin_lock_init(&rxtid->lock); | 1772 | spin_lock_init(&rxtid->lock); |
1768 | } | 1773 | } |
1769 | |||
1770 | } | 1774 | } |
1771 | 1775 | ||
1772 | struct aggr_info *aggr_init(struct ath6kl_vif *vif) | 1776 | struct aggr_info *aggr_init(struct ath6kl_vif *vif) |
@@ -1806,8 +1810,9 @@ void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid_mux) | |||
1806 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); | 1810 | sta = ath6kl_find_sta_by_aid(vif->ar, aid); |
1807 | if (sta) | 1811 | if (sta) |
1808 | aggr_conn = sta->aggr_conn; | 1812 | aggr_conn = sta->aggr_conn; |
1809 | } else | 1813 | } else { |
1810 | aggr_conn = vif->aggr_cntxt->aggr_conn; | 1814 | aggr_conn = vif->aggr_cntxt->aggr_conn; |
1815 | } | ||
1811 | 1816 | ||
1812 | if (!aggr_conn) | 1817 | if (!aggr_conn) |
1813 | return; | 1818 | return; |