aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-18 12:42:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:27 -0500
commit62ae67be31c2346b6d74653a148ddbd1b9a94424 (patch)
tree91f59c821a4e3f91a529887d97989b1969720f65 /net
parent875405a7793e9c35fab33819e7e5df7a98b6064c (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/agg-rx.c2
-rw-r--r--net/mac80211/agg-tx.c5
-rw-r--r--net/mac80211/ht.c2
-rw-r--r--net/mac80211/ibss.c3
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/mesh_hwmp.c4
-rw-r--r--net/mac80211/mesh_plink.c2
-rw-r--r--net/mac80211/mlme.c13
-rw-r--r--net/mac80211/rx.c2
-rw-r--r--net/mac80211/spectmgmt.c2
-rw-r--r--net/mac80211/tx.c7
-rw-r--r--net/mac80211/util.c6
12 files changed, 27 insertions, 24 deletions
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index f3a5c9e0578d..7ed5fe664732 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -171,7 +171,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
171 mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout); 171 mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout);
172 mgmt->u.action.u.addba_resp.status = cpu_to_le16(status); 172 mgmt->u.action.u.addba_resp.status = cpu_to_le16(status);
173 173
174 ieee80211_tx_skb(sdata, skb, 1); 174 ieee80211_tx_skb(sdata, skb);
175} 175}
176 176
177void ieee80211_process_addba_request(struct ieee80211_local *local, 177void ieee80211_process_addba_request(struct ieee80211_local *local,
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 26d42e88808c..b50b2bc3b8c5 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -91,7 +91,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
91 mgmt->u.action.u.addba_req.start_seq_num = 91 mgmt->u.action.u.addba_req.start_seq_num =
92 cpu_to_le16(start_seq_num << 4); 92 cpu_to_le16(start_seq_num << 4);
93 93
94 ieee80211_tx_skb(sdata, skb, 1); 94 ieee80211_tx_skb(sdata, skb);
95} 95}
96 96
97void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn) 97void 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
120 bar->control = cpu_to_le16(bar_control); 120 bar->control = cpu_to_le16(bar_control);
121 bar->start_seq_num = cpu_to_le16(ssn); 121 bar->start_seq_num = cpu_to_le16(ssn);
122 122
123 ieee80211_tx_skb(sdata, skb, 0); 123 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
124 ieee80211_tx_skb(sdata, skb);
124} 125}
125 126
126static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, 127static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 345c8ee50175..15c9d4f94cee 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -134,7 +134,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
134 mgmt->u.action.u.delba.params = cpu_to_le16(params); 134 mgmt->u.action.u.delba.params = cpu_to_le16(params);
135 mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code); 135 mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);
136 136
137 ieee80211_tx_skb(sdata, skb, 1); 137 ieee80211_tx_skb(sdata, skb);
138} 138}
139 139
140void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, 140void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index fbffce90edbc..10d13856f86c 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -659,7 +659,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
659 printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n", 659 printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n",
660 sdata->dev->name, resp->da); 660 sdata->dev->name, resp->da);
661#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 661#endif /* CONFIG_MAC80211_IBSS_DEBUG */
662 ieee80211_tx_skb(sdata, skb, 0); 662 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
663 ieee80211_tx_skb(sdata, skb);
663} 664}
664 665
665static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata, 666static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index a1bd4b2bc9e3..598db7cbeb44 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1015,8 +1015,7 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
1015 struct ieee80211_hdr *hdr, const u8 *tsc, 1015 struct ieee80211_hdr *hdr, const u8 *tsc,
1016 gfp_t gfp); 1016 gfp_t gfp);
1017void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata); 1017void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
1018void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, 1018void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
1019 int encrypt);
1020void ieee802_11_parse_elems(u8 *start, size_t len, 1019void ieee802_11_parse_elems(u8 *start, size_t len,
1021 struct ieee802_11_elems *elems); 1020 struct ieee802_11_elems *elems);
1022u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, 1021u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index d93019874e41..9aecf0207afc 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -187,7 +187,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
187 memcpy(pos, &target_sn, 4); 187 memcpy(pos, &target_sn, 4);
188 } 188 }
189 189
190 ieee80211_tx_skb(sdata, skb, 1); 190 ieee80211_tx_skb(sdata, skb);
191 return 0; 191 return 0;
192} 192}
193 193
@@ -250,7 +250,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
250 pos += 4; 250 pos += 4;
251 memcpy(pos, &target_rcode, 2); 251 memcpy(pos, &target_rcode, 2);
252 252
253 ieee80211_tx_skb(sdata, skb, 1); 253 ieee80211_tx_skb(sdata, skb);
254 return 0; 254 return 0;
255} 255}
256 256
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index f21329afdae3..0f7c6e6a4248 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -222,7 +222,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
222 memcpy(pos, &reason, 2); 222 memcpy(pos, &reason, 2);
223 } 223 }
224 224
225 ieee80211_tx_skb(sdata, skb, 1); 225 ieee80211_tx_skb(sdata, skb);
226 return 0; 226 return 0;
227} 227}
228 228
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2af306f67d78..f399547306c3 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -426,7 +426,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
426 memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs)); 426 memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
427 } 427 }
428 428
429 ieee80211_tx_skb(sdata, skb, 0); 429 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
430 ieee80211_tx_skb(sdata, skb);
430} 431}
431 432
432 433
@@ -467,7 +468,9 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
467 __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); 468 __cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
468 else 469 else
469 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len); 470 cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
470 ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); 471 if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED))
472 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
473 ieee80211_tx_skb(sdata, skb);
471} 474}
472 475
473void ieee80211_send_pspoll(struct ieee80211_local *local, 476void ieee80211_send_pspoll(struct ieee80211_local *local,
@@ -498,7 +501,8 @@ void ieee80211_send_pspoll(struct ieee80211_local *local,
498 memcpy(pspoll->bssid, ifmgd->bssid, ETH_ALEN); 501 memcpy(pspoll->bssid, ifmgd->bssid, ETH_ALEN);
499 memcpy(pspoll->ta, sdata->dev->dev_addr, ETH_ALEN); 502 memcpy(pspoll->ta, sdata->dev->dev_addr, ETH_ALEN);
500 503
501 ieee80211_tx_skb(sdata, skb, 0); 504 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
505 ieee80211_tx_skb(sdata, skb);
502} 506}
503 507
504void ieee80211_send_nullfunc(struct ieee80211_local *local, 508void ieee80211_send_nullfunc(struct ieee80211_local *local,
@@ -531,7 +535,8 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
531 memcpy(nullfunc->addr2, sdata->dev->dev_addr, ETH_ALEN); 535 memcpy(nullfunc->addr2, sdata->dev->dev_addr, ETH_ALEN);
532 memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN); 536 memcpy(nullfunc->addr3, sdata->u.mgd.bssid, ETH_ALEN);
533 537
534 ieee80211_tx_skb(sdata, skb, 0); 538 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
539 ieee80211_tx_skb(sdata, skb);
535} 540}
536 541
537/* spectrum management related things */ 542/* spectrum management related things */
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index e0cb3357f79c..775365f856c9 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1666,7 +1666,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
1666 mgmt->u.action.u.sa_query.trans_id, 1666 mgmt->u.action.u.sa_query.trans_id,
1667 WLAN_SA_QUERY_TR_ID_LEN); 1667 WLAN_SA_QUERY_TR_ID_LEN);
1668 1668
1669 ieee80211_tx_skb(sdata, skb, 1); 1669 ieee80211_tx_skb(sdata, skb);
1670} 1670}
1671 1671
1672static ieee80211_rx_result debug_noinline 1672static ieee80211_rx_result debug_noinline
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 68953033403d..aa743a895cf9 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -65,7 +65,7 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da
65 IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED; 65 IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED;
66 msr_report->u.action.u.measurement.msr_elem.type = request_ie->type; 66 msr_report->u.action.u.measurement.msr_elem.type = request_ie->type;
67 67
68 ieee80211_tx_skb(sdata, skb, 1); 68 ieee80211_tx_skb(sdata, skb);
69} 69}
70 70
71void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, 71void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index bd916437e2fb..b3c1faeb5927 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2281,17 +2281,12 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
2281} 2281}
2282EXPORT_SYMBOL(ieee80211_get_buffered_bc); 2282EXPORT_SYMBOL(ieee80211_get_buffered_bc);
2283 2283
2284void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, 2284void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
2285 int encrypt)
2286{ 2285{
2287 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
2288 skb_set_mac_header(skb, 0); 2286 skb_set_mac_header(skb, 0);
2289 skb_set_network_header(skb, 0); 2287 skb_set_network_header(skb, 0);
2290 skb_set_transport_header(skb, 0); 2288 skb_set_transport_header(skb, 0);
2291 2289
2292 if (!encrypt)
2293 info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
2294
2295 /* 2290 /*
2296 * The other path calling ieee80211_xmit is from the tasklet, 2291 * The other path calling ieee80211_xmit is from the tasklet,
2297 * and while we can handle concurrent transmissions locking 2292 * and while we can handle concurrent transmissions locking
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index da86e1592f8c..5ae1bf389849 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -872,7 +872,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
872 WARN_ON(err); 872 WARN_ON(err);
873 } 873 }
874 874
875 ieee80211_tx_skb(sdata, skb, 0); 875 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
876 ieee80211_tx_skb(sdata, skb);
876} 877}
877 878
878int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, 879int 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,
974 skb_put(skb, ieee80211_build_preq_ies(local, pos, ie, ie_len, 975 skb_put(skb, ieee80211_build_preq_ies(local, pos, ie, ie_len,
975 local->hw.conf.channel->band)); 976 local->hw.conf.channel->band));
976 977
977 ieee80211_tx_skb(sdata, skb, 0); 978 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
979 ieee80211_tx_skb(sdata, skb);
978} 980}
979 981
980u32 ieee80211_sta_get_rates(struct ieee80211_local *local, 982u32 ieee80211_sta_get_rates(struct ieee80211_local *local,