Skip to contentSkip to conversation

mac80211: SMPS for AP Mode

PATCH In review Vivekananda Holla 2 participants 4 messages Apr 10, 2013 – Apr 11, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: SMPS for AP Mode

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

---
 net/mac80211/rc80211_minstrel_ht.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
net/mac80211/rc80211_minstrel_ht.c +4 -0
index d2b264d..fbca005 100644
@@ -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) {
         /*
maintainer
#1 lore raw
Quoted 1 line · Vivekananda Holla

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

Please line-break your description and remove all the discussion-related stuff etc. from the commit log -- see
http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches

Also, it should set the flag depending on the MCS ... Please try to understand what you're actually doing and trying to do before submitting random patches. It's not an effective use of my time to be reviewing patches if you don't know what you're doing.

johannes

#2 lore raw

Hi johannes,

my first patch was based on the premise that an AP cannot switch its receive chains off as it would be servicing multiple clients. i was not aware if an AP can set SMPS at its end, hence i wanted to make sure that control be provided to the lower layer driver to take a call on the same.

in my hurry to submit my first patch, i did overlook the MCS rate dependency and accept my mistake.

i have outlined three requirements based on my understanding for SMPS code and have also incorporated a code snippet. if you are okay with the code snippet, i will provide a patch for the same.

1) check if the receiving station has Dynamic SMPS on
2) check if the current MCS rate is greater than a single stream rate for the first rate
3) if conditions 1 and 2 are true, set the RTS_CTS flag for the first rate that will be attempted to be transmitted

if ((sta->smps_mode == IEEE80211_SMPS_DYNAMIC) && (ar[0].idx > 7))

        ar[0].flags |= IEEE80211_TX_RC_USE_RTS_CTS;

i respect the time you have spent on looking into my code and apologize for the inconvenience caused. this is my first patch submission and i have made some mistakes :)

thanks and regards
Vivek

Quoted 14 lines · Johannes Berg
Quoted 1 line · Vivekananda Holla

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

Please line-break your description and remove all the discussion-related stuff etc. from the commit log -- see

http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches

Also, it should set the flag depending on the MCS ... Please try to understand what you're actually doing and trying to do before submitting random patches. It's not an effective use of my time to be reviewing patches if you don't know what you're doing.

johannes

maintainer
#3 lore raw

Hi Vivek,

No worries.

Quoted 7 lines

i have outlined three requirements based on my understanding for SMPS code and have also incorporated a code snippet. if you are okay with the code snippet, i will provide a patch for the same.

1) check if the receiving station has Dynamic SMPS on
2) check if the current MCS rate is greater than a single stream rate for the first rate

Note that MCS 32 is also single-stream. I'm not sure any driver supports it, and I think minstrel_ht probably also doesn't support it, so I guess you don't have to worry about it, but you may want to check.

Quoted 2 lines

3) if conditions 1 and 2 are true, set the RTS_CTS flag for the first rate that will be attempted to be transmitted

No, you don't just need the first rate, you need any rate that's multi-stream. Otherwise a retransmission at a lower rate would never work.

johannes