mac80211: remove encrypt parameter from ieee80211_tx_skb

Since the flags moved into skb->cb, there's no
longer a need to have the encrypt bool passed
into the function, anyone who requires it set
to 0 (false) can just set the flag directly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg 2009-11-18 18:42:05 +01:00 committed by John W. Linville
parent 875405a779
commit 62ae67be31
12 changed files with 27 additions and 24 deletions

View File

@ -171,7 +171,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout); mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout);
mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); mgmt->u.action.u.addba_resp.status = cpu_to_le16(status);
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
} }
void ieee80211_process_addba_request(struct ieee80211_local *local, void ieee80211_process_addba_request(struct ieee80211_local *local,

View File

@ -91,7 +91,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.addba_req.start_seq_num = mgmt->u.action.u.addba_req.start_seq_num =
cpu_to_le16(start_seq_num << 4); cpu_to_le16(start_seq_num << 4);
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
} }
void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn) void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
@ -120,7 +120,8 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1
bar->control = cpu_to_le16(bar_control); bar->control = cpu_to_le16(bar_control);
bar->start_seq_num = cpu_to_le16(ssn); bar->start_seq_num = cpu_to_le16(ssn);
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,

View File

@ -134,7 +134,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.delba.params = cpu_to_le16(params); mgmt->u.action.u.delba.params = cpu_to_le16(params);
mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code); mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
} }
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,

View File

@ -659,7 +659,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n", printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n",
sdata->dev->name, resp->da); sdata->dev->name, resp->da);
#endif /* CONFIG_MAC80211_IBSS_DEBUG */ #endif /* CONFIG_MAC80211_IBSS_DEBUG */
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,

View File

@ -1015,8 +1015,7 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
struct ieee80211_hdr *hdr, const u8 *tsc, struct ieee80211_hdr *hdr, const u8 *tsc,
gfp_t gfp); gfp_t gfp);
void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata); void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
int encrypt);
void ieee802_11_parse_elems(u8 *start, size_t len, void ieee802_11_parse_elems(u8 *start, size_t len,
struct ieee802_11_elems *elems); struct ieee802_11_elems *elems);
u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,

View File

@ -187,7 +187,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
memcpy(pos, &target_sn, 4); memcpy(pos, &target_sn, 4);
} }
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
return 0; return 0;
} }
@ -250,7 +250,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
pos += 4; pos += 4;
memcpy(pos, &target_rcode, 2); memcpy(pos, &target_rcode, 2);
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
return 0; return 0;
} }

View File

@ -222,7 +222,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
memcpy(pos, &reason, 2); memcpy(pos, &reason, 2);
} }
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
return 0; return 0;
} }

View File

@ -426,7 +426,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs)); memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
} }
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
@ -467,7 +468,9 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
__cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
else else
cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED))
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
void ieee80211_send_pspoll(struct ieee80211_local *local, void ieee80211_send_pspoll(struct ieee80211_local *local,
@ -498,7 +501,8 @@ void ieee80211_send_pspoll(struct ieee80211_local *local,
memcpy(pspoll->bssid, ifmgd->bssid, ETH_ALEN); memcpy(pspoll->bssid, ifmgd->bssid, ETH_ALEN);
memcpy(pspoll->ta, sdata->dev->dev_addr, ETH_ALEN); memcpy(pspoll->ta, sdata->dev->dev_addr, ETH_ALEN);
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
void ieee80211_send_nullfunc(struct ieee80211_local *local, void ieee80211_send_nullfunc(struct ieee80211_local *local,
@ -531,7 +535,8 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
memcpy(nullfunc->addr2, sdata->dev->dev_addr, ETH_ALEN); memcpy(nullfunc->addr2, sdata->dev->dev_addr, ETH_ALEN);
memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN); memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN);
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
/* spectrum management related things */ /* spectrum management related things */

View File

@ -1666,7 +1666,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.sa_query.trans_id, mgmt->u.action.u.sa_query.trans_id,
WLAN_SA_QUERY_TR_ID_LEN); WLAN_SA_QUERY_TR_ID_LEN);
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
} }
static ieee80211_rx_result debug_noinline static ieee80211_rx_result debug_noinline

View File

@ -65,7 +65,7 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da
IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED; IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED;
msr_report->u.action.u.measurement.msr_elem.type = request_ie->type; msr_report->u.action.u.measurement.msr_elem.type = request_ie->type;
ieee80211_tx_skb(sdata, skb, 1); ieee80211_tx_skb(sdata, skb);
} }
void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,

View File

@ -2281,17 +2281,12 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
} }
EXPORT_SYMBOL(ieee80211_get_buffered_bc); EXPORT_SYMBOL(ieee80211_get_buffered_bc);
void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
int encrypt)
{ {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
skb_set_mac_header(skb, 0); skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0); skb_set_network_header(skb, 0);
skb_set_transport_header(skb, 0); skb_set_transport_header(skb, 0);
if (!encrypt)
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
/* /*
* The other path calling ieee80211_xmit is from the tasklet, * The other path calling ieee80211_xmit is from the tasklet,
* and while we can handle concurrent transmissions locking * and while we can handle concurrent transmissions locking

View File

@ -872,7 +872,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
WARN_ON(err); WARN_ON(err);
} }
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
@ -974,7 +975,8 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
skb_put(skb, ieee80211_build_preq_ies(local, pos, ie, ie_len, skb_put(skb, ieee80211_build_preq_ies(local, pos, ie, ie_len,
local->hw.conf.channel->band)); local->hw.conf.channel->band));
ieee80211_tx_skb(sdata, skb, 0); IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
ieee80211_tx_skb(sdata, skb);
} }
u32 ieee80211_sta_get_rates(struct ieee80211_local *local, u32 ieee80211_sta_get_rates(struct ieee80211_local *local,