aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-08-28 17:01:54 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:48 -0400
commite8bf96495cd67090b4900ddaf8e8672a17ec39fa (patch)
tree00630b109a928733217dc25ea1f5aefbf8b48a46 /net/mac80211/tx.c
parentcf966838cd5596ca61d3e9949050442a943f6238 (diff)
[MAC80211]: Remove bitfields from struct ieee80211_tx_packet_data
remove bitfields from struct ieee80211_tx_packet_data [Johannes: completely clear flags in ieee80211_remove_tx_extra] Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 53efcf6f769c..eb4d9eab0f3f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1245,11 +1245,11 @@ int ieee80211_master_start_xmit(struct sk_buff *skb,
1245 1245
1246 control.ifindex = odev->ifindex; 1246 control.ifindex = odev->ifindex;
1247 control.type = osdata->type; 1247 control.type = osdata->type;
1248 if (pkt_data->req_tx_status) 1248 if (pkt_data->flags & IEEE80211_TXPD_REQ_TX_STATUS)
1249 control.flags |= IEEE80211_TXCTL_REQ_TX_STATUS; 1249 control.flags |= IEEE80211_TXCTL_REQ_TX_STATUS;
1250 if (pkt_data->do_not_encrypt) 1250 if (pkt_data->flags & IEEE80211_TXPD_DO_NOT_ENCRYPT)
1251 control.flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT; 1251 control.flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT;
1252 if (pkt_data->requeue) 1252 if (pkt_data->flags & IEEE80211_TXPD_REQUEUE)
1253 control.flags |= IEEE80211_TXCTL_REQUEUE; 1253 control.flags |= IEEE80211_TXCTL_REQUEUE;
1254 control.queue = pkt_data->queue; 1254 control.queue = pkt_data->queue;
1255 1255
@@ -1291,8 +1291,7 @@ int ieee80211_monitor_start_xmit(struct sk_buff *skb,
1291 /* needed because we set skb device to master */ 1291 /* needed because we set skb device to master */
1292 pkt_data->ifindex = dev->ifindex; 1292 pkt_data->ifindex = dev->ifindex;
1293 1293
1294 pkt_data->mgmt_iface = 0; 1294 pkt_data->flags |= IEEE80211_TXPD_DO_NOT_ENCRYPT;
1295 pkt_data->do_not_encrypt = 1;
1296 1295
1297 /* 1296 /*
1298 * fix up the pointers accounting for the radiotap 1297 * fix up the pointers accounting for the radiotap
@@ -1343,7 +1342,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1343 struct ieee80211_hdr hdr; 1342 struct ieee80211_hdr hdr;
1344 const u8 *encaps_data; 1343 const u8 *encaps_data;
1345 int encaps_len, skip_header_bytes; 1344 int encaps_len, skip_header_bytes;
1346 int nh_pos, h_pos, no_encrypt = 0; 1345 int nh_pos, h_pos;
1347 struct sta_info *sta; 1346 struct sta_info *sta;
1348 1347
1349 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1348 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -1487,8 +1486,8 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1487 pkt_data = (struct ieee80211_tx_packet_data *)skb->cb; 1486 pkt_data = (struct ieee80211_tx_packet_data *)skb->cb;
1488 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data)); 1487 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data));
1489 pkt_data->ifindex = dev->ifindex; 1488 pkt_data->ifindex = dev->ifindex;
1490 pkt_data->mgmt_iface = (sdata->type == IEEE80211_IF_TYPE_MGMT); 1489 if (sdata->type == IEEE80211_IF_TYPE_MGMT)
1491 pkt_data->do_not_encrypt = no_encrypt; 1490 pkt_data->flags |= IEEE80211_TXPD_MGMT_IFACE;
1492 1491
1493 skb->dev = local->mdev; 1492 skb->dev = local->mdev;
1494 sdata->stats.tx_packets++; 1493 sdata->stats.tx_packets++;
@@ -1546,7 +1545,8 @@ int ieee80211_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
1546 pkt_data = (struct ieee80211_tx_packet_data *) skb->cb; 1545 pkt_data = (struct ieee80211_tx_packet_data *) skb->cb;
1547 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data)); 1546 memset(pkt_data, 0, sizeof(struct ieee80211_tx_packet_data));
1548 pkt_data->ifindex = sdata->dev->ifindex; 1547 pkt_data->ifindex = sdata->dev->ifindex;
1549 pkt_data->mgmt_iface = (sdata->type == IEEE80211_IF_TYPE_MGMT); 1548 if (sdata->type == IEEE80211_IF_TYPE_MGMT)
1549 pkt_data->flags |= IEEE80211_TXPD_MGMT_IFACE;
1550 1550
1551 skb->priority = 20; /* use hardcoded priority for mgmt TX queue */ 1551 skb->priority = 20; /* use hardcoded priority for mgmt TX queue */
1552 skb->dev = sdata->local->mdev; 1552 skb->dev = sdata->local->mdev;
@@ -1556,12 +1556,13 @@ int ieee80211_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev)
1556 * to request TX callback for hostapd. BIT(1) is checked. 1556 * to request TX callback for hostapd. BIT(1) is checked.
1557 */ 1557 */
1558 if ((fc & BIT(1)) == BIT(1)) { 1558 if ((fc & BIT(1)) == BIT(1)) {
1559 pkt_data->req_tx_status = 1; 1559 pkt_data->flags |= IEEE80211_TXPD_REQ_TX_STATUS;
1560 fc &= ~BIT(1); 1560 fc &= ~BIT(1);
1561 hdr->frame_control = cpu_to_le16(fc); 1561 hdr->frame_control = cpu_to_le16(fc);
1562 } 1562 }
1563 1563
1564 pkt_data->do_not_encrypt = !(fc & IEEE80211_FCTL_PROTECTED); 1564 if (!(fc & IEEE80211_FCTL_PROTECTED))
1565 pkt_data->flags |= IEEE80211_TXPD_DO_NOT_ENCRYPT;
1565 1566
1566 sdata->stats.tx_packets++; 1567 sdata->stats.tx_packets++;
1567 sdata->stats.tx_bytes += skb->len; 1568 sdata->stats.tx_bytes += skb->len;