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
2d551f14
Commit
2d551f14
authored
Mar 19, 2013
by
Rafał Miłecki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
b43: HT-PHY: use enum for RSSI types
Signed-off-by:
Rafał Miłecki
<
zajec5@gmail.com
>
parent
418e8b68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
drivers/net/wireless/b43/phy_ht.c
drivers/net/wireless/b43/phy_ht.c
+16
-5
No files found.
drivers/net/wireless/b43/phy_ht.c
View file @
2d551f14
...
@@ -30,6 +30,17 @@
...
@@ -30,6 +30,17 @@
#include "radio_2059.h"
#include "radio_2059.h"
#include "main.h"
#include "main.h"
/* Force values to keep compatibility with wl */
enum
ht_rssi_type
{
HT_RSSI_W1
=
0
,
HT_RSSI_W2
=
1
,
HT_RSSI_NB
=
2
,
HT_RSSI_IQ
=
3
,
HT_RSSI_TSSI_2G
=
4
,
HT_RSSI_TSSI_5G
=
5
,
HT_RSSI_TBD
=
6
,
};
/**************************************************
/**************************************************
* Radio 2059.
* Radio 2059.
**************************************************/
**************************************************/
...
@@ -383,7 +394,7 @@ static void b43_phy_ht_tx_tone(struct b43_wldev *dev)
...
@@ -383,7 +394,7 @@ static void b43_phy_ht_tx_tone(struct b43_wldev *dev)
**************************************************/
**************************************************/
static
void
b43_phy_ht_rssi_select
(
struct
b43_wldev
*
dev
,
u8
core_sel
,
static
void
b43_phy_ht_rssi_select
(
struct
b43_wldev
*
dev
,
u8
core_sel
,
u8
rssi_type
)
enum
ht_rssi_type
rssi_type
)
{
{
static
const
u16
ctl_regs
[
3
][
2
]
=
{
static
const
u16
ctl_regs
[
3
][
2
]
=
{
{
B43_PHY_HT_AFE_C1
,
B43_PHY_HT_AFE_C1_OVER
,
},
{
B43_PHY_HT_AFE_C1
,
B43_PHY_HT_AFE_C1_OVER
,
},
...
@@ -404,7 +415,7 @@ static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel,
...
@@ -404,7 +415,7 @@ static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel,
continue
;
continue
;
switch
(
rssi_type
)
{
switch
(
rssi_type
)
{
case
4
:
case
HT_RSSI_TSSI_2G
:
b43_phy_set
(
dev
,
ctl_regs
[
core
][
0
],
0x3
<<
8
);
b43_phy_set
(
dev
,
ctl_regs
[
core
][
0
],
0x3
<<
8
);
b43_phy_set
(
dev
,
ctl_regs
[
core
][
0
],
0x3
<<
10
);
b43_phy_set
(
dev
,
ctl_regs
[
core
][
0
],
0x3
<<
10
);
b43_phy_set
(
dev
,
ctl_regs
[
core
][
1
],
0x1
<<
9
);
b43_phy_set
(
dev
,
ctl_regs
[
core
][
1
],
0x1
<<
9
);
...
@@ -422,8 +433,8 @@ static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel,
...
@@ -422,8 +433,8 @@ static void b43_phy_ht_rssi_select(struct b43_wldev *dev, u8 core_sel,
}
}
}
}
static
void
b43_phy_ht_poll_rssi
(
struct
b43_wldev
*
dev
,
u8
type
,
s32
*
buf
,
static
void
b43_phy_ht_poll_rssi
(
struct
b43_wldev
*
dev
,
enum
ht_rssi_type
type
,
u8
nsamp
)
s32
*
buf
,
u8
nsamp
)
{
{
u16
phy_regs_values
[
12
];
u16
phy_regs_values
[
12
];
static
const
u16
phy_regs_to_save
[]
=
{
static
const
u16
phy_regs_to_save
[]
=
{
...
@@ -549,7 +560,7 @@ static void b43_phy_ht_tx_power_ctl_idle_tssi(struct b43_wldev *dev)
...
@@ -549,7 +560,7 @@ static void b43_phy_ht_tx_power_ctl_idle_tssi(struct b43_wldev *dev)
b43_phy_ht_tx_tone
(
dev
);
b43_phy_ht_tx_tone
(
dev
);
udelay
(
20
);
udelay
(
20
);
b43_phy_ht_poll_rssi
(
dev
,
4
,
rssi_buf
,
1
);
b43_phy_ht_poll_rssi
(
dev
,
HT_RSSI_TSSI_2G
,
rssi_buf
,
1
);
b43_phy_ht_stop_playback
(
dev
);
b43_phy_ht_stop_playback
(
dev
);
b43_phy_ht_reset_cca
(
dev
);
b43_phy_ht_reset_cca
(
dev
);
...
...
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