linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] mac80211: SMPS for AP Mode
@ 2013-04-10  8:54 Vivekananda Holla
  2013-04-10  8:55 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Vivekananda Holla @ 2013-04-10  8:54 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Patch for SMPS mode for AP. This is to define a new ieee80211_tx_info flag to allow a lower AP driver to set RTS/CTS protection for a dynamic SMPS station

Signed-off-by: Vivekananda Holla <vivekanandah@posedge.com>
---
 include/net/mac80211.h             |    4 ++++
 net/mac80211/rc80211_minstrel_ht.c |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 64faf01..48a950c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -458,6 +458,9 @@ struct ieee80211_bss_conf {
  * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it
  *    would be fragmented by size (this is optional, only used for
  *    monitor injection).
+ * @IEEE80211_TX_CTL_SMPS_SET_RTS: set the RTS/CTS protection mechanism
+ *    for the packet at AP when SMPS mode at the station is 
+ *    dynamic SMPS.
  *
  * Note: If you have to add new flags to the enumeration, then don't
  *     forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -493,6 +496,7 @@ enum mac80211_tx_control_flags {
     IEEE80211_TX_STATUS_EOSP        = BIT(28),
     IEEE80211_TX_CTL_USE_MINRATE        = BIT(29),
     IEEE80211_TX_CTL_DONTFRAG        = BIT(30),
+    IEEE80211_TX_CTL_SMPS_SET_RTS        = BIT(31),
 };
 
 #define IEEE80211_TX_CTL_STBC_SHIFT        23
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index d2b264d..84557e4 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -719,6 +719,9 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
     info->flags |= mi->tx_flags;
     minstrel_ht_check_cck_shortpreamble(mp, mi, txrc->short_preamble);
 
+    if (sta->smps_mode == IEEE80211_SMPS_DYNAMIC)
+        info->flags |= IEEE80211_TX_CTL_SMPS_SET_RTS;
+
     /* Don't use EAPOL frames for sampling on non-mrr hw */
     if (mp->hw->max_rates == 1 &&
         txrc->skb->protocol == cpu_to_be16(ETH_P_PAE))

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [Patch] mac80211: SMPS for AP Mode
@ 2013-04-10 10:42 Vivekananda Holla
  2013-04-10 11:18 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Vivekananda Holla @ 2013-04-10 10:42 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

patch for SMPS mode. after discussion, setting the IEEE80211_TX_RC_USE_RTS_CTS flag for first rate if dynamic SMPS is on in the receiving station

Signed-off-by: Vivekananda Holla <vivekanandah@posedge.com>
---
 net/mac80211/rc80211_minstrel_ht.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index d2b264d..fbca005 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -745,6 +745,10 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
         minstrel_ht_set_rate(mp, mi, &ar[0], mi->max_tp_rate,
             false, false);
     }
+   
+    /* set RTS Flag for the first rate if dynamic SMPS is on for sta */
+    if (sta->smps_mode == IEEE80211_SMPS_DYNAMIC)
+        ar[0].flags |= IEEE80211_TX_RC_USE_RTS_CTS;
 
     if (mp->hw->max_rates >= 3) {
         /*
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-11  8:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10  8:54 [Patch] mac80211: SMPS for AP Mode Vivekananda Holla
2013-04-10  8:55 ` Johannes Berg
2013-04-10  9:35   ` Vivekananda Holla
2013-04-10  9:46     ` Johannes Berg
2013-04-10  9:47       ` Johannes Berg
2013-04-10  9:55         ` Vivekananda Holla
  -- strict thread matches above, loose matches on Subject: below --
2013-04-10 10:42 Vivekananda Holla
2013-04-10 11:18 ` Johannes Berg
2013-04-11  5:21   ` vivekanandah
2013-04-11  8:22     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).