txrx.c (240d279940ef496e9456db2287b7989f6521e2e2) | txrx.c (28ae58dd1f55f55dabf02fbc76a76f0809eee937) |
---|---|
1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 464 unchanged lines hidden (view full) --- 473 * dropping the packets which overflowed. 474 */ 475 return HTC_SEND_FULL_DROP; 476 477stop_net_queues: 478 spin_lock_bh(&ar->lock); 479 set_bit(NETQ_STOPPED, &vif->flags); 480 spin_unlock_bh(&ar->lock); | 1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 464 unchanged lines hidden (view full) --- 473 * dropping the packets which overflowed. 474 */ 475 return HTC_SEND_FULL_DROP; 476 477stop_net_queues: 478 spin_lock_bh(&ar->lock); 479 set_bit(NETQ_STOPPED, &vif->flags); 480 spin_unlock_bh(&ar->lock); |
481 netif_stop_queue(ar->net_dev); | 481 netif_stop_queue(vif->ndev); |
482 483 return HTC_SEND_FULL_KEEP; 484} 485 486/* TODO this needs to be looked at */ 487static void ath6kl_tx_clear_node_map(struct ath6kl *ar, 488 enum htc_endpoint_id eid, u32 map_no) 489{ --- 124 unchanged lines hidden (view full) --- 614 } 615 616 spin_unlock_bh(&ar->lock); 617 618 __skb_queue_purge(&skb_queue); 619 620 if (test_bit(CONNECTED, &vif->flags)) { 621 if (!flushing) | 482 483 return HTC_SEND_FULL_KEEP; 484} 485 486/* TODO this needs to be looked at */ 487static void ath6kl_tx_clear_node_map(struct ath6kl *ar, 488 enum htc_endpoint_id eid, u32 map_no) 489{ --- 124 unchanged lines hidden (view full) --- 614 } 615 616 spin_unlock_bh(&ar->lock); 617 618 __skb_queue_purge(&skb_queue); 619 620 if (test_bit(CONNECTED, &vif->flags)) { 621 if (!flushing) |
622 netif_wake_queue(ar->net_dev); | 622 netif_wake_queue(vif->ndev); |
623 } 624 625 if (wake_event) 626 wake_up(&ar->event_wq); 627 628 return; 629 630fatal: --- 450 unchanged lines hidden (view full) --- 1081 spin_unlock_bh(&ar->lock); 1082 1083 skb_put(skb, packet->act_len + HTC_HDR_LENGTH); 1084 skb_pull(skb, HTC_HDR_LENGTH); 1085 1086 ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", 1087 skb->data, skb->len); 1088 | 623 } 624 625 if (wake_event) 626 wake_up(&ar->event_wq); 627 628 return; 629 630fatal: --- 450 unchanged lines hidden (view full) --- 1081 spin_unlock_bh(&ar->lock); 1082 1083 skb_put(skb, packet->act_len + HTC_HDR_LENGTH); 1084 skb_pull(skb, HTC_HDR_LENGTH); 1085 1086 ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, __func__, "rx ", 1087 skb->data, skb->len); 1088 |
1089 skb->dev = ar->net_dev; | 1089 skb->dev = vif->ndev; |
1090 1091 if (!test_bit(WMI_ENABLED, &ar->flag)) { 1092 if (EPPING_ALIGNMENT_PAD > 0) 1093 skb_pull(skb, EPPING_ALIGNMENT_PAD); | 1090 1091 if (!test_bit(WMI_ENABLED, &ar->flag)) { 1092 if (EPPING_ALIGNMENT_PAD > 0) 1093 skb_pull(skb, EPPING_ALIGNMENT_PAD); |
1094 ath6kl_deliver_frames_to_nw_stack(ar->net_dev, skb); | 1094 ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); |
1095 return; 1096 } 1097 1098 if (ept == ar->ctrl_ep) { 1099 ath6kl_wmi_control_rx(ar->wmi, skb); 1100 return; 1101 } 1102 --- 66 unchanged lines hidden (view full) --- 1169 if (prev_ps ^ !!(conn->sta_flags & STA_PS_SLEEP)) { 1170 if (!(conn->sta_flags & STA_PS_SLEEP)) { 1171 struct sk_buff *skbuff = NULL; 1172 1173 spin_lock_bh(&conn->psq_lock); 1174 while ((skbuff = skb_dequeue(&conn->psq)) 1175 != NULL) { 1176 spin_unlock_bh(&conn->psq_lock); | 1095 return; 1096 } 1097 1098 if (ept == ar->ctrl_ep) { 1099 ath6kl_wmi_control_rx(ar->wmi, skb); 1100 return; 1101 } 1102 --- 66 unchanged lines hidden (view full) --- 1169 if (prev_ps ^ !!(conn->sta_flags & STA_PS_SLEEP)) { 1170 if (!(conn->sta_flags & STA_PS_SLEEP)) { 1171 struct sk_buff *skbuff = NULL; 1172 1173 spin_lock_bh(&conn->psq_lock); 1174 while ((skbuff = skb_dequeue(&conn->psq)) 1175 != NULL) { 1176 spin_unlock_bh(&conn->psq_lock); |
1177 ath6kl_data_tx(skbuff, ar->net_dev); | 1177 ath6kl_data_tx(skbuff, vif->ndev); |
1178 spin_lock_bh(&conn->psq_lock); 1179 } 1180 spin_unlock_bh(&conn->psq_lock); 1181 /* Clear the PVB for this STA */ 1182 ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, 1183 conn->aid, 0); 1184 } 1185 } --- 39 unchanged lines hidden (view full) --- 1225 /* 1226 * Drop frames that could not be processed (lack of 1227 * memory, etc.) 1228 */ 1229 dev_kfree_skb(skb); 1230 return; 1231 } 1232 | 1178 spin_lock_bh(&conn->psq_lock); 1179 } 1180 spin_unlock_bh(&conn->psq_lock); 1181 /* Clear the PVB for this STA */ 1182 ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, 1183 conn->aid, 0); 1184 } 1185 } --- 39 unchanged lines hidden (view full) --- 1225 /* 1226 * Drop frames that could not be processed (lack of 1227 * memory, etc.) 1228 */ 1229 dev_kfree_skb(skb); 1230 return; 1231 } 1232 |
1233 if (!(ar->net_dev->flags & IFF_UP)) { | 1233 if (!(vif->ndev->flags & IFF_UP)) { |
1234 dev_kfree_skb(skb); 1235 return; 1236 } 1237 1238 if (vif->nw_type == AP_NETWORK) { 1239 datap = (struct ethhdr *) skb->data; 1240 if (is_multicast_ether_addr(datap->h_dest)) 1241 /* --- 14 unchanged lines hidden (view full) --- 1256 skb1 = skb; 1257 skb = NULL; 1258 } else if (conn && !ar->intra_bss) { 1259 dev_kfree_skb(skb); 1260 skb = NULL; 1261 } 1262 } 1263 if (skb1) | 1234 dev_kfree_skb(skb); 1235 return; 1236 } 1237 1238 if (vif->nw_type == AP_NETWORK) { 1239 datap = (struct ethhdr *) skb->data; 1240 if (is_multicast_ether_addr(datap->h_dest)) 1241 /* --- 14 unchanged lines hidden (view full) --- 1256 skb1 = skb; 1257 skb = NULL; 1258 } else if (conn && !ar->intra_bss) { 1259 dev_kfree_skb(skb); 1260 skb = NULL; 1261 } 1262 } 1263 if (skb1) |
1264 ath6kl_data_tx(skb1, ar->net_dev); | 1264 ath6kl_data_tx(skb1, vif->ndev); |
1265 1266 if (skb == NULL) { 1267 /* nothing to deliver up the stack */ 1268 return; 1269 } 1270 } 1271 1272 datap = (struct ethhdr *) skb->data; 1273 1274 if (is_unicast_ether_addr(datap->h_dest) && 1275 aggr_process_recv_frm(vif->aggr_cntxt, tid, seq_no, 1276 is_amsdu, skb)) 1277 /* aggregation code will handle the skb */ 1278 return; 1279 | 1265 1266 if (skb == NULL) { 1267 /* nothing to deliver up the stack */ 1268 return; 1269 } 1270 } 1271 1272 datap = (struct ethhdr *) skb->data; 1273 1274 if (is_unicast_ether_addr(datap->h_dest) && 1275 aggr_process_recv_frm(vif->aggr_cntxt, tid, seq_no, 1276 is_amsdu, skb)) 1277 /* aggregation code will handle the skb */ 1278 return; 1279 |
1280 ath6kl_deliver_frames_to_nw_stack(ar->net_dev, skb); | 1280 ath6kl_deliver_frames_to_nw_stack(vif->ndev, skb); |
1281} 1282 1283static void aggr_timeout(unsigned long arg) 1284{ 1285 u8 i, j; 1286 struct aggr_info *p_aggr = (struct aggr_info *) arg; 1287 struct rxtid *rxtid; 1288 struct rxtid_stats *stats; --- 210 unchanged lines hidden --- | 1281} 1282 1283static void aggr_timeout(unsigned long arg) 1284{ 1285 u8 i, j; 1286 struct aggr_info *p_aggr = (struct aggr_info *) arg; 1287 struct rxtid *rxtid; 1288 struct rxtid_stats *stats; --- 210 unchanged lines hidden --- |