aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-05 05:55:43 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-07 01:32:35 -0400
commitd2d66c56cf6c8727662aa321991f791604c22094 (patch)
tree3e916d6cd0c36cf1761a18ee82f724413229cdf9 /drivers/net/wireless/wl12xx/cmd.c
parent30d0c8fd5b87d1c5486705d6420545a21533e115 (diff)
wl12xx: move basic_rate into wlvif
move basic_rate into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index 6a2f758eb1d3..ce734157980a 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -1031,7 +1031,7 @@ out:
1031 return ret; 1031 return ret;
1032} 1032}
1033 1033
1034int wl1271_cmd_build_null_data(struct wl1271 *wl) 1034int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct wl12xx_vif *wlvif)
1035{ 1035{
1036 struct sk_buff *skb = NULL; 1036 struct sk_buff *skb = NULL;
1037 int size; 1037 int size;
@@ -1043,7 +1043,8 @@ int wl1271_cmd_build_null_data(struct wl1271 *wl)
1043 size = sizeof(struct wl12xx_null_data_template); 1043 size = sizeof(struct wl12xx_null_data_template);
1044 ptr = NULL; 1044 ptr = NULL;
1045 } else { 1045 } else {
1046 skb = ieee80211_nullfunc_get(wl->hw, wl->vif); 1046 skb = ieee80211_nullfunc_get(wl->hw,
1047 wl12xx_wlvif_to_vif(wlvif));
1047 if (!skb) 1048 if (!skb)
1048 goto out; 1049 goto out;
1049 size = skb->len; 1050 size = skb->len;
@@ -1051,7 +1052,7 @@ int wl1271_cmd_build_null_data(struct wl1271 *wl)
1051 } 1052 }
1052 1053
1053 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size, 0, 1054 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size, 0,
1054 wl->basic_rate); 1055 wlvif->basic_rate);
1055 1056
1056out: 1057out:
1057 dev_kfree_skb(skb); 1058 dev_kfree_skb(skb);
@@ -1062,19 +1063,21 @@ out:
1062 1063
1063} 1064}
1064 1065
1065int wl1271_cmd_build_klv_null_data(struct wl1271 *wl) 1066int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
1067 struct wl12xx_vif *wlvif)
1066{ 1068{
1069 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
1067 struct sk_buff *skb = NULL; 1070 struct sk_buff *skb = NULL;
1068 int ret = -ENOMEM; 1071 int ret = -ENOMEM;
1069 1072
1070 skb = ieee80211_nullfunc_get(wl->hw, wl->vif); 1073 skb = ieee80211_nullfunc_get(wl->hw, vif);
1071 if (!skb) 1074 if (!skb)
1072 goto out; 1075 goto out;
1073 1076
1074 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV, 1077 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_KLV,
1075 skb->data, skb->len, 1078 skb->data, skb->len,
1076 CMD_TEMPL_KLV_IDX_NULL_DATA, 1079 CMD_TEMPL_KLV_IDX_NULL_DATA,
1077 wl->basic_rate); 1080 wlvif->basic_rate);
1078 1081
1079out: 1082out:
1080 dev_kfree_skb(skb); 1083 dev_kfree_skb(skb);
@@ -1161,7 +1164,8 @@ out:
1161 return skb; 1164 return skb;
1162} 1165}
1163 1166
1164int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, __be32 ip_addr) 1167int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif,
1168 __be32 ip_addr)
1165{ 1169{
1166 int ret; 1170 int ret;
1167 struct wl12xx_arp_rsp_template tmpl; 1171 struct wl12xx_arp_rsp_template tmpl;
@@ -1197,13 +1201,14 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, __be32 ip_addr)
1197 1201
1198 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_ARP_RSP, 1202 ret = wl1271_cmd_template_set(wl, CMD_TEMPL_ARP_RSP,
1199 &tmpl, sizeof(tmpl), 0, 1203 &tmpl, sizeof(tmpl), 0,
1200 wl->basic_rate); 1204 wlvif->basic_rate);
1201 1205
1202 return ret; 1206 return ret;
1203} 1207}
1204 1208
1205int wl1271_build_qos_null_data(struct wl1271 *wl, struct ieee80211_vif *vif) 1209int wl1271_build_qos_null_data(struct wl1271 *wl, struct ieee80211_vif *vif)
1206{ 1210{
1211 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
1207 struct ieee80211_qos_hdr template; 1212 struct ieee80211_qos_hdr template;
1208 1213
1209 memset(&template, 0, sizeof(template)); 1214 memset(&template, 0, sizeof(template));
@@ -1221,7 +1226,7 @@ int wl1271_build_qos_null_data(struct wl1271 *wl, struct ieee80211_vif *vif)
1221 1226
1222 return wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, &template, 1227 return wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, &template,
1223 sizeof(template), 0, 1228 sizeof(template), 0,
1224 wl->basic_rate); 1229 wlvif->basic_rate);
1225} 1230}
1226 1231
1227int wl12xx_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid) 1232int wl12xx_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid)