aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:01:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:23 -0400
commit05c914fe330fa8e1cc67870dc0d3809dfd96c107 (patch)
treedf53bcab47335f3361c09478d6b1447b7d298536 /net/mac80211/tx.c
parent96dd22ac06b0dbfb069fdf530c72046a941e9694 (diff)
mac80211: use nl80211 interface types
There's really no reason for mac80211 to be using its own interface type defines. Use the nl80211 types and simplify the configuration code a bit: there's no need to translate them any more now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index a523189f10c4..f4bcc589d674 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -226,7 +226,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
226 !ieee80211_is_probe_req(hdr->frame_control)) 226 !ieee80211_is_probe_req(hdr->frame_control))
227 return TX_DROP; 227 return TX_DROP;
228 228
229 if (tx->sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) 229 if (tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
230 return TX_CONTINUE; 230 return TX_CONTINUE;
231 231
232 if (tx->flags & IEEE80211_TX_PS_BUFFERED) 232 if (tx->flags & IEEE80211_TX_PS_BUFFERED)
@@ -236,7 +236,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
236 236
237 if (likely(tx->flags & IEEE80211_TX_UNICAST)) { 237 if (likely(tx->flags & IEEE80211_TX_UNICAST)) {
238 if (unlikely(!(sta_flags & WLAN_STA_ASSOC) && 238 if (unlikely(!(sta_flags & WLAN_STA_ASSOC) &&
239 tx->sdata->vif.type != IEEE80211_IF_TYPE_IBSS && 239 tx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
240 ieee80211_is_data(hdr->frame_control))) { 240 ieee80211_is_data(hdr->frame_control))) {
241#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 241#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
242 DECLARE_MAC_BUF(mac); 242 DECLARE_MAC_BUF(mac);
@@ -250,7 +250,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
250 } else { 250 } else {
251 if (unlikely(ieee80211_is_data(hdr->frame_control) && 251 if (unlikely(ieee80211_is_data(hdr->frame_control) &&
252 tx->local->num_sta == 0 && 252 tx->local->num_sta == 0 &&
253 tx->sdata->vif.type != IEEE80211_IF_TYPE_IBSS)) { 253 tx->sdata->vif.type != NL80211_IFTYPE_ADHOC)) {
254 /* 254 /*
255 * No associated STAs - no need to send multicast 255 * No associated STAs - no need to send multicast
256 * frames. 256 * frames.
@@ -281,7 +281,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local)
281 281
282 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 282 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
283 struct ieee80211_if_ap *ap; 283 struct ieee80211_if_ap *ap;
284 if (sdata->vif.type != IEEE80211_IF_TYPE_AP) 284 if (sdata->vif.type != NL80211_IFTYPE_AP)
285 continue; 285 continue;
286 ap = &sdata->u.ap; 286 ap = &sdata->u.ap;
287 skb = skb_dequeue(&ap->ps_bc_buf); 287 skb = skb_dequeue(&ap->ps_bc_buf);
@@ -979,7 +979,7 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
979 979
980 /* process and remove the injection radiotap header */ 980 /* process and remove the injection radiotap header */
981 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 981 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
982 if (unlikely(sdata->vif.type == IEEE80211_IF_TYPE_MNTR)) { 982 if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) {
983 if (__ieee80211_parse_tx_radiotap(tx, skb) == TX_DROP) 983 if (__ieee80211_parse_tx_radiotap(tx, skb) == TX_DROP)
984 return TX_DROP; 984 return TX_DROP;
985 985
@@ -1457,8 +1457,8 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1457 fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA); 1457 fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA);
1458 1458
1459 switch (sdata->vif.type) { 1459 switch (sdata->vif.type) {
1460 case IEEE80211_IF_TYPE_AP: 1460 case NL80211_IFTYPE_AP:
1461 case IEEE80211_IF_TYPE_VLAN: 1461 case NL80211_IFTYPE_AP_VLAN:
1462 fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS); 1462 fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS);
1463 /* DA BSSID SA */ 1463 /* DA BSSID SA */
1464 memcpy(hdr.addr1, skb->data, ETH_ALEN); 1464 memcpy(hdr.addr1, skb->data, ETH_ALEN);
@@ -1466,7 +1466,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1466 memcpy(hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN); 1466 memcpy(hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN);
1467 hdrlen = 24; 1467 hdrlen = 24;
1468 break; 1468 break;
1469 case IEEE80211_IF_TYPE_WDS: 1469 case NL80211_IFTYPE_WDS:
1470 fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); 1470 fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS);
1471 /* RA TA DA SA */ 1471 /* RA TA DA SA */
1472 memcpy(hdr.addr1, sdata->u.wds.remote_addr, ETH_ALEN); 1472 memcpy(hdr.addr1, sdata->u.wds.remote_addr, ETH_ALEN);
@@ -1476,7 +1476,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1476 hdrlen = 30; 1476 hdrlen = 30;
1477 break; 1477 break;
1478#ifdef CONFIG_MAC80211_MESH 1478#ifdef CONFIG_MAC80211_MESH
1479 case IEEE80211_IF_TYPE_MESH_POINT: 1479 case NL80211_IFTYPE_MESH_POINT:
1480 fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); 1480 fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS);
1481 /* RA TA DA SA */ 1481 /* RA TA DA SA */
1482 memset(hdr.addr1, 0, ETH_ALEN); 1482 memset(hdr.addr1, 0, ETH_ALEN);
@@ -1493,7 +1493,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1493 hdrlen = 30; 1493 hdrlen = 30;
1494 break; 1494 break;
1495#endif 1495#endif
1496 case IEEE80211_IF_TYPE_STA: 1496 case NL80211_IFTYPE_STATION:
1497 fc |= cpu_to_le16(IEEE80211_FCTL_TODS); 1497 fc |= cpu_to_le16(IEEE80211_FCTL_TODS);
1498 /* BSSID SA DA */ 1498 /* BSSID SA DA */
1499 memcpy(hdr.addr1, sdata->u.sta.bssid, ETH_ALEN); 1499 memcpy(hdr.addr1, sdata->u.sta.bssid, ETH_ALEN);
@@ -1501,7 +1501,7 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1501 memcpy(hdr.addr3, skb->data, ETH_ALEN); 1501 memcpy(hdr.addr3, skb->data, ETH_ALEN);
1502 hdrlen = 24; 1502 hdrlen = 24;
1503 break; 1503 break;
1504 case IEEE80211_IF_TYPE_IBSS: 1504 case NL80211_IFTYPE_ADHOC:
1505 /* DA SA BSSID */ 1505 /* DA SA BSSID */
1506 memcpy(hdr.addr1, skb->data, ETH_ALEN); 1506 memcpy(hdr.addr1, skb->data, ETH_ALEN);
1507 memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); 1507 memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN);
@@ -1812,7 +1812,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1812 sdata = vif_to_sdata(vif); 1812 sdata = vif_to_sdata(vif);
1813 bdev = sdata->dev; 1813 bdev = sdata->dev;
1814 1814
1815 if (sdata->vif.type == IEEE80211_IF_TYPE_AP) { 1815 if (sdata->vif.type == NL80211_IFTYPE_AP) {
1816 ap = &sdata->u.ap; 1816 ap = &sdata->u.ap;
1817 beacon = rcu_dereference(ap->beacon); 1817 beacon = rcu_dereference(ap->beacon);
1818 if (ap && beacon) { 1818 if (ap && beacon) {
@@ -1854,7 +1854,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1854 num_beacons = &ap->num_beacons; 1854 num_beacons = &ap->num_beacons;
1855 } else 1855 } else
1856 goto out; 1856 goto out;
1857 } else if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { 1857 } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
1858 struct ieee80211_hdr *hdr; 1858 struct ieee80211_hdr *hdr;
1859 ifsta = &sdata->u.sta; 1859 ifsta = &sdata->u.sta;
1860 1860
@@ -1999,7 +1999,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
1999 rcu_read_lock(); 1999 rcu_read_lock();
2000 beacon = rcu_dereference(bss->beacon); 2000 beacon = rcu_dereference(bss->beacon);
2001 2001
2002 if (sdata->vif.type != IEEE80211_IF_TYPE_AP || !beacon || !beacon->head) 2002 if (sdata->vif.type != NL80211_IFTYPE_AP || !beacon || !beacon->head)
2003 goto out; 2003 goto out;
2004 2004
2005 if (bss->dtim_count != 0) 2005 if (bss->dtim_count != 0)