Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2d09b062
Commit
2d09b062
authored
Aug 26, 2011
by
Stanislaw Gruszka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iwlegacy: s/INDEX/IDX/
Signed-off-by:
Stanislaw Gruszka
<
sgruszka@redhat.com
>
parent
2eb05816
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
190 additions
and
190 deletions
+190
-190
drivers/net/wireless/iwlegacy/iwl-3945-rs.c
drivers/net/wireless/iwlegacy/iwl-3945-rs.c
+18
-18
drivers/net/wireless/iwlegacy/iwl-3945.c
drivers/net/wireless/iwlegacy/iwl-3945.c
+41
-41
drivers/net/wireless/iwlegacy/iwl-4965-calib.c
drivers/net/wireless/iwlegacy/iwl-4965-calib.c
+11
-11
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
+2
-2
drivers/net/wireless/iwlegacy/iwl-4965-rs.c
drivers/net/wireless/iwlegacy/iwl-4965-rs.c
+18
-18
drivers/net/wireless/iwlegacy/iwl-4965-sta.c
drivers/net/wireless/iwlegacy/iwl-4965-sta.c
+2
-2
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
+2
-2
drivers/net/wireless/iwlegacy/iwl-4965.c
drivers/net/wireless/iwlegacy/iwl-4965.c
+4
-4
drivers/net/wireless/iwlegacy/iwl-commands.h
drivers/net/wireless/iwlegacy/iwl-commands.h
+30
-30
drivers/net/wireless/iwlegacy/iwl-fh.h
drivers/net/wireless/iwlegacy/iwl-fh.h
+1
-1
drivers/net/wireless/iwlegacy/iwl-legacy-rs.h
drivers/net/wireless/iwlegacy/iwl-legacy-rs.h
+45
-45
drivers/net/wireless/iwlegacy/iwl-power.h
drivers/net/wireless/iwlegacy/iwl-power.h
+5
-5
drivers/net/wireless/iwlegacy/iwl-rx.c
drivers/net/wireless/iwlegacy/iwl-rx.c
+4
-4
drivers/net/wireless/iwlegacy/iwl-tx.c
drivers/net/wireless/iwlegacy/iwl-tx.c
+2
-2
drivers/net/wireless/iwlegacy/iwl3945-base.c
drivers/net/wireless/iwlegacy/iwl3945-base.c
+5
-5
No files found.
drivers/net/wireless/iwlegacy/iwl-3945-rs.c
View file @
2d09b062
...
...
@@ -64,27 +64,27 @@ struct il3945_tpt_entry {
};
static
struct
il3945_tpt_entry
il3945_tpt_table_a
[]
=
{
{
-
60
,
RATE_54M_I
NDE
X
},
{
-
64
,
RATE_48M_I
NDE
X
},
{
-
72
,
RATE_36M_I
NDE
X
},
{
-
80
,
RATE_24M_I
NDE
X
},
{
-
84
,
RATE_18M_I
NDE
X
},
{
-
85
,
RATE_12M_I
NDE
X
},
{
-
87
,
RATE_9M_I
NDE
X
},
{
-
89
,
RATE_6M_I
NDE
X
}
{
-
60
,
RATE_54M_I
D
X
},
{
-
64
,
RATE_48M_I
D
X
},
{
-
72
,
RATE_36M_I
D
X
},
{
-
80
,
RATE_24M_I
D
X
},
{
-
84
,
RATE_18M_I
D
X
},
{
-
85
,
RATE_12M_I
D
X
},
{
-
87
,
RATE_9M_I
D
X
},
{
-
89
,
RATE_6M_I
D
X
}
};
static
struct
il3945_tpt_entry
il3945_tpt_table_g
[]
=
{
{
-
60
,
RATE_54M_I
NDE
X
},
{
-
64
,
RATE_48M_I
NDE
X
},
{
-
68
,
RATE_36M_I
NDE
X
},
{
-
80
,
RATE_24M_I
NDE
X
},
{
-
84
,
RATE_18M_I
NDE
X
},
{
-
85
,
RATE_12M_I
NDE
X
},
{
-
86
,
RATE_11M_I
NDE
X
},
{
-
88
,
RATE_5M_I
NDE
X
},
{
-
90
,
RATE_2M_I
NDE
X
},
{
-
92
,
RATE_1M_I
NDE
X
}
{
-
60
,
RATE_54M_I
D
X
},
{
-
64
,
RATE_48M_I
D
X
},
{
-
68
,
RATE_36M_I
D
X
},
{
-
80
,
RATE_24M_I
D
X
},
{
-
84
,
RATE_18M_I
D
X
},
{
-
85
,
RATE_12M_I
D
X
},
{
-
86
,
RATE_11M_I
D
X
},
{
-
88
,
RATE_5M_I
D
X
},
{
-
90
,
RATE_2M_I
D
X
},
{
-
92
,
RATE_1M_I
D
X
}
};
#define RATE_MAX_WINDOW 62
...
...
drivers/net/wireless/iwlegacy/iwl-3945.c
View file @
2d09b062
...
...
@@ -52,16 +52,16 @@
#include "iwl-3945-debugfs.h"
#define IL_DECLARE_RATE_INFO(r, ip, in, rp, rn, pp, np) \
[RATE_##r##M_I
NDE
X] = { RATE_##r##M_PLCP, \
[RATE_##r##M_I
D
X] = { RATE_##r##M_PLCP, \
RATE_##r##M_IEEE, \
RATE_##ip##M_I
NDE
X, \
RATE_##in##M_I
NDE
X, \
RATE_##rp##M_I
NDE
X, \
RATE_##rn##M_I
NDE
X, \
RATE_##pp##M_I
NDE
X, \
RATE_##np##M_I
NDE
X, \
RATE_##r##M_I
NDE
X_TABLE, \
RATE_##ip##M_I
NDE
X_TABLE }
RATE_##ip##M_I
D
X, \
RATE_##in##M_I
D
X, \
RATE_##rp##M_I
D
X, \
RATE_##rn##M_I
D
X, \
RATE_##pp##M_I
D
X, \
RATE_##np##M_I
D
X, \
RATE_##r##M_I
D
X_TABLE, \
RATE_##ip##M_I
D
X_TABLE }
/*
* Parameter order:
...
...
@@ -246,16 +246,16 @@ int il3945_rs_next_rate(struct il_priv *il, int rate)
switch
(
il
->
band
)
{
case
IEEE80211_BAND_5GHZ
:
if
(
rate
==
RATE_12M_I
NDE
X
)
next_rate
=
RATE_9M_I
NDE
X
;
else
if
(
rate
==
RATE_6M_I
NDE
X
)
next_rate
=
RATE_6M_I
NDE
X
;
if
(
rate
==
RATE_12M_I
D
X
)
next_rate
=
RATE_9M_I
D
X
;
else
if
(
rate
==
RATE_6M_I
D
X
)
next_rate
=
RATE_6M_I
D
X
;
break
;
case
IEEE80211_BAND_2GHZ
:
if
(
!
(
il
->
_3945
.
sta_supp_rates
&
IL_OFDM_RATES_MASK
)
&&
il_is_associated
(
il
))
{
if
(
rate
==
RATE_11M_I
NDE
X
)
next_rate
=
RATE_5M_I
NDE
X
;
if
(
rate
==
RATE_11M_I
D
X
)
next_rate
=
RATE_5M_I
D
X
;
}
break
;
...
...
@@ -307,7 +307,7 @@ static void il3945_rx_reply_tx(struct il_priv *il,
struct
il_rx_pkt
*
pkt
=
rxb_addr
(
rxb
);
u16
sequence
=
le16_to_cpu
(
pkt
->
hdr
.
sequence
);
int
txq_id
=
SEQ_TO_QUEUE
(
sequence
);
int
index
=
SEQ_TO_I
NDE
X
(
sequence
);
int
index
=
SEQ_TO_I
D
X
(
sequence
);
struct
il_tx_queue
*
txq
=
&
il
->
txq
[
txq_id
];
struct
ieee80211_tx_info
*
info
;
struct
il3945_tx_resp
*
tx_resp
=
(
void
*
)
&
pkt
->
u
.
raw
[
0
];
...
...
@@ -1133,7 +1133,7 @@ static int il3945_is_temp_calib_needed(struct il_priv *il)
#define IL_MAX_GAIN_ENTRIES 78
#define IL_CCK_FROM_OFDM_POWER_DIFF -5
#define IL_CCK_FROM_OFDM_I
NDE
X_DIFF (10)
#define IL_CCK_FROM_OFDM_I
D
X_DIFF (10)
/* radio and DSP power table, each step is 1/2 dB.
* 1st number is for RF analog gain, 2nd number is for DSP pre-DAC gain. */
...
...
@@ -1330,7 +1330,7 @@ static void il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_index,
/* use this channel group's 6Mbit clipping/saturation pwr,
* but cap at regulatory scan power restriction (set during init
* based on eeprom channel data) for this channel. */
power
=
min
(
ch_info
->
scan_power
,
clip_pwrs
[
RATE_6M_I
NDE
X_TABLE
]);
power
=
min
(
ch_info
->
scan_power
,
clip_pwrs
[
RATE_6M_I
D
X_TABLE
]);
power
=
min
(
power
,
il
->
tx_power_user_lmt
);
scan_power_info
->
requested_power
=
power
;
...
...
@@ -1342,7 +1342,7 @@ static void il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_index,
* *index*. */
power_index
=
ch_info
->
power_info
[
rate_index
].
power_table_index
-
(
power
-
ch_info
->
power_info
[
RATE_6M_I
NDE
X_TABLE
].
requested_power
)
*
2
;
[
RATE_6M_I
D
X_TABLE
].
requested_power
)
*
2
;
/* store reference index that we use when adjusting *all* scan
* powers. So we can accommodate user (all channel) or spectrum
...
...
@@ -1466,7 +1466,7 @@ static int il3945_hw_reg_set_new_power(struct il_priv *il,
power_info
=
ch_info
->
power_info
;
/* update OFDM Txpower settings */
for
(
i
=
RATE_6M_I
NDEX_TABLE
;
i
<=
RATE_54M_INDE
X_TABLE
;
for
(
i
=
RATE_6M_I
DX_TABLE
;
i
<=
RATE_54M_ID
X_TABLE
;
i
++
,
++
power_info
)
{
int
delta_idx
;
...
...
@@ -1490,15 +1490,15 @@ static int il3945_hw_reg_set_new_power(struct il_priv *il,
* ... all CCK power settings for a given channel are the *same*. */
if
(
power_changed
)
{
power
=
ch_info
->
power_info
[
RATE_12M_I
NDE
X_TABLE
].
ch_info
->
power_info
[
RATE_12M_I
D
X_TABLE
].
requested_power
+
IL_CCK_FROM_OFDM_POWER_DIFF
;
/* do all CCK rates' il3945_channel_power_info structures */
for
(
i
=
RATE_1M_I
NDEX_TABLE
;
i
<=
RATE_11M_INDE
X_TABLE
;
i
++
)
{
for
(
i
=
RATE_1M_I
DX_TABLE
;
i
<=
RATE_11M_ID
X_TABLE
;
i
++
)
{
power_info
->
requested_power
=
power
;
power_info
->
base_power_index
=
ch_info
->
power_info
[
RATE_12M_I
NDE
X_TABLE
].
base_power_index
+
IL_CCK_FROM_OFDM_I
NDE
X_DIFF
;
ch_info
->
power_info
[
RATE_12M_I
D
X_TABLE
].
base_power_index
+
IL_CCK_FROM_OFDM_I
D
X_DIFF
;
++
power_info
;
}
}
...
...
@@ -1597,7 +1597,7 @@ static int il3945_hw_reg_comp_txpower_temp(struct il_priv *il)
for
(
scan_tbl_index
=
0
;
scan_tbl_index
<
IL_NUM_SCAN_RATES
;
scan_tbl_index
++
)
{
s32
actual_index
=
(
scan_tbl_index
==
0
)
?
RATE_1M_I
NDEX_TABLE
:
RATE_6M_INDE
X_TABLE
;
RATE_1M_I
DX_TABLE
:
RATE_6M_ID
X_TABLE
;
il3945_hw_reg_set_scan_power
(
il
,
scan_tbl_index
,
actual_index
,
clip_pwrs
,
ch_info
,
a_band
);
...
...
@@ -2012,19 +2012,19 @@ static void il3945_hw_reg_init_channel_groups(struct il_priv *il)
for
(
rate_index
=
0
;
rate_index
<
RATE_COUNT_3945
;
rate_index
++
,
clip_pwrs
++
)
{
switch
(
rate_index
)
{
case
RATE_36M_I
NDE
X_TABLE
:
case
RATE_36M_I
D
X_TABLE
:
if
(
i
==
0
)
/* B/G */
*
clip_pwrs
=
satur_pwr
;
else
/* A */
*
clip_pwrs
=
satur_pwr
-
5
;
break
;
case
RATE_48M_I
NDE
X_TABLE
:
case
RATE_48M_I
D
X_TABLE
:
if
(
i
==
0
)
*
clip_pwrs
=
satur_pwr
-
7
;
else
*
clip_pwrs
=
satur_pwr
-
10
;
break
;
case
RATE_54M_I
NDE
X_TABLE
:
case
RATE_54M_I
D
X_TABLE
:
if
(
i
==
0
)
*
clip_pwrs
=
satur_pwr
-
9
;
else
...
...
@@ -2139,13 +2139,13 @@ int il3945_txpower_set_from_eeprom(struct il_priv *il)
}
/* set tx power for CCK rates, based on OFDM 12 Mbit settings*/
pwr_info
=
&
ch_info
->
power_info
[
RATE_12M_I
NDE
X_TABLE
];
pwr_info
=
&
ch_info
->
power_info
[
RATE_12M_I
D
X_TABLE
];
power
=
pwr_info
->
requested_power
+
IL_CCK_FROM_OFDM_POWER_DIFF
;
pwr_index
=
pwr_info
->
power_table_index
+
IL_CCK_FROM_OFDM_I
NDE
X_DIFF
;
IL_CCK_FROM_OFDM_I
D
X_DIFF
;
base_pwr_index
=
pwr_info
->
base_power_index
+
IL_CCK_FROM_OFDM_I
NDE
X_DIFF
;
IL_CCK_FROM_OFDM_I
D
X_DIFF
;
/* stay within table range */
pwr_index
=
il3945_hw_reg_fix_power_index
(
pwr_index
);
...
...
@@ -2169,7 +2169,7 @@ int il3945_txpower_set_from_eeprom(struct il_priv *il)
for
(
scan_tbl_index
=
0
;
scan_tbl_index
<
IL_NUM_SCAN_RATES
;
scan_tbl_index
++
)
{
s32
actual_index
=
(
scan_tbl_index
==
0
)
?
RATE_1M_I
NDEX_TABLE
:
RATE_6M_INDE
X_TABLE
;
RATE_1M_I
DX_TABLE
:
RATE_6M_ID
X_TABLE
;
il3945_hw_reg_set_scan_power
(
il
,
scan_tbl_index
,
actual_index
,
clip_pwrs
,
ch_info
,
a_band
);
}
...
...
@@ -2326,17 +2326,17 @@ int il3945_init_hw_rate_table(struct il_priv *il)
D_RATE
(
"Select A mode rate scale
\n
"
);
/* If one of the following CCK rates is used,
* have it fall back to the 6M OFDM rate */
for
(
i
=
RATE_1M_I
NDE
X_TABLE
;
i
<=
RATE_11M_I
NDE
X_TABLE
;
i
++
)
for
(
i
=
RATE_1M_I
D
X_TABLE
;
i
<=
RATE_11M_I
D
X_TABLE
;
i
++
)
table
[
i
].
next_rate_index
=
il3945_rates
[
IL_FIRST_OFDM_RATE
].
table_rs_index
;
/* Don't fall back to CCK rates */
table
[
RATE_12M_I
NDE
X_TABLE
].
next_rate_index
=
RATE_9M_I
NDE
X_TABLE
;
table
[
RATE_12M_I
D
X_TABLE
].
next_rate_index
=
RATE_9M_I
D
X_TABLE
;
/* Don't drop out of OFDM rates */
table
[
RATE_6M_I
NDE
X_TABLE
].
next_rate_index
=
table
[
RATE_6M_I
D
X_TABLE
].
next_rate_index
=
il3945_rates
[
IL_FIRST_OFDM_RATE
].
table_rs_index
;
break
;
...
...
@@ -2349,14 +2349,14 @@ int il3945_init_hw_rate_table(struct il_priv *il)
il_is_associated
(
il
))
{
index
=
IL_FIRST_CCK_RATE
;
for
(
i
=
RATE_6M_I
NDE
X_TABLE
;
i
<=
RATE_54M_I
NDE
X_TABLE
;
i
++
)
for
(
i
=
RATE_6M_I
D
X_TABLE
;
i
<=
RATE_54M_I
D
X_TABLE
;
i
++
)
table
[
i
].
next_rate_index
=
il3945_rates
[
index
].
table_rs_index
;
index
=
RATE_11M_I
NDE
X_TABLE
;
index
=
RATE_11M_I
D
X_TABLE
;
/* CCK shouldn't fall back to OFDM... */
table
[
index
].
next_rate_index
=
RATE_5M_I
NDE
X_TABLE
;
table
[
index
].
next_rate_index
=
RATE_5M_I
D
X_TABLE
;
}
break
;
...
...
drivers/net/wireless/iwlegacy/iwl-4965-calib.c
View file @
2d09b062
...
...
@@ -374,30 +374,30 @@ static void il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
struct
il_sensitivity_data
*
data
,
__le16
*
tbl
)
{
tbl
[
HD_AUTO_CORR32_X4_TH_ADD_MIN_I
NDE
X
]
=
tbl
[
HD_AUTO_CORR32_X4_TH_ADD_MIN_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
auto_corr_ofdm
);
tbl
[
HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_I
NDE
X
]
=
tbl
[
HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
auto_corr_ofdm_mrc
);
tbl
[
HD_AUTO_CORR32_X1_TH_ADD_MIN_I
NDE
X
]
=
tbl
[
HD_AUTO_CORR32_X1_TH_ADD_MIN_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
auto_corr_ofdm_x1
);
tbl
[
HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_I
NDE
X
]
=
tbl
[
HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
auto_corr_ofdm_mrc_x1
);
tbl
[
HD_AUTO_CORR40_X4_TH_ADD_MIN_I
NDE
X
]
=
tbl
[
HD_AUTO_CORR40_X4_TH_ADD_MIN_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
auto_corr_cck
);
tbl
[
HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
NDE
X
]
=
tbl
[
HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
auto_corr_cck_mrc
);
tbl
[
HD_MIN_ENERGY_CCK_DET_I
NDE
X
]
=
tbl
[
HD_MIN_ENERGY_CCK_DET_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
nrg_th_cck
);
tbl
[
HD_MIN_ENERGY_OFDM_DET_I
NDE
X
]
=
tbl
[
HD_MIN_ENERGY_OFDM_DET_I
D
X
]
=
cpu_to_le16
((
u16
)
data
->
nrg_th_ofdm
);
tbl
[
HD_BARKER_CORR_TH_ADD_MIN_I
NDE
X
]
=
tbl
[
HD_BARKER_CORR_TH_ADD_MIN_I
D
X
]
=
cpu_to_le16
(
data
->
barker_corr_th_min
);
tbl
[
HD_BARKER_CORR_TH_ADD_MIN_MRC_I
NDE
X
]
=
tbl
[
HD_BARKER_CORR_TH_ADD_MIN_MRC_I
D
X
]
=
cpu_to_le16
(
data
->
barker_corr_th_min_mrc
);
tbl
[
HD_OFDM_ENERGY_TH_IN_I
NDE
X
]
=
tbl
[
HD_OFDM_ENERGY_TH_IN_I
D
X
]
=
cpu_to_le16
(
data
->
nrg_th_cca
);
D_CALIB
(
"ofdm: ac %u mrc %u x1 %u mrc_x1 %u thresh %u
\n
"
,
...
...
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
View file @
2d09b062
...
...
@@ -433,8 +433,8 @@ static inline int il4965_hw_valid_rtc_data_addr(u32 addr)
* present during factory calibration). A 5 Ghz EEPROM index of "40"
* corresponds to the 49th entry in the table used by the driver.
*/
#define MIN_TX_GAIN_I
NDE
X (0)
/* highest gain, lowest idx, 2.4 */
#define MIN_TX_GAIN_I
NDE
X_52GHZ_EXT (-9)
/* highest gain, lowest idx, 5 */
#define MIN_TX_GAIN_I
D
X (0)
/* highest gain, lowest idx, 2.4 */
#define MIN_TX_GAIN_I
D
X_52GHZ_EXT (-9)
/* highest gain, lowest idx, 5 */
/**
* 2.4 GHz gain table
...
...
drivers/net/wireless/iwlegacy/iwl-4965-rs.c
View file @
2d09b062
...
...
@@ -56,13 +56,13 @@
#define RATE_SCALE_FLUSH_INTVL (3*HZ)
static
u8
rs_ht_to_legacy
[]
=
{
RATE_6M_I
NDEX
,
RATE_6M_INDE
X
,
RATE_6M_I
NDEX
,
RATE_6M_INDE
X
,
RATE_6M_I
NDE
X
,
RATE_6M_I
NDEX
,
RATE_9M_INDE
X
,
RATE_12M_I
NDEX
,
RATE_18M_INDE
X
,
RATE_24M_I
NDEX
,
RATE_36M_INDE
X
,
RATE_48M_I
NDEX
,
RATE_54M_INDE
X
RATE_6M_I
DX
,
RATE_6M_ID
X
,
RATE_6M_I
DX
,
RATE_6M_ID
X
,
RATE_6M_I
D
X
,
RATE_6M_I
DX
,
RATE_9M_ID
X
,
RATE_12M_I
DX
,
RATE_18M_ID
X
,
RATE_24M_I
DX
,
RATE_36M_ID
X
,
RATE_48M_I
DX
,
RATE_54M_ID
X
};
static
const
u8
ant_toggle_lookup
[]
=
{
...
...
@@ -77,16 +77,16 @@ static const u8 ant_toggle_lookup[] = {
};
#define IL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \
[RATE_##r##M_I
NDE
X] = { RATE_##r##M_PLCP, \
[RATE_##r##M_I
D
X] = { RATE_##r##M_PLCP, \
RATE_SISO_##s##M_PLCP, \
RATE_MIMO2_##s##M_PLCP,\
RATE_##r##M_IEEE, \
RATE_##ip##M_I
NDE
X, \
RATE_##in##M_I
NDE
X, \
RATE_##rp##M_I
NDE
X, \
RATE_##rn##M_I
NDE
X, \
RATE_##pp##M_I
NDE
X, \
RATE_##np##M_I
NDE
X }
RATE_##ip##M_I
D
X, \
RATE_##in##M_I
D
X, \
RATE_##rp##M_I
D
X, \
RATE_##rn##M_I
D
X, \
RATE_##pp##M_I
D
X, \
RATE_##np##M_I
D
X }
/*
* Parameter order:
...
...
@@ -125,7 +125,7 @@ static int il4965_hwrate_to_plcp_idx(u32 rate_n_flags)
idx
+=
IL_FIRST_OFDM_RATE
;
/* skip 9M not supported in ht*/
if
(
idx
>=
RATE_9M_I
NDE
X
)
if
(
idx
>=
RATE_9M_I
D
X
)
idx
+=
1
;
if
(
idx
>=
IL_FIRST_OFDM_RATE
&&
idx
<=
IL_LAST_OFDM_RATE
)
return
idx
;
...
...
@@ -218,7 +218,7 @@ static const struct il_rate_mcs_info il_rate_mcs[RATE_COUNT] = {
{
"60"
,
"64QAM 5/6"
},
};
#define MCS_I
NDE
X_PER_STREAM (8)
#define MCS_I
D
X_PER_STREAM (8)
static
inline
u8
il4965_rs_extract_rate
(
u32
rate_n_flags
)
{
...
...
@@ -856,7 +856,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband,
/* For HT packets, map MCS to PLCP */
if
(
mac_flags
&
IEEE80211_TX_RC_MCS
)
{
mac_index
&=
RATE_MCS_CODE_MSK
;
/* Remove # of streams */
if
(
mac_index
>=
(
RATE_9M_I
NDE
X
-
IL_FIRST_OFDM_RATE
))
if
(
mac_index
>=
(
RATE_9M_I
D
X
-
IL_FIRST_OFDM_RATE
))
mac_index
++
;
/*
* mac80211 HT index is always zero-indexed; we need to move
...
...
@@ -2276,7 +2276,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
rate_idx
=
(
rate_idx
>
0
)
?
(
rate_idx
-
1
)
:
0
;
if
(
il4965_rs_extract_rate
(
lq_sta
->
last_rate_n_flags
)
>=
RATE_MIMO2_6M_PLCP
)
rate_idx
=
rate_idx
+
MCS_I
NDE
X_PER_STREAM
;
rate_idx
=
rate_idx
+
MCS_I
D
X_PER_STREAM
;
info
->
control
.
rates
[
0
].
flags
=
IEEE80211_TX_RC_MCS
;
if
(
lq_sta
->
last_rate_n_flags
&
RATE_MCS_SGI_MSK
)
info
->
control
.
rates
[
0
].
flags
|=
...
...
drivers/net/wireless/iwlegacy/iwl-4965-sta.c
View file @
2d09b062
...
...
@@ -50,9 +50,9 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id)
/* Set up the rate scaling to start at selected rate, fall back
* all the way down to 1M in IEEE order, and then spin on 1M */
if
(
il
->
band
==
IEEE80211_BAND_5GHZ
)
r
=
RATE_6M_I
NDE
X
;
r
=
RATE_6M_I
D
X
;
else
r
=
RATE_1M_I
NDE
X
;
r
=
RATE_1M_I
D
X
;
if
(
r
>=
IL_FIRST_CCK_RATE
&&
r
<=
IL_LAST_CCK_RATE
)
rate_flags
|=
RATE_MCS_CCK_MSK
;
...
...
drivers/net/wireless/iwlegacy/iwl-4965-tx.c
View file @
2d09b062
...
...
@@ -423,7 +423,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
*/
out_cmd
->
hdr
.
cmd
=
REPLY_TX
;
out_cmd
->
hdr
.
sequence
=
cpu_to_le16
((
u16
)(
QUEUE_TO_SEQ
(
txq_id
)
|
I
NDE
X_TO_SEQ
(
q
->
write_ptr
)));
I
D
X_TO_SEQ
(
q
->
write_ptr
)));
/* Copy MAC header from skb into command buffer */
memcpy
(
tx_cmd
->
hdr
,
hdr
,
hdr_len
);
...
...
@@ -1172,7 +1172,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il,
ba_resp
->
seq_ctl
);
/* Calculate shift to align block-ack bits with our Tx win bits */
sh
=
agg
->
start_idx
-
SEQ_TO_I
NDE
X
(
seq_ctl
>>
4
);
sh
=
agg
->
start_idx
-
SEQ_TO_I
D
X
(
seq_ctl
>>
4
);
if
(
sh
<
0
)
/* tbw something is wrong with indices */
sh
+=
0x100
;
...
...
drivers/net/wireless/iwlegacy/iwl-4965.c
View file @
2d09b062
...
...
@@ -632,9 +632,9 @@ static s32 get_min_power_index(s32 rate_power_index, u32 band)
{
if
(
!
band
)
{
if
((
rate_power_index
&
7
)
<=
4
)
return
MIN_TX_GAIN_I
NDE
X_52GHZ_EXT
;
return
MIN_TX_GAIN_I
D
X_52GHZ_EXT
;
}
return
MIN_TX_GAIN_I
NDE
X
;
return
MIN_TX_GAIN_I
D
X
;
}
struct
gain_entry
{
...
...
@@ -1654,7 +1654,7 @@ static int il4965_tx_status_reply_tx(struct il_priv *il,
u16
sc
;
status
=
le16_to_cpu
(
frame_status
[
i
].
status
);
seq
=
le16_to_cpu
(
frame_status
[
i
].
sequence
);
idx
=
SEQ_TO_I
NDE
X
(
seq
);
idx
=
SEQ_TO_I
D
X
(
seq
);
txq_id
=
SEQ_TO_QUEUE
(
seq
);
if
(
status
&
(
AGG_TX_STATE_FEW_BYTES_MSK
|
...
...
@@ -1777,7 +1777,7 @@ static void il4965_rx_reply_tx(struct il_priv *il,
struct
il_rx_pkt
*
pkt
=
rxb_addr
(
rxb
);
u16
sequence
=
le16_to_cpu
(
pkt
->
hdr
.
sequence
);
int
txq_id
=
SEQ_TO_QUEUE
(
sequence
);
int
index
=
SEQ_TO_I
NDE
X
(
sequence
);
int
index
=
SEQ_TO_I
D
X
(
sequence
);
struct
il_tx_queue
*
txq
=
&
il
->
txq
[
txq_id
];
struct
ieee80211_hdr
*
hdr
;
struct
ieee80211_tx_info
*
info
;
...
...
drivers/net/wireless/iwlegacy/iwl-commands.h
View file @
2d09b062
...
...
@@ -168,8 +168,8 @@ enum {
#define SEQ_TO_QUEUE(s) (((s) >> 8) & 0x1f)
#define QUEUE_TO_SEQ(q) (((q) & 0x1f) << 8)
#define SEQ_TO_I
NDE
X(s) ((s) & 0xff)
#define I
NDE
X_TO_SEQ(i) ((i) & 0xff)
#define SEQ_TO_I
D
X(s) ((s) & 0xff)
#define I
D
X_TO_SEQ(i) ((i) & 0xff)
#define SEQ_HUGE_FRAME cpu_to_le16(0x4000)
#define SEQ_RX_FRAME cpu_to_le16(0x8000)
...
...
@@ -3116,10 +3116,10 @@ struct il_missed_beacon_notif {
* maximum sensitivity):
*
* START / MIN / MAX
* HD_AUTO_CORR32_X1_TH_ADD_MIN_I
NDE
X 90 / 85 / 120
* HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_I
NDE
X 170 / 170 / 210
* HD_AUTO_CORR32_X4_TH_ADD_MIN_I
NDE
X 105 / 105 / 140
* HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_I
NDE
X 220 / 220 / 270
* HD_AUTO_CORR32_X1_TH_ADD_MIN_I
D
X 90 / 85 / 120
* HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_I
D
X 170 / 170 / 210
* HD_AUTO_CORR32_X4_TH_ADD_MIN_I
D
X 105 / 105 / 140
* HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_I
D
X 220 / 220 / 270
*
* If actual rate of OFDM false alarms (+ plcp_errors) is too high
* (greater than 50 for each 204.8 msecs listening), reduce sensitivity
...
...
@@ -3156,26 +3156,26 @@ struct il_missed_beacon_notif {
* (notice that the start points for CCK are at maximum sensitivity):
*
* START / MIN / MAX
* HD_AUTO_CORR40_X4_TH_ADD_MIN_I
NDE
X 125 / 125 / 200
* HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
NDE
X 200 / 200 / 400
* HD_MIN_ENERGY_CCK_DET_I
NDE
X 100 / 0 / 100
* HD_AUTO_CORR40_X4_TH_ADD_MIN_I
D
X 125 / 125 / 200
* HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
D
X 200 / 200 / 400
* HD_MIN_ENERGY_CCK_DET_I
D
X 100 / 0 / 100
*
* If actual rate of CCK false alarms (+ plcp_errors) is too high
* (greater than 50 for each 204.8 msecs listening), method for reducing
* sensitivity is:
*
* 1) *Add* 3 to value in HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
NDE
X,
* 1) *Add* 3 to value in HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
D
X,
* up to max 400.
*
* 2) If current value in HD_AUTO_CORR40_X4_TH_ADD_MIN_I
NDE
X is < 160,
* 2) If current value in HD_AUTO_CORR40_X4_TH_ADD_MIN_I
D
X is < 160,
* sensitivity has been reduced a significant amount; bring it up to
* a moderate 161. Otherwise, *add* 3, up to max 200.
*
* 3) a) If current value in HD_AUTO_CORR40_X4_TH_ADD_MIN_I
NDE
X is > 160,
* 3) a) If current value in HD_AUTO_CORR40_X4_TH_ADD_MIN_I
D
X is > 160,
* sensitivity has been reduced only a moderate or small amount;
* *subtract* 2 from value in HD_MIN_ENERGY_CCK_DET_I
NDE
X,
* *subtract* 2 from value in HD_MIN_ENERGY_CCK_DET_I
D
X,
* down to min 0. Otherwise (if gain has been significantly reduced),
* don't change the HD_MIN_ENERGY_CCK_DET_I
NDE
X value.
* don't change the HD_MIN_ENERGY_CCK_DET_I
D
X value.
*
* b) Save a snapshot of the "silence reference".
*
...
...
@@ -3191,13 +3191,13 @@ struct il_missed_beacon_notif {
*
* Method for increasing sensitivity:
*
* 1) *Subtract* 3 from value in HD_AUTO_CORR40_X4_TH_ADD_MIN_I
NDE
X,
* 1) *Subtract* 3 from value in HD_AUTO_CORR40_X4_TH_ADD_MIN_I
D
X,
* down to min 125.
*
* 2) *Subtract* 3 from value in HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
NDE
X,
* 2) *Subtract* 3 from value in HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
D
X,
* down to min 200.
*
* 3) *Add* 2 to value in HD_MIN_ENERGY_CCK_DET_I
NDE
X, up to max 100.
* 3) *Add* 2 to value in HD_MIN_ENERGY_CCK_DET_I
D
X, up to max 100.
*
* If actual rate of CCK false alarms (+ plcp_errors) is within good range
* (between 5 and 50 for each 204.8 msecs listening):
...
...
@@ -3206,13 +3206,13 @@ struct il_missed_beacon_notif {
*
* 2) If previous beacon had too many CCK false alarms (+ plcp_errors),
* give some extra margin to energy threshold by *subtracting* 8
* from value in HD_MIN_ENERGY_CCK_DET_I
NDE
X.
* from value in HD_MIN_ENERGY_CCK_DET_I
D
X.
*
* For all cases (too few, too many, good range), make sure that the CCK
* detection threshold (energy) is below the energy level for robust
* detection over the past 10 beacon periods, the "Max cck energy".
* Lower values mean higher energy; this means making sure that the value
* in HD_MIN_ENERGY_CCK_DET_I
NDE
X is at or *above* "Max cck energy".
* in HD_MIN_ENERGY_CCK_DET_I
D
X is at or *above* "Max cck energy".
*
*/
...
...
@@ -3220,17 +3220,17 @@ struct il_missed_beacon_notif {
* Table entries in SENSITIVITY_CMD (struct il_sensitivity_cmd)
*/
#define HD_TABLE_SIZE (11)
/* number of entries */
#define HD_MIN_ENERGY_CCK_DET_I
NDE
X (0)
/* table indexes */
#define HD_MIN_ENERGY_OFDM_DET_I
NDE
X (1)
#define HD_AUTO_CORR32_X1_TH_ADD_MIN_I
NDE
X (2)
#define HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_I
NDE
X (3)
#define HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
NDE
X (4)
#define HD_AUTO_CORR32_X4_TH_ADD_MIN_I
NDE
X (5)
#define HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_I
NDE
X (6)
#define HD_BARKER_CORR_TH_ADD_MIN_I
NDE
X (7)
#define HD_BARKER_CORR_TH_ADD_MIN_MRC_I
NDE
X (8)
#define HD_AUTO_CORR40_X4_TH_ADD_MIN_I
NDE
X (9)
#define HD_OFDM_ENERGY_TH_IN_I
NDE
X (10)
#define HD_MIN_ENERGY_CCK_DET_I
D
X (0)
/* table indexes */
#define HD_MIN_ENERGY_OFDM_DET_I
D
X (1)
#define HD_AUTO_CORR32_X1_TH_ADD_MIN_I
D
X (2)
#define HD_AUTO_CORR32_X1_TH_ADD_MIN_MRC_I
D
X (3)
#define HD_AUTO_CORR40_X4_TH_ADD_MIN_MRC_I
D
X (4)
#define HD_AUTO_CORR32_X4_TH_ADD_MIN_I
D
X (5)
#define HD_AUTO_CORR32_X4_TH_ADD_MIN_MRC_I
D
X (6)
#define HD_BARKER_CORR_TH_ADD_MIN_I
D
X (7)
#define HD_BARKER_CORR_TH_ADD_MIN_MRC_I
D
X (8)
#define HD_AUTO_CORR40_X4_TH_ADD_MIN_I
D
X (9)
#define HD_OFDM_ENERGY_TH_IN_I
D
X (10)
/* Control field in struct il_sensitivity_cmd */
#define SENSITIVITY_CMD_CONTROL_DEFAULT_TABLE cpu_to_le16(0)
...
...
drivers/net/wireless/iwlegacy/iwl-fh.h
View file @
2d09b062
...
...
@@ -162,7 +162,7 @@
* RBs), should be 8 after preparing the first 8 RBs (for example), and must
* wrap back to 0 at the end of the circular buffer (but don't wrap before
* "read" index has advanced past 1! See below).
* NOTE: 4965 EXPECTS THE WRITE I
NDE
X TO BE INCREMENTED IN MULTIPLES OF 8.
* NOTE: 4965 EXPECTS THE WRITE I
D
X TO BE INCREMENTED IN MULTIPLES OF 8.
*
* As the 4965 fills RBs (referenced from contiguous RBDs within the circular
* buffer), it updates the Rx status buffer in host DRAM, 2) described above,
...
...
drivers/net/wireless/iwlegacy/iwl-legacy-rs.h
View file @
2d09b062
...
...
@@ -59,64 +59,64 @@ struct il3945_rate_info {
* struct il_rate_info il_rates[RATE_COUNT];
*/
enum
{
RATE_1M_I
NDE
X
=
0
,
RATE_2M_I
NDE
X
,
RATE_5M_I
NDE
X
,
RATE_11M_I
NDE
X
,
RATE_6M_I
NDE
X
,
RATE_9M_I
NDE
X
,
RATE_12M_I
NDE
X
,
RATE_18M_I
NDE
X
,
RATE_24M_I
NDE
X
,
RATE_36M_I
NDE
X
,
RATE_48M_I
NDE
X
,
RATE_54M_I
NDE
X
,
RATE_60M_I
NDE
X
,
RATE_1M_I
D
X
=
0
,
RATE_2M_I
D
X
,
RATE_5M_I
D
X
,
RATE_11M_I
D
X
,
RATE_6M_I
D
X
,
RATE_9M_I
D
X
,
RATE_12M_I
D
X
,
RATE_18M_I
D
X
,
RATE_24M_I
D
X
,
RATE_36M_I
D
X
,
RATE_48M_I
D
X
,
RATE_54M_I
D
X
,
RATE_60M_I
D
X
,
RATE_COUNT
,
RATE_COUNT_LEGACY
=
RATE_COUNT
-
1
,
/* Excluding 60M */
RATE_COUNT_3945
=
RATE_COUNT
-
1
,
RATE_INVM_I
NDE
X
=
RATE_COUNT
,
RATE_INVM_I
D
X
=
RATE_COUNT
,
RATE_INVALID
=
RATE_COUNT
,
};
enum
{
RATE_6M_I
NDE
X_TABLE
=
0
,
RATE_9M_I
NDE
X_TABLE
,
RATE_12M_I
NDE
X_TABLE
,
RATE_18M_I
NDE
X_TABLE
,
RATE_24M_I
NDE
X_TABLE
,
RATE_36M_I
NDE
X_TABLE
,
RATE_48M_I
NDE
X_TABLE
,
RATE_54M_I
NDE
X_TABLE
,
RATE_1M_I
NDE
X_TABLE
,
RATE_2M_I
NDE
X_TABLE
,
RATE_5M_I
NDE
X_TABLE
,
RATE_11M_I
NDE
X_TABLE
,
RATE_INVM_I
NDEX_TABLE
=
RATE_INVM_INDE
X
-
1
,
RATE_6M_I
D
X_TABLE
=
0
,
RATE_9M_I
D
X_TABLE
,
RATE_12M_I
D
X_TABLE
,
RATE_18M_I
D
X_TABLE
,
RATE_24M_I
D
X_TABLE
,
RATE_36M_I
D
X_TABLE
,
RATE_48M_I
D
X_TABLE
,
RATE_54M_I
D
X_TABLE
,
RATE_1M_I
D
X_TABLE
,
RATE_2M_I
D
X_TABLE
,
RATE_5M_I
D
X_TABLE
,
RATE_11M_I
D
X_TABLE
,
RATE_INVM_I
DX_TABLE
=
RATE_INVM_ID
X
-
1
,
};
enum
{
IL_FIRST_OFDM_RATE
=
RATE_6M_I
NDE
X
,
IL39_LAST_OFDM_RATE
=
RATE_54M_I
NDE
X
,
IL_LAST_OFDM_RATE
=
RATE_60M_I
NDE
X
,
IL_FIRST_CCK_RATE
=
RATE_1M_I
NDE
X
,
IL_LAST_CCK_RATE
=
RATE_11M_I
NDE
X
,
IL_FIRST_OFDM_RATE
=
RATE_6M_I
D
X
,
IL39_LAST_OFDM_RATE
=
RATE_54M_I
D
X
,
IL_LAST_OFDM_RATE
=
RATE_60M_I
D
X
,
IL_FIRST_CCK_RATE
=
RATE_1M_I
D
X
,
IL_LAST_CCK_RATE
=
RATE_11M_I
D
X
,
};
/* #define vs. enum to keep from defaulting to 'large integer' */
#define RATE_6M_MASK (1 << RATE_6M_I
NDE
X)
#define RATE_9M_MASK (1 << RATE_9M_I
NDE
X)
#define RATE_12M_MASK (1 << RATE_12M_I
NDE
X)
#define RATE_18M_MASK (1 << RATE_18M_I
NDE
X)
#define RATE_24M_MASK (1 << RATE_24M_I
NDE
X)
#define RATE_36M_MASK (1 << RATE_36M_I
NDE
X)
#define RATE_48M_MASK (1 << RATE_48M_I
NDE
X)
#define RATE_54M_MASK (1 << RATE_54M_I
NDE
X)
#define RATE_60M_MASK (1 << RATE_60M_I
NDE
X)
#define RATE_1M_MASK (1 << RATE_1M_I
NDE
X)
#define RATE_2M_MASK (1 << RATE_2M_I
NDE
X)
#define RATE_5M_MASK (1 << RATE_5M_I
NDE
X)
#define RATE_11M_MASK (1 << RATE_11M_I
NDE
X)
#define RATE_6M_MASK (1 << RATE_6M_I
D
X)
#define RATE_9M_MASK (1 << RATE_9M_I
D
X)
#define RATE_12M_MASK (1 << RATE_12M_I
D
X)
#define RATE_18M_MASK (1 << RATE_18M_I
D
X)
#define RATE_24M_MASK (1 << RATE_24M_I
D
X)
#define RATE_36M_MASK (1 << RATE_36M_I
D
X)
#define RATE_48M_MASK (1 << RATE_48M_I
D
X)
#define RATE_54M_MASK (1 << RATE_54M_I
D
X)
#define RATE_60M_MASK (1 << RATE_60M_I
D
X)
#define RATE_1M_MASK (1 << RATE_1M_I
D
X)
#define RATE_2M_MASK (1 << RATE_2M_I
D
X)
#define RATE_5M_MASK (1 << RATE_5M_I
D
X)
#define RATE_11M_MASK (1 << RATE_11M_I
D
X)
/* uCode API values for legacy bit rates, both OFDM and CCK */
enum
{
...
...
drivers/net/wireless/iwlegacy/iwl-power.h
View file @
2d09b062
...
...
@@ -31,11 +31,11 @@
#include "iwl-commands.h"
enum
il_power_level
{
IL_POWER_I
NDE
X_1
,
IL_POWER_I
NDE
X_2
,
IL_POWER_I
NDE
X_3
,
IL_POWER_I
NDE
X_4
,
IL_POWER_I
NDE
X_5
,
IL_POWER_I
D
X_1
,
IL_POWER_I
D
X_2
,
IL_POWER_I
D
X_3
,
IL_POWER_I
D
X_4
,
IL_POWER_I
D
X_5
,
IL_POWER_NUM
};
...
...
drivers/net/wireless/iwlegacy/iwl-rx.c
View file @
2d09b062
...
...
@@ -62,7 +62,7 @@
* WRITE = READ.
*
* During initialization, the host sets up the READ queue position to the first
* I
NDE
X position, and WRITE to the last (READ - 1 wrapped)
* I
D
X position, and WRITE to the last (READ - 1 wrapped)
*
* When the firmware places a packet in a buffer, it will advance the READ index
* and fire the RX interrupt. The driver can then query the READ index and
...
...
@@ -74,13 +74,13 @@
* iwl->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled
* to replenish the iwl->rxq->rx_free.
* + In il_rx_replenish (scheduled) if 'processed' != 'read' then the
* iwl->rxq is replenished and the READ I
NDE
X is updated (updating the
* iwl->rxq is replenished and the READ I
D
X is updated (updating the
* 'processed' and 'read' driver indexes as well)
* + A received packet is processed and handed to the kernel network stack,
* detached from the iwl->rxq. The driver 'processed' index is updated.
* + The Host/Firmware iwl->rxq is replenished at tasklet time from the rx_free
* list. If there are no allocated buffers in iwl->rxq->rx_free, the READ
* I
NDE
X is not incremented and iwl->status(RX_STALLED) is set. If there
* I
D
X is not incremented and iwl->status(RX_STALLED) is set. If there
* were enough free buffers and RX_STALLED is set it is cleared.
*
*
...
...
@@ -96,7 +96,7 @@
*
* -- enable interrupts --
* ISR - il_rx() Detach il_rx_bufs from pool up to the
* READ I
NDE
X, detaching the SKB from the pool.
* READ I
D
X, detaching the SKB from the pool.
* Moves the packet buffer from queue to rx_used.
* Calls il_rx_queue_restock to refill any empty
* slots.
...
...
drivers/net/wireless/iwlegacy/iwl-tx.c
View file @
2d09b062
...
...
@@ -500,7 +500,7 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd)
out_cmd
->
hdr
.
flags
=
0
;
out_cmd
->
hdr
.
sequence
=
cpu_to_le16
(
QUEUE_TO_SEQ
(
il
->
cmd_queue
)
|
I
NDE
X_TO_SEQ
(
q
->
write_ptr
));
I
D
X_TO_SEQ
(
q
->
write_ptr
));
if
(
cmd
->
flags
&
CMD_SIZE_HUGE
)
out_cmd
->
hdr
.
sequence
|=
SEQ_HUGE_FRAME
;
len
=
sizeof
(
struct
il_device_cmd
);
...
...
@@ -598,7 +598,7 @@ il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
struct
il_rx_pkt
*
pkt
=
rxb_addr
(
rxb
);
u16
sequence
=
le16_to_cpu
(
pkt
->
hdr
.
sequence
);
int
txq_id
=
SEQ_TO_QUEUE
(
sequence
);
int
index
=
SEQ_TO_I
NDE
X
(
sequence
);
int
index
=
SEQ_TO_I
D
X
(
sequence
);
int
cmd_index
;
bool
huge
=
!!
(
pkt
->
hdr
.
sequence
&
SEQ_HUGE_FRAME
);
struct
il_device_cmd
*
cmd
;
...
...
drivers/net/wireless/iwlegacy/iwl3945-base.c
View file @
2d09b062
...
...
@@ -563,7 +563,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
*/
out_cmd
->
hdr
.
cmd
=
REPLY_TX
;
out_cmd
->
hdr
.
sequence
=
cpu_to_le16
((
u16
)(
QUEUE_TO_SEQ
(
txq_id
)
|
I
NDE
X_TO_SEQ
(
q
->
write_ptr
)));
I
D
X_TO_SEQ
(
q
->
write_ptr
)));
/* Copy MAC header from skb into command buffer */
memcpy
(
tx_cmd
->
hdr
,
hdr
,
hdr_len
);
...
...
@@ -903,7 +903,7 @@ static void il3945_setup_rx_handlers(struct il_priv *il)
* WRITE = READ.
*
* During initialization, the host sets up the READ queue position to the first
* I
NDE
X position, and WRITE to the last (READ - 1 wrapped)
* I
D
X position, and WRITE to the last (READ - 1 wrapped)
*
* When the firmware places a packet in a buffer, it will advance the READ index
* and fire the RX interrupt. The driver can then query the READ index and
...
...
@@ -915,13 +915,13 @@ static void il3945_setup_rx_handlers(struct il_priv *il)
* iwl->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled
* to replenish the iwl->rxq->rx_free.
* + In il3945_rx_replenish (scheduled) if 'processed' != 'read' then the
* iwl->rxq is replenished and the READ I
NDE
X is updated (updating the
* iwl->rxq is replenished and the READ I
D
X is updated (updating the
* 'processed' and 'read' driver indexes as well)
* + A received packet is processed and handed to the kernel network stack,
* detached from the iwl->rxq. The driver 'processed' index is updated.
* + The Host/Firmware iwl->rxq is replenished at tasklet time from the rx_free
* list. If there are no allocated buffers in iwl->rxq->rx_free, the READ
* I
NDE
X is not incremented and iwl->status(RX_STALLED) is set. If there
* I
D
X is not incremented and iwl->status(RX_STALLED) is set. If there
* were enough free buffers and RX_STALLED is set it is cleared.
*
*
...
...
@@ -936,7 +936,7 @@ static void il3945_setup_rx_handlers(struct il_priv *il)
*
* -- enable interrupts --
* ISR - il3945_rx() Detach il_rx_bufs from pool up to the
* READ I
NDE
X, detaching the SKB from the pool.
* READ I
D
X, detaching the SKB from the pool.
* Moves the packet buffer from queue to rx_used.
* Calls il3945_rx_queue_restock to refill any empty
* slots.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment