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
bef9cb58
Commit
bef9cb58
authored
Jul 28, 2010
by
John W. Linville
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libertas_tf: add get_survey callback in order to get channel noise
Signed-off-by:
John W. Linville
<
linville@tuxdriver.com
>
parent
19434148
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
drivers/net/wireless/libertas_tf/libertas_tf.h
drivers/net/wireless/libertas_tf/libertas_tf.h
+3
-0
drivers/net/wireless/libertas_tf/main.c
drivers/net/wireless/libertas_tf/main.c
+18
-0
No files found.
drivers/net/wireless/libertas_tf/libertas_tf.h
View file @
bef9cb58
...
@@ -253,6 +253,9 @@ struct lbtf_private {
...
@@ -253,6 +253,9 @@ struct lbtf_private {
u8
fw_ready
;
u8
fw_ready
;
u8
surpriseremoved
;
u8
surpriseremoved
;
struct
sk_buff_head
bc_ps_buf
;
struct
sk_buff_head
bc_ps_buf
;
/* Most recently reported noise in dBm */
s8
noise
;
};
};
/* 802.11-related definitions */
/* 802.11-related definitions */
...
...
drivers/net/wireless/libertas_tf/main.c
View file @
bef9cb58
...
@@ -525,6 +525,22 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
...
@@ -525,6 +525,22 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
lbtf_deb_leave
(
LBTF_DEB_MACOPS
);
lbtf_deb_leave
(
LBTF_DEB_MACOPS
);
}
}
static
int
lbtf_op_get_survey
(
struct
ieee80211_hw
*
hw
,
int
idx
,
struct
survey_info
*
survey
)
{
struct
lbtf_private
*
priv
=
hw
->
priv
;
struct
ieee80211_conf
*
conf
=
&
hw
->
conf
;
if
(
idx
!=
0
)
return
-
ENOENT
;
survey
->
channel
=
conf
->
channel
;
survey
->
filled
=
SURVEY_INFO_NOISE_DBM
;
survey
->
noise
=
priv
->
noise
;
return
0
;
}
static
const
struct
ieee80211_ops
lbtf_ops
=
{
static
const
struct
ieee80211_ops
lbtf_ops
=
{
.
tx
=
lbtf_op_tx
,
.
tx
=
lbtf_op_tx
,
.
start
=
lbtf_op_start
,
.
start
=
lbtf_op_start
,
...
@@ -535,6 +551,7 @@ static const struct ieee80211_ops lbtf_ops = {
...
@@ -535,6 +551,7 @@ static const struct ieee80211_ops lbtf_ops = {
.
prepare_multicast
=
lbtf_op_prepare_multicast
,
.
prepare_multicast
=
lbtf_op_prepare_multicast
,
.
configure_filter
=
lbtf_op_configure_filter
,
.
configure_filter
=
lbtf_op_configure_filter
,
.
bss_info_changed
=
lbtf_op_bss_info_changed
,
.
bss_info_changed
=
lbtf_op_bss_info_changed
,
.
get_survey
=
lbtf_op_get_survey
,
};
};
int
lbtf_rx
(
struct
lbtf_private
*
priv
,
struct
sk_buff
*
skb
)
int
lbtf_rx
(
struct
lbtf_private
*
priv
,
struct
sk_buff
*
skb
)
...
@@ -555,6 +572,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
...
@@ -555,6 +572,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
stats
.
freq
=
priv
->
cur_freq
;
stats
.
freq
=
priv
->
cur_freq
;
stats
.
band
=
IEEE80211_BAND_2GHZ
;
stats
.
band
=
IEEE80211_BAND_2GHZ
;
stats
.
signal
=
prxpd
->
snr
;
stats
.
signal
=
prxpd
->
snr
;
priv
->
noise
=
prxpd
->
nf
;
/* Marvell rate index has a hole at value 4 */
/* Marvell rate index has a hole at value 4 */
if
(
prxpd
->
rx_rate
>
4
)
if
(
prxpd
->
rx_rate
>
4
)
--
prxpd
->
rx_rate
;
--
prxpd
->
rx_rate
;
...
...
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