Commit fc8a7321 authored by Johannes Berg's avatar Johannes Berg

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: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent dfb89c56
...@@ -3826,12 +3826,6 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif, ...@@ -3826,12 +3826,6 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
int ieee80211_add_srates_ie(struct ieee80211_vif *vif,
struct sk_buff *skb, bool need_basic);
int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
struct sk_buff *skb, bool need_basic);
/** /**
* ieee80211_ave_rssi - report the average rssi for the specified interface * ieee80211_ave_rssi - report the average rssi for the specified interface
* *
......
...@@ -2665,8 +2665,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev, ...@@ -2665,8 +2665,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
tf->u.setup_req.capability = tf->u.setup_req.capability =
cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata)); cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
ieee80211_add_srates_ie(&sdata->vif, skb, false); ieee80211_add_srates_ie(sdata, skb, false);
ieee80211_add_ext_srates_ie(&sdata->vif, skb, false); ieee80211_add_ext_srates_ie(sdata, skb, false);
ieee80211_tdls_add_ext_capab(skb); ieee80211_tdls_add_ext_capab(skb);
break; break;
case WLAN_TDLS_SETUP_RESPONSE: case WLAN_TDLS_SETUP_RESPONSE:
...@@ -2679,8 +2679,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev, ...@@ -2679,8 +2679,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
tf->u.setup_resp.capability = tf->u.setup_resp.capability =
cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata)); cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
ieee80211_add_srates_ie(&sdata->vif, skb, false); ieee80211_add_srates_ie(sdata, skb, false);
ieee80211_add_ext_srates_ie(&sdata->vif, skb, false); ieee80211_add_ext_srates_ie(sdata, skb, false);
ieee80211_tdls_add_ext_capab(skb); ieee80211_tdls_add_ext_capab(skb);
break; break;
case WLAN_TDLS_SETUP_CONFIRM: case WLAN_TDLS_SETUP_CONFIRM:
...@@ -2740,8 +2740,8 @@ ieee80211_prep_tdls_direct(struct wiphy *wiphy, struct net_device *dev, ...@@ -2740,8 +2740,8 @@ ieee80211_prep_tdls_direct(struct wiphy *wiphy, struct net_device *dev,
mgmt->u.action.u.tdls_discover_resp.capability = mgmt->u.action.u.tdls_discover_resp.capability =
cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata)); cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
ieee80211_add_srates_ie(&sdata->vif, skb, false); ieee80211_add_srates_ie(sdata, skb, false);
ieee80211_add_ext_srates_ie(&sdata->vif, skb, false); ieee80211_add_ext_srates_ie(sdata, skb, false);
ieee80211_tdls_add_ext_capab(skb); ieee80211_tdls_add_ext_capab(skb);
break; break;
default: default:
......
...@@ -1480,6 +1480,10 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, ...@@ -1480,6 +1480,10 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
struct ieee80211_channel *channel, struct ieee80211_channel *channel,
enum nl80211_channel_type channel_type, enum nl80211_channel_type channel_type,
u16 prot_mode); u16 prot_mode);
int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, bool need_basic);
int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, bool need_basic);
/* channel management */ /* channel management */
enum ieee80211_chan_mode { enum ieee80211_chan_mode {
......
...@@ -258,8 +258,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, ...@@ -258,8 +258,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
pos = skb_put(skb, 2); pos = skb_put(skb, 2);
memcpy(pos + 2, &plid, 2); memcpy(pos + 2, &plid, 2);
} }
if (ieee80211_add_srates_ie(&sdata->vif, skb, true) || if (ieee80211_add_srates_ie(sdata, skb, true) ||
ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) || ieee80211_add_ext_srates_ie(sdata, skb, true) ||
mesh_add_rsn_ie(skb, sdata) || mesh_add_rsn_ie(skb, sdata) ||
mesh_add_meshid_ie(skb, sdata) || mesh_add_meshid_ie(skb, sdata) ||
mesh_add_meshconf_ie(skb, sdata)) mesh_add_meshconf_ie(skb, sdata))
......
...@@ -2420,9 +2420,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, ...@@ -2420,9 +2420,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
*pos++ = WLAN_EID_SSID; *pos++ = WLAN_EID_SSID;
*pos++ = 0x0; *pos++ = 0x0;
if (ieee80211_add_srates_ie(&sdata->vif, skb, true) || if (ieee80211_add_srates_ie(sdata, skb, true) ||
mesh_add_ds_params_ie(skb, sdata) || mesh_add_ds_params_ie(skb, sdata) ||
ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) || ieee80211_add_ext_srates_ie(sdata, skb, true) ||
mesh_add_rsn_ie(skb, sdata) || mesh_add_rsn_ie(skb, sdata) ||
mesh_add_ht_cap_ie(skb, sdata) || mesh_add_ht_cap_ie(skb, sdata) ||
mesh_add_ht_oper_ie(skb, sdata) || mesh_add_ht_oper_ie(skb, sdata) ||
......
...@@ -1764,15 +1764,14 @@ ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper) ...@@ -1764,15 +1764,14 @@ ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper)
return channel_type; return channel_type;
} }
int ieee80211_add_srates_ie(struct ieee80211_vif *vif, int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, bool need_basic) struct sk_buff *skb, bool need_basic)
{ {
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
int rate; int rate;
u8 i, rates, *pos; u8 i, rates, *pos;
u32 basic_rates = vif->bss_conf.basic_rates; u32 basic_rates = sdata->vif.bss_conf.basic_rates;
sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
rates = sband->n_bitrates; rates = sband->n_bitrates;
...@@ -1796,15 +1795,14 @@ int ieee80211_add_srates_ie(struct ieee80211_vif *vif, ...@@ -1796,15 +1795,14 @@ int ieee80211_add_srates_ie(struct ieee80211_vif *vif,
return 0; return 0;
} }
int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif, int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, bool need_basic) struct sk_buff *skb, bool need_basic)
{ {
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
int rate; int rate;
u8 i, exrates, *pos; u8 i, exrates, *pos;
u32 basic_rates = vif->bss_conf.basic_rates; u32 basic_rates = sdata->vif.bss_conf.basic_rates;
sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
exrates = sband->n_bitrates; exrates = sband->n_bitrates;
......
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