Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171891
b: refs/heads/master
c: 7351c6b
h: refs/heads/master
i:
  171889: f29261a
  171887: 8e41c79
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 19, 2009
1 parent 21ab062 commit 41c8ad7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad4bb6f8883a13bb0f65b194dae36c62a02ac779
refs/heads/master: 7351c6bd482712e5e3ec9dffc547de0e0863efb0
11 changes: 6 additions & 5 deletions trunk/drivers/net/wireless/rt2x00/rt2x00dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
enum data_queue_qid qid = skb_get_queue_mapping(entry->skb);
unsigned int header_length = ieee80211_get_hdrlen_from_skb(entry->skb);
u8 rate_idx, rate_flags, retry_rates;
u8 skbdesc_flags = skbdesc->flags;
unsigned int i;
bool success;

Expand Down Expand Up @@ -287,12 +288,12 @@ void rt2x00lib_txdone(struct queue_entry *entry,
}

/*
* Only send the status report to mac80211 when TX status was
* requested by it. If this was a extra frame coming through
* a mac80211 library call (RTS/CTS) then we should not send the
* status report back.
* Only send the status report to mac80211 when it's a frame
* that originated in mac80211. If this was a extra frame coming
* through a mac80211 library call (RTS/CTS) then we should not
* send the status report back.
*/
if (tx_info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)
if (!(skbdesc_flags & SKBDESC_NOT_MAC80211))
ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb);
else
dev_kfree_skb_irq(entry->skb);
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length);
* rt2x00queue_write_tx_frame - Write TX frame to hardware
* @queue: Queue over which the frame should be send
* @skb: The skb to send
* @local: frame is not from mac80211
*/
int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb);
int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
bool local);

/**
* rt2x00queue_update_beacon - Send new beacon from mac80211 to hardware
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/rt2x00/rt2x00mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
rts_info = IEEE80211_SKB_CB(skb);
rts_info->control.rates[0].flags &= ~IEEE80211_TX_RC_USE_RTS_CTS;
rts_info->control.rates[0].flags &= ~IEEE80211_TX_RC_USE_CTS_PROTECT;
rts_info->flags &= ~IEEE80211_TX_CTL_REQ_TX_STATUS;

if (tx_info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
rts_info->flags |= IEEE80211_TX_CTL_NO_ACK;
Expand All @@ -91,7 +90,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
frag_skb->data, data_length, tx_info,
(struct ieee80211_rts *)(skb->data));

retval = rt2x00queue_write_tx_frame(queue, skb);
retval = rt2x00queue_write_tx_frame(queue, skb, true);
if (retval) {
dev_kfree_skb_any(skb);
WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n");
Expand Down Expand Up @@ -153,7 +152,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
goto exit_fail;
}

if (rt2x00queue_write_tx_frame(queue, skb))
if (rt2x00queue_write_tx_frame(queue, skb, false))
goto exit_fail;

if (rt2x00queue_threshold(queue))
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry,
rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, queue->qid);
}

int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
bool local)
{
struct ieee80211_tx_info *tx_info;
struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX);
Expand Down Expand Up @@ -495,6 +496,9 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
skbdesc->tx_rate_idx = rate_idx;
skbdesc->tx_rate_flags = rate_flags;

if (local)
skbdesc->flags |= SKBDESC_NOT_MAC80211;

/*
* When hardware encryption is supported, and this frame
* is to be encrypted, we should strip the IV/EIV data from
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/wireless/rt2x00/rt2x00queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,15 @@ enum data_queue_qid {
* mac80211 but was stripped for processing by the driver.
* @SKBDESC_L2_PADDED: Payload has been padded for 4-byte alignment,
* the padded bytes are located between header and payload.
* @SKBDESC_NOT_MAC80211: Frame didn't originate from mac80211,
* don't try to pass it back.
*/
enum skb_frame_desc_flags {
SKBDESC_DMA_MAPPED_RX = 1 << 0,
SKBDESC_DMA_MAPPED_TX = 1 << 1,
SKBDESC_IV_STRIPPED = 1 << 2,
SKBDESC_L2_PADDED = 1 << 3
SKBDESC_L2_PADDED = 1 << 3,
SKBDESC_NOT_MAC80211 = 1 << 4,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ struct ieee80211_bss_conf {
*
* These flags are used with the @flags member of &ieee80211_tx_info.
*
* @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame.
* @IEEE80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
* @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
* number to this frame, taking care of not overwriting the fragment
* number and increasing the sequence number only when the
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,8 +1443,6 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
}

info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;

rcu_read_lock();

if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) {
Expand Down Expand Up @@ -1575,6 +1573,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,

memset(info, 0, sizeof(*info));

info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;

/* pass the radiotap header up to xmit */
ieee80211_xmit(IEEE80211_DEV_TO_SUB_IF(dev), skb);
return NETDEV_TX_OK;
Expand Down

0 comments on commit 41c8ad7

Please sign in to comment.