From: Zhu Yi <yi.zhu@intel.com>
To: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH 1/6] mac80211: Add IEEE80211_ prefix to SET_TSINFO_{} macros
Date: Mon, 11 Jun 2007 16:59:58 +0800 [thread overview]
Message-ID: <20070611085957.GA5549@mail.intel.com> (raw)
Add IEEE80211_ prefix to SET_TSINFO_{} macros
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
include/linux/ieee80211.h | 18 +++++++++---------
net/mac80211/debugfs_netdev.c | 2 +-
net/mac80211/ieee80211_sta.c | 20 ++++++++++----------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 00e9f99..31368bc 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -134,15 +134,15 @@ struct ieee80211_ht_additional_info {
#define IEEE80211_TSINFO_ACK(a) ((a.short1 & 0xC000) >> 14)
#define IEEE80211_TSINFO_SCHEDULE(a) ((a.byte3 & 0x01) >> 0)
-#define SET_TSINFO_TYPE(i, d) (i.short1 |= (d << 0) & 0x0001)
-#define SET_TSINFO_TSID(i, d) (i.short1 |= (d << 1) & 0x001E)
-#define SET_TSINFO_DIR(i, d) (i.short1 |= (d << 5) & 0x0060)
-#define SET_TSINFO_POLICY(i, d) (i.short1 |= (d << 7) & 0x0180)
-#define SET_TSINFO_AGG(i, d) (i.short1 |= (d << 9) & 0x0200)
-#define SET_TSINFO_APSD(i, d) (i.short1 |= (d << 10) & 0x0400)
-#define SET_TSINFO_UP(i, d) (i.short1 |= (d << 11) & 0x3800)
-#define SET_TSINFO_ACK(i, d) (i.short1 |= (d << 14) & 0xC000)
-#define SET_TSINFO_SCHEDULE(i, d) (i.byte3 |= (d << 0) & 0x01)
+#define IEEE80211_SET_TSINFO_TYPE(i, d) (i.short1 |= (d << 0) & 0x0001)
+#define IEEE80211_SET_TSINFO_TSID(i, d) (i.short1 |= (d << 1) & 0x001E)
+#define IEEE80211_SET_TSINFO_DIR(i, d) (i.short1 |= (d << 5) & 0x0060)
+#define IEEE80211_SET_TSINFO_POLICY(i, d) (i.short1 |= (d << 7) & 0x0180)
+#define IEEE80211_SET_TSINFO_AGG(i, d) (i.short1 |= (d << 9) & 0x0200)
+#define IEEE80211_SET_TSINFO_APSD(i, d) (i.short1 |= (d << 10) & 0x0400)
+#define IEEE80211_SET_TSINFO_UP(i, d) (i.short1 |= (d << 11) & 0x3800)
+#define IEEE80211_SET_TSINFO_ACK(i, d) (i.short1 |= (d << 14) & 0xC000)
+#define IEEE80211_SET_TSINFO_SCHEDULE(i, d) (i.byte3 |= (d << 0) & 0x01)
struct ieee80211_ts_info {
__le16 short1;
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index b9409ee..7be0d90 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -257,7 +257,7 @@ static ssize_t tsinfo_ ##_name## _write(struct file *file, \
"[%u, %u]\n",sdata->dev->name,val,min_val,max_val);\
return -EINVAL; \
} \
- SET_TSINFO_ ##_name (_tspec.ts_info, val); \
+ IEEE80211_SET_TSINFO_ ##_name (sdata->u.sta.tspec.ts_info, val);\
return count; \
} \
\
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 9fdd265..fc77345 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -859,11 +859,11 @@ void ieee80211_send_delts(struct net_device *dev,
memset(&mgmt->u.action.u.delts.ts_info, 0,
sizeof(struct ieee80211_ts_info));
- SET_TSINFO_TSID(tp->ts_info, tsid);
- SET_TSINFO_DIR(tp->ts_info, direction);
- SET_TSINFO_POLICY(tp->ts_info, WLAN_TSINFO_EDCA);
- SET_TSINFO_APSD(tp->ts_info, WLAN_TSINFO_PSB_LEGACY);
- SET_TSINFO_UP(tp->ts_info, ifsta->ts_data[tsid][index].up);
+ IEEE80211_SET_TSINFO_TSID(tp->ts_info, tsid);
+ IEEE80211_SET_TSINFO_DIR(tp->ts_info, direction);
+ IEEE80211_SET_TSINFO_POLICY(tp->ts_info, WLAN_TSINFO_EDCA);
+ IEEE80211_SET_TSINFO_APSD(tp->ts_info, WLAN_TSINFO_PSB_LEGACY);
+ IEEE80211_SET_TSINFO_UP(tp->ts_info, ifsta->ts_data[tsid][index].up);
ieee80211_sta_tx(dev, skb, 0);
}
@@ -930,11 +930,11 @@ void wmm_send_delts(struct net_device *dev,
tspec = (struct ieee80211_elem_tspec *)pos;
memset(tspec, 0, sizeof(*tspec));
- SET_TSINFO_TSID(tspec->ts_info, tsid);
- SET_TSINFO_DIR(tspec->ts_info, direction);
- SET_TSINFO_POLICY(tspec->ts_info, WLAN_TSINFO_EDCA);
- SET_TSINFO_APSD(tspec->ts_info, WLAN_TSINFO_PSB_LEGACY);
- SET_TSINFO_UP(tspec->ts_info, ifsta->ts_data[tsid][index].up);
+ IEEE80211_SET_TSINFO_TSID(tspec->ts_info, tsid);
+ IEEE80211_SET_TSINFO_DIR(tspec->ts_info, direction);
+ IEEE80211_SET_TSINFO_POLICY(tspec->ts_info, WLAN_TSINFO_EDCA);
+ IEEE80211_SET_TSINFO_APSD(tspec->ts_info, WLAN_TSINFO_PSB_LEGACY);
+ IEEE80211_SET_TSINFO_UP(tspec->ts_info, ifsta->ts_data[tsid][index].up);
ieee80211_sta_tx(dev, skb, 0);
}
--
1.5.0.rc2.g73a2
next reply other threads:[~2007-06-11 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 8:59 Zhu Yi [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-08 17:03 [PATCH 1/6] mac80211: Add IEEE80211_ prefix to SET_TSINFO_{} macros Zhu Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070611085957.GA5549@mail.intel.com \
--to=yi.zhu@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).