aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-28 04:33:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-28 04:35:50 -0400
commitfc8a7321d3d68af759a369a9ad3e2426688742d3 (patch)
treecaac90c4c1010b374a9df08eefd0c3a38329d7fa /net/mac80211
parentdfb89c56add259b72a9c68d6b2846c1cd8c4e4b6 (diff)
mac80211: don't expose ieee80211_add_srates_ie()
This and ieee80211_add_ext_srates_ie() aren't exported, so can't be used by drivers anyway, but there's also no reason that they should be so make them private to mac80211 and use sdata instead of vif arguments. Acked-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c12
-rw-r--r--net/mac80211/ieee80211_i.h4
-rw-r--r--net/mac80211/mesh_plink.c4
-rw-r--r--net/mac80211/tx.c4
-rw-r--r--net/mac80211/util.c10
5 files changed, 18 insertions, 16 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7722a7336a5..ebc353ef690 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2665,8 +2665,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
2665 tf->u.setup_req.capability = 2665 tf->u.setup_req.capability =
2666 cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata)); 2666 cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
2667 2667
2668 ieee80211_add_srates_ie(&sdata->vif, skb, false); 2668 ieee80211_add_srates_ie(sdata, skb, false);
2669 ieee80211_add_ext_srates_ie(&sdata->vif, skb, false); 2669 ieee80211_add_ext_srates_ie(sdata, skb, false);
2670 ieee80211_tdls_add_ext_capab(skb); 2670 ieee80211_tdls_add_ext_capab(skb);
2671 break; 2671 break;
2672 case WLAN_TDLS_SETUP_RESPONSE: 2672 case WLAN_TDLS_SETUP_RESPONSE:
@@ -2679,8 +2679,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
2679 tf->u.setup_resp.capability = 2679 tf->u.setup_resp.capability =
2680 cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata)); 2680 cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
2681 2681
2682 ieee80211_add_srates_ie(&sdata->vif, skb, false); 2682 ieee80211_add_srates_ie(sdata, skb, false);
2683 ieee80211_add_ext_srates_ie(&sdata->vif, skb, false); 2683 ieee80211_add_ext_srates_ie(sdata, skb, false);
2684 ieee80211_tdls_add_ext_capab(skb); 2684 ieee80211_tdls_add_ext_capab(skb);
2685 break; 2685 break;
2686 case WLAN_TDLS_SETUP_CONFIRM: 2686 case WLAN_TDLS_SETUP_CONFIRM:
@@ -2740,8 +2740,8 @@ ieee80211_prep_tdls_direct(struct wiphy *wiphy, struct net_device *dev,
2740 mgmt->u.action.u.tdls_discover_resp.capability = 2740 mgmt->u.action.u.tdls_discover_resp.capability =
2741 cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata)); 2741 cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
2742 2742
2743 ieee80211_add_srates_ie(&sdata->vif, skb, false); 2743 ieee80211_add_srates_ie(sdata, skb, false);
2744 ieee80211_add_ext_srates_ie(&sdata->vif, skb, false); 2744 ieee80211_add_ext_srates_ie(sdata, skb, false);
2745 ieee80211_tdls_add_ext_capab(skb); 2745 ieee80211_tdls_add_ext_capab(skb);
2746 break; 2746 break;
2747 default: 2747 default:
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 341d77d472d..6b7157d2050 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1480,6 +1480,10 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1480 struct ieee80211_channel *channel, 1480 struct ieee80211_channel *channel,
1481 enum nl80211_channel_type channel_type, 1481 enum nl80211_channel_type channel_type,
1482 u16 prot_mode); 1482 u16 prot_mode);
1483int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
1484 struct sk_buff *skb, bool need_basic);
1485int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
1486 struct sk_buff *skb, bool need_basic);
1483 1487
1484/* channel management */ 1488/* channel management */
1485enum ieee80211_chan_mode { 1489enum ieee80211_chan_mode {
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index a1dbd154027..425685914d7 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -258,8 +258,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
258 pos = skb_put(skb, 2); 258 pos = skb_put(skb, 2);
259 memcpy(pos + 2, &plid, 2); 259 memcpy(pos + 2, &plid, 2);
260 } 260 }
261 if (ieee80211_add_srates_ie(&sdata->vif, skb, true) || 261 if (ieee80211_add_srates_ie(sdata, skb, true) ||
262 ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) || 262 ieee80211_add_ext_srates_ie(sdata, skb, true) ||
263 mesh_add_rsn_ie(skb, sdata) || 263 mesh_add_rsn_ie(skb, sdata) ||
264 mesh_add_meshid_ie(skb, sdata) || 264 mesh_add_meshid_ie(skb, sdata) ||
265 mesh_add_meshconf_ie(skb, sdata)) 265 mesh_add_meshconf_ie(skb, sdata))
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ec8f5346737..4e753032e48 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2420,9 +2420,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2420 *pos++ = WLAN_EID_SSID; 2420 *pos++ = WLAN_EID_SSID;
2421 *pos++ = 0x0; 2421 *pos++ = 0x0;
2422 2422
2423 if (ieee80211_add_srates_ie(&sdata->vif, skb, true) || 2423 if (ieee80211_add_srates_ie(sdata, skb, true) ||
2424 mesh_add_ds_params_ie(skb, sdata) || 2424 mesh_add_ds_params_ie(skb, sdata) ||
2425 ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) || 2425 ieee80211_add_ext_srates_ie(sdata, skb, true) ||
2426 mesh_add_rsn_ie(skb, sdata) || 2426 mesh_add_rsn_ie(skb, sdata) ||
2427 mesh_add_ht_cap_ie(skb, sdata) || 2427 mesh_add_ht_cap_ie(skb, sdata) ||
2428 mesh_add_ht_oper_ie(skb, sdata) || 2428 mesh_add_ht_oper_ie(skb, sdata) ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 242ecde381f..c4245695afc 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1764,15 +1764,14 @@ ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper)
1764 return channel_type; 1764 return channel_type;
1765} 1765}
1766 1766
1767int ieee80211_add_srates_ie(struct ieee80211_vif *vif, 1767int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
1768 struct sk_buff *skb, bool need_basic) 1768 struct sk_buff *skb, bool need_basic)
1769{ 1769{
1770 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
1771 struct ieee80211_local *local = sdata->local; 1770 struct ieee80211_local *local = sdata->local;
1772 struct ieee80211_supported_band *sband; 1771 struct ieee80211_supported_band *sband;
1773 int rate; 1772 int rate;
1774 u8 i, rates, *pos; 1773 u8 i, rates, *pos;
1775 u32 basic_rates = vif->bss_conf.basic_rates; 1774 u32 basic_rates = sdata->vif.bss_conf.basic_rates;
1776 1775
1777 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 1776 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
1778 rates = sband->n_bitrates; 1777 rates = sband->n_bitrates;
@@ -1796,15 +1795,14 @@ int ieee80211_add_srates_ie(struct ieee80211_vif *vif,
1796 return 0; 1795 return 0;
1797} 1796}
1798 1797
1799int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif, 1798int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
1800 struct sk_buff *skb, bool need_basic) 1799 struct sk_buff *skb, bool need_basic)
1801{ 1800{
1802 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
1803 struct ieee80211_local *local = sdata->local; 1801 struct ieee80211_local *local = sdata->local;
1804 struct ieee80211_supported_band *sband; 1802 struct ieee80211_supported_band *sband;
1805 int rate; 1803 int rate;
1806 u8 i, exrates, *pos; 1804 u8 i, exrates, *pos;
1807 u32 basic_rates = vif->bss_conf.basic_rates; 1805 u32 basic_rates = sdata->vif.bss_conf.basic_rates;
1808 1806
1809 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 1807 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
1810 exrates = sband->n_bitrates; 1808 exrates = sband->n_bitrates;