aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ipw2200.c13
-rw-r--r--drivers/net/wireless/ipw2200.h86
-rw-r--r--net/ieee80211/ieee80211_rx.c6
3 files changed, 48 insertions, 57 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index be31304dfad5..97a6ff50eb80 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -6904,7 +6904,7 @@ static int ipw_qos_activate(struct ipw_priv *priv,
6904 burst_duration = ipw_qos_get_burst_duration(priv); 6904 burst_duration = ipw_qos_get_burst_duration(priv);
6905 for (i = 0; i < QOS_QUEUE_NUM; i++) 6905 for (i = 0; i < QOS_QUEUE_NUM; i++)
6906 qos_parameters[QOS_PARAM_SET_ACTIVE].tx_op_limit[i] = 6906 qos_parameters[QOS_PARAM_SET_ACTIVE].tx_op_limit[i] =
6907 (u16)burst_duration; 6907 cpu_to_le16(burst_duration);
6908 } else if (priv->ieee->iw_mode == IW_MODE_ADHOC) { 6908 } else if (priv->ieee->iw_mode == IW_MODE_ADHOC) {
6909 if (type == IEEE_B) { 6909 if (type == IEEE_B) {
6910 IPW_DEBUG_QOS("QoS activate IBSS nework mode %d\n", 6910 IPW_DEBUG_QOS("QoS activate IBSS nework mode %d\n",
@@ -6936,20 +6936,11 @@ static int ipw_qos_activate(struct ipw_priv *priv,
6936 burst_duration = ipw_qos_get_burst_duration(priv); 6936 burst_duration = ipw_qos_get_burst_duration(priv);
6937 for (i = 0; i < QOS_QUEUE_NUM; i++) 6937 for (i = 0; i < QOS_QUEUE_NUM; i++)
6938 qos_parameters[QOS_PARAM_SET_ACTIVE]. 6938 qos_parameters[QOS_PARAM_SET_ACTIVE].
6939 tx_op_limit[i] = (u16)burst_duration; 6939 tx_op_limit[i] = cpu_to_le16(burst_duration);
6940 } 6940 }
6941 } 6941 }
6942 6942
6943 IPW_DEBUG_QOS("QoS sending IPW_CMD_QOS_PARAMETERS\n"); 6943 IPW_DEBUG_QOS("QoS sending IPW_CMD_QOS_PARAMETERS\n");
6944 for (i = 0; i < 3; i++) {
6945 int j;
6946 for (j = 0; j < QOS_QUEUE_NUM; j++) {
6947 qos_parameters[i].cw_min[j] = cpu_to_le16(qos_parameters[i].cw_min[j]);
6948 qos_parameters[i].cw_max[j] = cpu_to_le16(qos_parameters[i].cw_max[j]);
6949 qos_parameters[i].tx_op_limit[j] = cpu_to_le16(qos_parameters[i].tx_op_limit[j]);
6950 }
6951 }
6952
6953 err = ipw_send_qos_params_command(priv, 6944 err = ipw_send_qos_params_command(priv,
6954 (struct ieee80211_qos_parameters *) 6945 (struct ieee80211_qos_parameters *)
6955 &(qos_parameters[0])); 6946 &(qos_parameters[0]));
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index bec8e37a1738..b8e815a42be8 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -267,25 +267,25 @@ enum connection_manager_assoc_states {
267#define CW_MIN_CCK 31 267#define CW_MIN_CCK 31
268#define CW_MAX_CCK 1023 268#define CW_MAX_CCK 1023
269 269
270#define QOS_TX0_CW_MIN_OFDM CW_MIN_OFDM 270#define QOS_TX0_CW_MIN_OFDM cpu_to_le16(CW_MIN_OFDM)
271#define QOS_TX1_CW_MIN_OFDM CW_MIN_OFDM 271#define QOS_TX1_CW_MIN_OFDM cpu_to_le16(CW_MIN_OFDM)
272#define QOS_TX2_CW_MIN_OFDM ( (CW_MIN_OFDM + 1) / 2 - 1 ) 272#define QOS_TX2_CW_MIN_OFDM cpu_to_le16((CW_MIN_OFDM + 1)/2 - 1)
273#define QOS_TX3_CW_MIN_OFDM ( (CW_MIN_OFDM + 1) / 4 - 1 ) 273#define QOS_TX3_CW_MIN_OFDM cpu_to_le16((CW_MIN_OFDM + 1)/4 - 1)
274 274
275#define QOS_TX0_CW_MIN_CCK CW_MIN_CCK 275#define QOS_TX0_CW_MIN_CCK cpu_to_le16(CW_MIN_CCK)
276#define QOS_TX1_CW_MIN_CCK CW_MIN_CCK 276#define QOS_TX1_CW_MIN_CCK cpu_to_le16(CW_MIN_CCK)
277#define QOS_TX2_CW_MIN_CCK ( (CW_MIN_CCK + 1) / 2 - 1 ) 277#define QOS_TX2_CW_MIN_CCK cpu_to_le16((CW_MIN_CCK + 1)/2 - 1)
278#define QOS_TX3_CW_MIN_CCK ( (CW_MIN_CCK + 1) / 4 - 1 ) 278#define QOS_TX3_CW_MIN_CCK cpu_to_le16((CW_MIN_CCK + 1)/4 - 1)
279 279
280#define QOS_TX0_CW_MAX_OFDM CW_MAX_OFDM 280#define QOS_TX0_CW_MAX_OFDM cpu_to_le16(CW_MAX_OFDM)
281#define QOS_TX1_CW_MAX_OFDM CW_MAX_OFDM 281#define QOS_TX1_CW_MAX_OFDM cpu_to_le16(CW_MAX_OFDM)
282#define QOS_TX2_CW_MAX_OFDM CW_MIN_OFDM 282#define QOS_TX2_CW_MAX_OFDM cpu_to_le16(CW_MIN_OFDM)
283#define QOS_TX3_CW_MAX_OFDM ( (CW_MIN_OFDM + 1) / 2 - 1 ) 283#define QOS_TX3_CW_MAX_OFDM cpu_to_le16((CW_MIN_OFDM + 1)/2 - 1)
284 284
285#define QOS_TX0_CW_MAX_CCK CW_MAX_CCK 285#define QOS_TX0_CW_MAX_CCK cpu_to_le16(CW_MAX_CCK)
286#define QOS_TX1_CW_MAX_CCK CW_MAX_CCK 286#define QOS_TX1_CW_MAX_CCK cpu_to_le16(CW_MAX_CCK)
287#define QOS_TX2_CW_MAX_CCK CW_MIN_CCK 287#define QOS_TX2_CW_MAX_CCK cpu_to_le16(CW_MIN_CCK)
288#define QOS_TX3_CW_MAX_CCK ( (CW_MIN_CCK + 1) / 2 - 1 ) 288#define QOS_TX3_CW_MAX_CCK cpu_to_le16((CW_MIN_CCK + 1)/2 - 1)
289 289
290#define QOS_TX0_AIFS (3 - QOS_AIFSN_MIN_VALUE) 290#define QOS_TX0_AIFS (3 - QOS_AIFSN_MIN_VALUE)
291#define QOS_TX1_AIFS (7 - QOS_AIFSN_MIN_VALUE) 291#define QOS_TX1_AIFS (7 - QOS_AIFSN_MIN_VALUE)
@@ -299,33 +299,33 @@ enum connection_manager_assoc_states {
299 299
300#define QOS_TX0_TXOP_LIMIT_CCK 0 300#define QOS_TX0_TXOP_LIMIT_CCK 0
301#define QOS_TX1_TXOP_LIMIT_CCK 0 301#define QOS_TX1_TXOP_LIMIT_CCK 0
302#define QOS_TX2_TXOP_LIMIT_CCK 6016 302#define QOS_TX2_TXOP_LIMIT_CCK cpu_to_le16(6016)
303#define QOS_TX3_TXOP_LIMIT_CCK 3264 303#define QOS_TX3_TXOP_LIMIT_CCK cpu_to_le16(3264)
304 304
305#define QOS_TX0_TXOP_LIMIT_OFDM 0 305#define QOS_TX0_TXOP_LIMIT_OFDM 0
306#define QOS_TX1_TXOP_LIMIT_OFDM 0 306#define QOS_TX1_TXOP_LIMIT_OFDM 0
307#define QOS_TX2_TXOP_LIMIT_OFDM 3008 307#define QOS_TX2_TXOP_LIMIT_OFDM cpu_to_le16(3008)
308#define QOS_TX3_TXOP_LIMIT_OFDM 1504 308#define QOS_TX3_TXOP_LIMIT_OFDM cpu_to_le16(1504)
309 309
310#define DEF_TX0_CW_MIN_OFDM CW_MIN_OFDM 310#define DEF_TX0_CW_MIN_OFDM cpu_to_le16(CW_MIN_OFDM)
311#define DEF_TX1_CW_MIN_OFDM CW_MIN_OFDM 311#define DEF_TX1_CW_MIN_OFDM cpu_to_le16(CW_MIN_OFDM)
312#define DEF_TX2_CW_MIN_OFDM CW_MIN_OFDM 312#define DEF_TX2_CW_MIN_OFDM cpu_to_le16(CW_MIN_OFDM)
313#define DEF_TX3_CW_MIN_OFDM CW_MIN_OFDM 313#define DEF_TX3_CW_MIN_OFDM cpu_to_le16(CW_MIN_OFDM)
314 314
315#define DEF_TX0_CW_MIN_CCK CW_MIN_CCK 315#define DEF_TX0_CW_MIN_CCK cpu_to_le16(CW_MIN_CCK)
316#define DEF_TX1_CW_MIN_CCK CW_MIN_CCK 316#define DEF_TX1_CW_MIN_CCK cpu_to_le16(CW_MIN_CCK)
317#define DEF_TX2_CW_MIN_CCK CW_MIN_CCK 317#define DEF_TX2_CW_MIN_CCK cpu_to_le16(CW_MIN_CCK)
318#define DEF_TX3_CW_MIN_CCK CW_MIN_CCK 318#define DEF_TX3_CW_MIN_CCK cpu_to_le16(CW_MIN_CCK)
319 319
320#define DEF_TX0_CW_MAX_OFDM CW_MAX_OFDM 320#define DEF_TX0_CW_MAX_OFDM cpu_to_le16(CW_MAX_OFDM)
321#define DEF_TX1_CW_MAX_OFDM CW_MAX_OFDM 321#define DEF_TX1_CW_MAX_OFDM cpu_to_le16(CW_MAX_OFDM)
322#define DEF_TX2_CW_MAX_OFDM CW_MAX_OFDM 322#define DEF_TX2_CW_MAX_OFDM cpu_to_le16(CW_MAX_OFDM)
323#define DEF_TX3_CW_MAX_OFDM CW_MAX_OFDM 323#define DEF_TX3_CW_MAX_OFDM cpu_to_le16(CW_MAX_OFDM)
324 324
325#define DEF_TX0_CW_MAX_CCK CW_MAX_CCK 325#define DEF_TX0_CW_MAX_CCK cpu_to_le16(CW_MAX_CCK)
326#define DEF_TX1_CW_MAX_CCK CW_MAX_CCK 326#define DEF_TX1_CW_MAX_CCK cpu_to_le16(CW_MAX_CCK)
327#define DEF_TX2_CW_MAX_CCK CW_MAX_CCK 327#define DEF_TX2_CW_MAX_CCK cpu_to_le16(CW_MAX_CCK)
328#define DEF_TX3_CW_MAX_CCK CW_MAX_CCK 328#define DEF_TX3_CW_MAX_CCK cpu_to_le16(CW_MAX_CCK)
329 329
330#define DEF_TX0_AIFS 0 330#define DEF_TX0_AIFS 0
331#define DEF_TX1_AIFS 0 331#define DEF_TX1_AIFS 0
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 13b12a670194..0a18edbdfcb5 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1032,16 +1032,16 @@ static int ieee80211_qos_convert_ac_to_parameters(struct
1032 qos_param->aifs[i] -= (qos_param->aifs[i] < 2) ? 0 : 2; 1032 qos_param->aifs[i] -= (qos_param->aifs[i] < 2) ? 0 : 2;
1033 1033
1034 cw_min = ac_params->ecw_min_max & 0x0F; 1034 cw_min = ac_params->ecw_min_max & 0x0F;
1035 qos_param->cw_min[i] = (u16) ((1 << cw_min) - 1); 1035 qos_param->cw_min[i] = cpu_to_le16((1 << cw_min) - 1);
1036 1036
1037 cw_max = (ac_params->ecw_min_max & 0xF0) >> 4; 1037 cw_max = (ac_params->ecw_min_max & 0xF0) >> 4;
1038 qos_param->cw_max[i] = (u16) ((1 << cw_max) - 1); 1038 qos_param->cw_max[i] = cpu_to_le16((1 << cw_max) - 1);
1039 1039
1040 qos_param->flag[i] = 1040 qos_param->flag[i] =
1041 (ac_params->aci_aifsn & 0x10) ? 0x01 : 0x00; 1041 (ac_params->aci_aifsn & 0x10) ? 0x01 : 0x00;
1042 1042
1043 txop = le16_to_cpu(ac_params->tx_op_limit) * 32; 1043 txop = le16_to_cpu(ac_params->tx_op_limit) * 32;
1044 qos_param->tx_op_limit[i] = (u16) txop; 1044 qos_param->tx_op_limit[i] = cpu_to_le16(txop);
1045 } 1045 }
1046 return rc; 1046 return rc;
1047} 1047}