Commit e7827a70 authored by Harvey Harrison's avatar Harvey Harrison Committed by John W. Linville

mac80211: remove IEEE80211_FC helper

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6b644e52
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
#define WLAN_FC_DATA_PRESENT(fc) (((fc) & 0x4c) == 0x08) #define WLAN_FC_DATA_PRESENT(fc) (((fc) & 0x4c) == 0x08)
#define IEEE80211_FC(type, subtype) cpu_to_le16(type | subtype)
struct ieee80211_local; struct ieee80211_local;
/* Maximum number of broadcast/multicast frames to buffer when some of the /* Maximum number of broadcast/multicast frames to buffer when some of the
......
...@@ -99,7 +99,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, ...@@ -99,7 +99,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
mgmt = (struct ieee80211_mgmt *) mgmt = (struct ieee80211_mgmt *)
skb_put(skb, 25 + sizeof(mgmt->u.action.u.mesh_action)); skb_put(skb, 25 + sizeof(mgmt->u.action.u.mesh_action));
memset(mgmt, 0, 25 + sizeof(mgmt->u.action.u.mesh_action)); memset(mgmt, 0, 25 + sizeof(mgmt->u.action.u.mesh_action));
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
memcpy(mgmt->da, da, ETH_ALEN); memcpy(mgmt->da, da, ETH_ALEN);
...@@ -178,7 +178,7 @@ int mesh_path_error_tx(u8 *dst, __le32 dst_dsn, u8 *ra, ...@@ -178,7 +178,7 @@ int mesh_path_error_tx(u8 *dst, __le32 dst_dsn, u8 *ra,
mgmt = (struct ieee80211_mgmt *) mgmt = (struct ieee80211_mgmt *)
skb_put(skb, 25 + sizeof(mgmt->u.action.u.mesh_action)); skb_put(skb, 25 + sizeof(mgmt->u.action.u.mesh_action));
memset(mgmt, 0, 25 + sizeof(mgmt->u.action.u.mesh_action)); memset(mgmt, 0, 25 + sizeof(mgmt->u.action.u.mesh_action));
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
memcpy(mgmt->da, ra, ETH_ALEN); memcpy(mgmt->da, ra, ETH_ALEN);
......
...@@ -163,7 +163,7 @@ static int mesh_plink_frame_tx(struct net_device *dev, ...@@ -163,7 +163,7 @@ static int mesh_plink_frame_tx(struct net_device *dev,
mgmt = (struct ieee80211_mgmt *) mgmt = (struct ieee80211_mgmt *)
skb_put(skb, 25 + sizeof(mgmt->u.action.u.plink_action)); skb_put(skb, 25 + sizeof(mgmt->u.action.u.plink_action));
memset(mgmt, 0, 25 + sizeof(mgmt->u.action.u.plink_action)); memset(mgmt, 0, 25 + sizeof(mgmt->u.action.u.plink_action));
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
memcpy(mgmt->da, da, ETH_ALEN); memcpy(mgmt->da, da, ETH_ALEN);
memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN);
......
...@@ -641,7 +641,7 @@ static void ieee80211_send_auth(struct net_device *dev, ...@@ -641,7 +641,7 @@ static void ieee80211_send_auth(struct net_device *dev,
mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6); mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6);
memset(mgmt, 0, 24 + 6); memset(mgmt, 0, 24 + 6);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_AUTH); IEEE80211_STYPE_AUTH);
if (encrypt) if (encrypt)
mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);
...@@ -771,7 +771,7 @@ static void ieee80211_send_assoc(struct net_device *dev, ...@@ -771,7 +771,7 @@ static void ieee80211_send_assoc(struct net_device *dev,
if (ifsta->flags & IEEE80211_STA_PREV_BSSID_SET) { if (ifsta->flags & IEEE80211_STA_PREV_BSSID_SET) {
skb_put(skb, 10); skb_put(skb, 10);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_REASSOC_REQ); IEEE80211_STYPE_REASSOC_REQ);
mgmt->u.reassoc_req.capab_info = cpu_to_le16(capab); mgmt->u.reassoc_req.capab_info = cpu_to_le16(capab);
mgmt->u.reassoc_req.listen_interval = mgmt->u.reassoc_req.listen_interval =
...@@ -780,7 +780,7 @@ static void ieee80211_send_assoc(struct net_device *dev, ...@@ -780,7 +780,7 @@ static void ieee80211_send_assoc(struct net_device *dev,
ETH_ALEN); ETH_ALEN);
} else { } else {
skb_put(skb, 4); skb_put(skb, 4);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ASSOC_REQ); IEEE80211_STYPE_ASSOC_REQ);
mgmt->u.assoc_req.capab_info = cpu_to_le16(capab); mgmt->u.assoc_req.capab_info = cpu_to_le16(capab);
mgmt->u.reassoc_req.listen_interval = mgmt->u.reassoc_req.listen_interval =
...@@ -931,7 +931,7 @@ static void ieee80211_send_deauth(struct net_device *dev, ...@@ -931,7 +931,7 @@ static void ieee80211_send_deauth(struct net_device *dev,
memcpy(mgmt->da, ifsta->bssid, ETH_ALEN); memcpy(mgmt->da, ifsta->bssid, ETH_ALEN);
memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN);
memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_DEAUTH); IEEE80211_STYPE_DEAUTH);
skb_put(skb, 2); skb_put(skb, 2);
mgmt->u.deauth.reason_code = cpu_to_le16(reason); mgmt->u.deauth.reason_code = cpu_to_le16(reason);
...@@ -960,7 +960,7 @@ static void ieee80211_send_disassoc(struct net_device *dev, ...@@ -960,7 +960,7 @@ static void ieee80211_send_disassoc(struct net_device *dev,
memcpy(mgmt->da, ifsta->bssid, ETH_ALEN); memcpy(mgmt->da, ifsta->bssid, ETH_ALEN);
memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN);
memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_DISASSOC); IEEE80211_STYPE_DISASSOC);
skb_put(skb, 2); skb_put(skb, 2);
mgmt->u.disassoc.reason_code = cpu_to_le16(reason); mgmt->u.disassoc.reason_code = cpu_to_le16(reason);
...@@ -1115,7 +1115,7 @@ static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst, ...@@ -1115,7 +1115,7 @@ static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst,
mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
memset(mgmt, 0, 24); memset(mgmt, 0, 24);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_PROBE_REQ); IEEE80211_STYPE_PROBE_REQ);
memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN);
if (dst) { if (dst) {
...@@ -1219,7 +1219,7 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid, ...@@ -1219,7 +1219,7 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid,
memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN); memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN);
else else
memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_resp)); skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_resp));
...@@ -1268,7 +1268,7 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da, ...@@ -1268,7 +1268,7 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da,
else else
memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_req)); skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_req));
...@@ -1524,7 +1524,7 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, ...@@ -1524,7 +1524,7 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN); memcpy(mgmt->bssid, dev->dev_addr, ETH_ALEN);
else else
memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN); memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba)); skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba));
...@@ -1556,7 +1556,7 @@ void ieee80211_send_bar(struct net_device *dev, u8 *ra, u16 tid, u16 ssn) ...@@ -1556,7 +1556,7 @@ void ieee80211_send_bar(struct net_device *dev, u8 *ra, u16 tid, u16 ssn)
skb_reserve(skb, local->hw.extra_tx_headroom); skb_reserve(skb, local->hw.extra_tx_headroom);
bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar)); bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar));
memset(bar, 0, sizeof(*bar)); memset(bar, 0, sizeof(*bar));
bar->frame_control = IEEE80211_FC(IEEE80211_FTYPE_CTL, bar->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL |
IEEE80211_STYPE_BACK_REQ); IEEE80211_STYPE_BACK_REQ);
memcpy(bar->ra, ra, ETH_ALEN); memcpy(bar->ra, ra, ETH_ALEN);
memcpy(bar->ta, dev->dev_addr, ETH_ALEN); memcpy(bar->ta, dev->dev_addr, ETH_ALEN);
...@@ -1801,7 +1801,7 @@ static void ieee80211_send_refuse_measurement_request(struct net_device *dev, ...@@ -1801,7 +1801,7 @@ static void ieee80211_send_refuse_measurement_request(struct net_device *dev,
memcpy(msr_report->da, da, ETH_ALEN); memcpy(msr_report->da, da, ETH_ALEN);
memcpy(msr_report->sa, dev->dev_addr, ETH_ALEN); memcpy(msr_report->sa, dev->dev_addr, ETH_ALEN);
memcpy(msr_report->bssid, bssid, ETH_ALEN); memcpy(msr_report->bssid, bssid, ETH_ALEN);
msr_report->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, msr_report->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
skb_put(skb, 1 + sizeof(msr_report->u.action.u.measurement)); skb_put(skb, 1 + sizeof(msr_report->u.action.u.measurement));
...@@ -2446,7 +2446,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, ...@@ -2446,7 +2446,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
mgmt = (struct ieee80211_mgmt *) mgmt = (struct ieee80211_mgmt *)
skb_put(skb, 24 + sizeof(mgmt->u.beacon)); skb_put(skb, 24 + sizeof(mgmt->u.beacon));
memset(mgmt, 0, 24 + sizeof(mgmt->u.beacon)); memset(mgmt, 0, 24 + sizeof(mgmt->u.beacon));
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_PROBE_RESP); IEEE80211_STYPE_PROBE_RESP);
memset(mgmt->da, 0xff, ETH_ALEN); memset(mgmt->da, 0xff, ETH_ALEN);
memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN); memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN);
......
...@@ -1889,7 +1889,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, ...@@ -1889,7 +1889,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
goto out; goto out;
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) skb->data;
hdr->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT, hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_BEACON); IEEE80211_STYPE_BEACON);
num_beacons = &ifsta->num_beacons; num_beacons = &ifsta->num_beacons;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment