Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266635
b: refs/heads/master
c: b6f3530
h: refs/heads/master
i:
  266633: ecaf0a5
  266631: 0a3fe7a
v: v3
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Oct 3, 2011
1 parent b5e4cdc commit 19ed62d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 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: e209c5a7ed1870ab7f112ad47083b5d616e8b6a4
refs/heads/master: b6f35301efda5e94342cfcca9e29b7b3e9a5f827
4 changes: 4 additions & 0 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ struct ieee80211_bss_conf {
* an SP that mac80211 transmits, it is already set; for driver frames
* the driver may set this flag. It is also used to do the same for
* PS-Poll responses.
* @IEEE80211_TX_CTL_USE_MINRATE: This frame will be sent at lowest rate.
* This flag is used to send nullfunc frame at minimum rate when
* the nullfunc is used for connection monitoring purpose.
*
* Note: If you have to add new flags to the enumeration, then don't
* forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
Expand Down Expand Up @@ -404,6 +407,7 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26),
IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27),
IEEE80211_TX_STATUS_EOSP = BIT(28),
IEEE80211_TX_CTL_USE_MINRATE = BIT(29),
};

#define IEEE80211_TX_CTL_STBC_SHIFT 23
Expand Down
5 changes: 5 additions & 0 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
{
struct sk_buff *skb;
struct ieee80211_hdr_3addr *nullfunc;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

skb = ieee80211_nullfunc_get(&local->hw, &sdata->vif);
if (!skb)
Expand All @@ -358,6 +359,10 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
nullfunc->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);

IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
if (ifmgd->flags & (IEEE80211_STA_BEACON_POLL |
IEEE80211_STA_CONNECTION_POLL))
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_USE_MINRATE;

ieee80211_tx_skb(sdata, skb);
}

Expand Down
8 changes: 5 additions & 3 deletions trunk/net/mac80211/rate.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void rate_control_release(struct kref *kref)
kfree(ctrl_ref);
}

static bool rc_no_data_or_no_ack(struct ieee80211_tx_rate_control *txrc)
static bool rc_no_data_or_no_ack_use_min(struct ieee80211_tx_rate_control *txrc)
{
struct sk_buff *skb = txrc->skb;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
Expand All @@ -208,7 +208,9 @@ static bool rc_no_data_or_no_ack(struct ieee80211_tx_rate_control *txrc)

fc = hdr->frame_control;

return (info->flags & IEEE80211_TX_CTL_NO_ACK) || !ieee80211_is_data(fc);
return (info->flags & (IEEE80211_TX_CTL_NO_ACK |
IEEE80211_TX_CTL_USE_MINRATE)) ||
!ieee80211_is_data(fc);
}

static void rc_send_low_broadcast(s8 *idx, u32 basic_rates,
Expand Down Expand Up @@ -262,7 +264,7 @@ bool rate_control_send_low(struct ieee80211_sta *sta,
struct ieee80211_supported_band *sband = txrc->sband;
int mcast_rate;

if (!sta || !priv_sta || rc_no_data_or_no_ack(txrc)) {
if (!sta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) {
if ((sband->band != IEEE80211_BAND_2GHZ) ||
!(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE))
info->control.rates[0].idx =
Expand Down

0 comments on commit 19ed62d

Please sign in to comment.