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
nexedi
linux
Commits
7ac3b025
Commit
7ac3b025
authored
Jun 27, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
parents
3e3cda96
66b5004d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
115 additions
and
70 deletions
+115
-70
drivers/net/wireless/b43/leds.c
drivers/net/wireless/b43/leds.c
+3
-0
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c
+8
-4
drivers/net/wireless/b43legacy/dma.c
drivers/net/wireless/b43legacy/dma.c
+1
-1
drivers/net/wireless/b43legacy/main.c
drivers/net/wireless/b43legacy/main.c
+4
-2
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
+18
-15
drivers/net/wireless/iwlwifi/iwl4965-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c
+21
-18
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2500usb.c
+21
-15
drivers/net/wireless/rt2x00/rt73usb.c
drivers/net/wireless/rt2x00/rt73usb.c
+21
-15
net/wireless/reg.c
net/wireless/reg.c
+18
-0
No files found.
drivers/net/wireless/b43/leds.c
View file @
7ac3b025
...
@@ -72,6 +72,9 @@ static void b43_led_brightness_set(struct led_classdev *led_dev,
...
@@ -72,6 +72,9 @@ static void b43_led_brightness_set(struct led_classdev *led_dev,
struct
b43_wldev
*
dev
=
led
->
dev
;
struct
b43_wldev
*
dev
=
led
->
dev
;
bool
radio_enabled
;
bool
radio_enabled
;
if
(
unlikely
(
b43_status
(
dev
)
<
B43_STAT_INITIALIZED
))
return
;
/* Checking the radio-enabled status here is slightly racy,
/* Checking the radio-enabled status here is slightly racy,
* but we want to avoid the locking overhead and we don't care
* but we want to avoid the locking overhead and we don't care
* whether the LED has the wrong state for a second. */
* whether the LED has the wrong state for a second. */
...
...
drivers/net/wireless/b43/main.c
View file @
7ac3b025
...
@@ -2883,12 +2883,11 @@ static int b43_op_tx(struct ieee80211_hw *hw,
...
@@ -2883,12 +2883,11 @@ static int b43_op_tx(struct ieee80211_hw *hw,
if
(
unlikely
(
skb
->
len
<
2
+
2
+
6
))
{
if
(
unlikely
(
skb
->
len
<
2
+
2
+
6
))
{
/* Too short, this can't be a valid frame. */
/* Too short, this can't be a valid frame. */
dev_kfree_skb_any
(
skb
);
goto
drop_packet
;
return
NETDEV_TX_OK
;
}
}
B43_WARN_ON
(
skb_shinfo
(
skb
)
->
nr_frags
);
B43_WARN_ON
(
skb_shinfo
(
skb
)
->
nr_frags
);
if
(
unlikely
(
!
dev
))
if
(
unlikely
(
!
dev
))
return
NETDEV_TX_BUSY
;
goto
drop_packet
;
/* Transmissions on seperate queues can run concurrently. */
/* Transmissions on seperate queues can run concurrently. */
read_lock_irqsave
(
&
wl
->
tx_lock
,
flags
);
read_lock_irqsave
(
&
wl
->
tx_lock
,
flags
);
...
@@ -2904,7 +2903,12 @@ static int b43_op_tx(struct ieee80211_hw *hw,
...
@@ -2904,7 +2903,12 @@ static int b43_op_tx(struct ieee80211_hw *hw,
read_unlock_irqrestore
(
&
wl
->
tx_lock
,
flags
);
read_unlock_irqrestore
(
&
wl
->
tx_lock
,
flags
);
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
return
NETDEV_TX_BUSY
;
goto
drop_packet
;
return
NETDEV_TX_OK
;
drop_packet:
/* We can not transmit this packet. Drop it. */
dev_kfree_skb_any
(
skb
);
return
NETDEV_TX_OK
;
return
NETDEV_TX_OK
;
}
}
...
...
drivers/net/wireless/b43legacy/dma.c
View file @
7ac3b025
...
@@ -876,6 +876,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
...
@@ -876,6 +876,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
if
(
!
ring
)
if
(
!
ring
)
goto
out
;
goto
out
;
ring
->
type
=
type
;
ring
->
type
=
type
;
ring
->
dev
=
dev
;
nr_slots
=
B43legacy_RXRING_SLOTS
;
nr_slots
=
B43legacy_RXRING_SLOTS
;
if
(
for_tx
)
if
(
for_tx
)
...
@@ -922,7 +923,6 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
...
@@ -922,7 +923,6 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
DMA_TO_DEVICE
);
DMA_TO_DEVICE
);
}
}
ring
->
dev
=
dev
;
ring
->
nr_slots
=
nr_slots
;
ring
->
nr_slots
=
nr_slots
;
ring
->
mmio_base
=
b43legacy_dmacontroller_base
(
type
,
controller_index
);
ring
->
mmio_base
=
b43legacy_dmacontroller_base
(
type
,
controller_index
);
ring
->
index
=
controller_index
;
ring
->
index
=
controller_index
;
...
...
drivers/net/wireless/b43legacy/main.c
View file @
7ac3b025
...
@@ -2378,8 +2378,10 @@ static int b43legacy_op_tx(struct ieee80211_hw *hw,
...
@@ -2378,8 +2378,10 @@ static int b43legacy_op_tx(struct ieee80211_hw *hw,
}
else
}
else
err
=
b43legacy_dma_tx
(
dev
,
skb
,
ctl
);
err
=
b43legacy_dma_tx
(
dev
,
skb
,
ctl
);
out:
out:
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
{
return
NETDEV_TX_BUSY
;
/* Drop the packet. */
dev_kfree_skb_any
(
skb
);
}
return
NETDEV_TX_OK
;
return
NETDEV_TX_OK
;
}
}
...
...
drivers/net/wireless/iwlwifi/iwl3945-base.c
View file @
7ac3b025
...
@@ -2227,7 +2227,10 @@ static int iwl3945_scan_initiate(struct iwl3945_priv *priv)
...
@@ -2227,7 +2227,10 @@ static int iwl3945_scan_initiate(struct iwl3945_priv *priv)
}
}
IWL_DEBUG_INFO
(
"Starting scan...
\n
"
);
IWL_DEBUG_INFO
(
"Starting scan...
\n
"
);
priv
->
scan_bands
=
2
;
if
(
priv
->
cfg
->
sku
&
IWL_SKU_G
)
priv
->
scan_bands
|=
BIT
(
IEEE80211_BAND_2GHZ
);
if
(
priv
->
cfg
->
sku
&
IWL_SKU_A
)
priv
->
scan_bands
|=
BIT
(
IEEE80211_BAND_5GHZ
);
set_bit
(
STATUS_SCANNING
,
&
priv
->
status
);
set_bit
(
STATUS_SCANNING
,
&
priv
->
status
);
priv
->
scan_start
=
jiffies
;
priv
->
scan_start
=
jiffies
;
priv
->
scan_pass_start
=
priv
->
scan_start
;
priv
->
scan_pass_start
=
priv
->
scan_start
;
...
@@ -3352,13 +3355,18 @@ static void iwl3945_rx_scan_complete_notif(struct iwl3945_priv *priv,
...
@@ -3352,13 +3355,18 @@ static void iwl3945_rx_scan_complete_notif(struct iwl3945_priv *priv,
cancel_delayed_work
(
&
priv
->
scan_check
);
cancel_delayed_work
(
&
priv
->
scan_check
);
IWL_DEBUG_INFO
(
"Scan pass on %sGHz took %dms
\n
"
,
IWL_DEBUG_INFO
(
"Scan pass on %sGHz took %dms
\n
"
,
(
priv
->
scan_bands
==
2
)
?
"2.4"
:
"5.2"
,
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_2GHZ
))
?
"2.4"
:
"5.2"
,
jiffies_to_msecs
(
elapsed_jiffies
jiffies_to_msecs
(
elapsed_jiffies
(
priv
->
scan_pass_start
,
jiffies
)));
(
priv
->
scan_pass_start
,
jiffies
)));
/* Remove this scanned band from the list
/* Remove this scanned band from the list of pending
* of pending bands to scan */
* bands to scan, band G precedes A in order of scanning
priv
->
scan_bands
--
;
* as seen in iwl3945_bg_request_scan */
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_2GHZ
))
priv
->
scan_bands
&=
~
BIT
(
IEEE80211_BAND_2GHZ
);
else
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_5GHZ
))
priv
->
scan_bands
&=
~
BIT
(
IEEE80211_BAND_5GHZ
);
/* If a request to abort was given, or the scan did not succeed
/* If a request to abort was given, or the scan did not succeed
* then we reset the scan state machine and terminate,
* then we reset the scan state machine and terminate,
...
@@ -4972,7 +4980,7 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
...
@@ -4972,7 +4980,7 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
ch_info
=
iwl3945_get_channel_info
(
priv
,
band
,
scan_ch
->
channel
);
ch_info
=
iwl3945_get_channel_info
(
priv
,
band
,
scan_ch
->
channel
);
if
(
!
is_channel_valid
(
ch_info
))
{
if
(
!
is_channel_valid
(
ch_info
))
{
IWL_DEBUG_SCAN
(
"Channel %d is INVALID for this
SKU
.
\n
"
,
IWL_DEBUG_SCAN
(
"Channel %d is INVALID for this
band
.
\n
"
,
scan_ch
->
channel
);
scan_ch
->
channel
);
continue
;
continue
;
}
}
...
@@ -6315,21 +6323,16 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
...
@@ -6315,21 +6323,16 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
/* flags + rate selection */
/* flags + rate selection */
switch
(
priv
->
scan_bands
)
{
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_2GHZ
))
{
case
2
:
scan
->
flags
=
RXON_FLG_BAND_24G_MSK
|
RXON_FLG_AUTO_DETECT_MSK
;
scan
->
flags
=
RXON_FLG_BAND_24G_MSK
|
RXON_FLG_AUTO_DETECT_MSK
;
scan
->
tx_cmd
.
rate
=
IWL_RATE_1M_PLCP
;
scan
->
tx_cmd
.
rate
=
IWL_RATE_1M_PLCP
;
scan
->
good_CRC_th
=
0
;
scan
->
good_CRC_th
=
0
;
band
=
IEEE80211_BAND_2GHZ
;
band
=
IEEE80211_BAND_2GHZ
;
break
;
}
else
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_5GHZ
))
{
case
1
:
scan
->
tx_cmd
.
rate
=
IWL_RATE_6M_PLCP
;
scan
->
tx_cmd
.
rate
=
IWL_RATE_6M_PLCP
;
scan
->
good_CRC_th
=
IWL_GOOD_CRC_TH
;
scan
->
good_CRC_th
=
IWL_GOOD_CRC_TH
;
band
=
IEEE80211_BAND_5GHZ
;
band
=
IEEE80211_BAND_5GHZ
;
break
;
}
else
{
default:
IWL_WARNING
(
"Invalid scan band count
\n
"
);
IWL_WARNING
(
"Invalid scan band count
\n
"
);
goto
done
;
goto
done
;
}
}
...
@@ -6770,7 +6773,7 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
...
@@ -6770,7 +6773,7 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
ch_info
=
iwl3945_get_channel_info
(
priv
,
conf
->
channel
->
band
,
ch_info
=
iwl3945_get_channel_info
(
priv
,
conf
->
channel
->
band
,
conf
->
channel
->
hw_value
);
conf
->
channel
->
hw_value
);
if
(
!
is_channel_valid
(
ch_info
))
{
if
(
!
is_channel_valid
(
ch_info
))
{
IWL_DEBUG_SCAN
(
"Channel %d [%d] is INVALID for this
SKU
.
\n
"
,
IWL_DEBUG_SCAN
(
"Channel %d [%d] is INVALID for this
band
.
\n
"
,
conf
->
channel
->
hw_value
,
conf
->
channel
->
band
);
conf
->
channel
->
hw_value
,
conf
->
channel
->
band
);
IWL_DEBUG_MAC80211
(
"leave - invalid channel
\n
"
);
IWL_DEBUG_MAC80211
(
"leave - invalid channel
\n
"
);
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
...
...
drivers/net/wireless/iwlwifi/iwl4965-base.c
View file @
7ac3b025
...
@@ -1774,7 +1774,10 @@ static int iwl4965_scan_initiate(struct iwl_priv *priv)
...
@@ -1774,7 +1774,10 @@ static int iwl4965_scan_initiate(struct iwl_priv *priv)
}
}
IWL_DEBUG_INFO
(
"Starting scan...
\n
"
);
IWL_DEBUG_INFO
(
"Starting scan...
\n
"
);
priv
->
scan_bands
=
2
;
if
(
priv
->
cfg
->
sku
&
IWL_SKU_G
)
priv
->
scan_bands
|=
BIT
(
IEEE80211_BAND_2GHZ
);
if
(
priv
->
cfg
->
sku
&
IWL_SKU_A
)
priv
->
scan_bands
|=
BIT
(
IEEE80211_BAND_5GHZ
);
set_bit
(
STATUS_SCANNING
,
&
priv
->
status
);
set_bit
(
STATUS_SCANNING
,
&
priv
->
status
);
priv
->
scan_start
=
jiffies
;
priv
->
scan_start
=
jiffies
;
priv
->
scan_pass_start
=
priv
->
scan_start
;
priv
->
scan_pass_start
=
priv
->
scan_start
;
...
@@ -3023,8 +3026,9 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
...
@@ -3023,8 +3026,9 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
IWL_DEBUG_TX_REPLY
(
"Tx queue reclaim %d
\n
"
,
index
);
IWL_DEBUG_TX_REPLY
(
"Tx queue reclaim %d
\n
"
,
index
);
if
(
index
!=
-
1
)
{
if
(
index
!=
-
1
)
{
int
freed
=
iwl4965_tx_queue_reclaim
(
priv
,
txq_id
,
index
);
#ifdef CONFIG_IWL4965_HT
#ifdef CONFIG_IWL4965_HT
int
freed
=
iwl4965_tx_queue_reclaim
(
priv
,
txq_id
,
index
);
if
(
tid
!=
MAX_TID_COUNT
)
if
(
tid
!=
MAX_TID_COUNT
)
priv
->
stations
[
sta_id
].
tid
[
tid
].
tfds_in_queue
-=
freed
;
priv
->
stations
[
sta_id
].
tid
[
tid
].
tfds_in_queue
-=
freed
;
if
(
iwl4965_queue_space
(
&
txq
->
q
)
>
txq
->
q
.
low_mark
&&
if
(
iwl4965_queue_space
(
&
txq
->
q
)
>
txq
->
q
.
low_mark
&&
...
@@ -3276,13 +3280,18 @@ static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
...
@@ -3276,13 +3280,18 @@ static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
cancel_delayed_work
(
&
priv
->
scan_check
);
cancel_delayed_work
(
&
priv
->
scan_check
);
IWL_DEBUG_INFO
(
"Scan pass on %sGHz took %dms
\n
"
,
IWL_DEBUG_INFO
(
"Scan pass on %sGHz took %dms
\n
"
,
(
priv
->
scan_bands
==
2
)
?
"2.4"
:
"5.2"
,
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_2GHZ
))
?
"2.4"
:
"5.2"
,
jiffies_to_msecs
(
elapsed_jiffies
jiffies_to_msecs
(
elapsed_jiffies
(
priv
->
scan_pass_start
,
jiffies
)));
(
priv
->
scan_pass_start
,
jiffies
)));
/* Remove this scanned band from the list
/* Remove this scanned band from the list of pending
* of pending bands to scan */
* bands to scan, band G precedes A in order of scanning
priv
->
scan_bands
--
;
* as seen in iwl_bg_request_scan */
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_2GHZ
))
priv
->
scan_bands
&=
~
BIT
(
IEEE80211_BAND_2GHZ
);
else
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_5GHZ
))
priv
->
scan_bands
&=
~
BIT
(
IEEE80211_BAND_5GHZ
);
/* If a request to abort was given, or the scan did not succeed
/* If a request to abort was given, or the scan did not succeed
* then we reset the scan state machine and terminate,
* then we reset the scan state machine and terminate,
...
@@ -3292,7 +3301,7 @@ static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
...
@@ -3292,7 +3301,7 @@ static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
clear_bit
(
STATUS_SCAN_ABORTING
,
&
priv
->
status
);
clear_bit
(
STATUS_SCAN_ABORTING
,
&
priv
->
status
);
}
else
{
}
else
{
/* If there are more bands on this scan pass reschedule */
/* If there are more bands on this scan pass reschedule */
if
(
priv
->
scan_bands
>
0
)
if
(
priv
->
scan_bands
)
goto
reschedule
;
goto
reschedule
;
}
}
...
@@ -4635,10 +4644,9 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
...
@@ -4635,10 +4644,9 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
scan_ch
->
channel
=
ieee80211_frequency_to_channel
(
channels
[
i
].
center_freq
);
scan_ch
->
channel
=
ieee80211_frequency_to_channel
(
channels
[
i
].
center_freq
);
ch_info
=
iwl_get_channel_info
(
priv
,
band
,
ch_info
=
iwl_get_channel_info
(
priv
,
band
,
scan_ch
->
channel
);
scan_ch
->
channel
);
if
(
!
is_channel_valid
(
ch_info
))
{
if
(
!
is_channel_valid
(
ch_info
))
{
IWL_DEBUG_SCAN
(
"Channel %d is INVALID for this
SKU
.
\n
"
,
IWL_DEBUG_SCAN
(
"Channel %d is INVALID for this
band
.
\n
"
,
scan_ch
->
channel
);
scan_ch
->
channel
);
continue
;
continue
;
}
}
...
@@ -5830,8 +5838,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
...
@@ -5830,8 +5838,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
scan
->
tx_cmd
.
stop_time
.
life_time
=
TX_CMD_LIFE_TIME_INFINITE
;
scan
->
tx_cmd
.
stop_time
.
life_time
=
TX_CMD_LIFE_TIME_INFINITE
;
switch
(
priv
->
scan_bands
)
{
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_2GHZ
))
{
case
2
:
scan
->
flags
=
RXON_FLG_BAND_24G_MSK
|
RXON_FLG_AUTO_DETECT_MSK
;
scan
->
flags
=
RXON_FLG_BAND_24G_MSK
|
RXON_FLG_AUTO_DETECT_MSK
;
scan
->
tx_cmd
.
rate_n_flags
=
scan
->
tx_cmd
.
rate_n_flags
=
iwl4965_hw_set_rate_n_flags
(
IWL_RATE_1M_PLCP
,
iwl4965_hw_set_rate_n_flags
(
IWL_RATE_1M_PLCP
,
...
@@ -5839,17 +5846,13 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
...
@@ -5839,17 +5846,13 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
scan
->
good_CRC_th
=
0
;
scan
->
good_CRC_th
=
0
;
band
=
IEEE80211_BAND_2GHZ
;
band
=
IEEE80211_BAND_2GHZ
;
break
;
}
else
if
(
priv
->
scan_bands
&
BIT
(
IEEE80211_BAND_5GHZ
))
{
case
1
:
scan
->
tx_cmd
.
rate_n_flags
=
scan
->
tx_cmd
.
rate_n_flags
=
iwl4965_hw_set_rate_n_flags
(
IWL_RATE_6M_PLCP
,
iwl4965_hw_set_rate_n_flags
(
IWL_RATE_6M_PLCP
,
RATE_MCS_ANT_B_MSK
);
RATE_MCS_ANT_B_MSK
);
scan
->
good_CRC_th
=
IWL_GOOD_CRC_TH
;
scan
->
good_CRC_th
=
IWL_GOOD_CRC_TH
;
band
=
IEEE80211_BAND_5GHZ
;
band
=
IEEE80211_BAND_5GHZ
;
break
;
}
else
{
default:
IWL_WARNING
(
"Invalid scan band count
\n
"
);
IWL_WARNING
(
"Invalid scan band count
\n
"
);
goto
done
;
goto
done
;
}
}
...
...
drivers/net/wireless/rt2x00/rt2500usb.c
View file @
7ac3b025
...
@@ -138,11 +138,8 @@ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
...
@@ -138,11 +138,8 @@ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
* Wait until the BBP becomes ready.
* Wait until the BBP becomes ready.
*/
*/
reg
=
rt2500usb_bbp_check
(
rt2x00dev
);
reg
=
rt2500usb_bbp_check
(
rt2x00dev
);
if
(
rt2x00_get_field16
(
reg
,
PHY_CSR8_BUSY
))
{
if
(
rt2x00_get_field16
(
reg
,
PHY_CSR8_BUSY
))
ERROR
(
rt2x00dev
,
"PHY_CSR8 register busy. Write failed.
\n
"
);
goto
exit_fail
;
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
}
/*
/*
* Write the data into the BBP.
* Write the data into the BBP.
...
@@ -155,6 +152,13 @@ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
...
@@ -155,6 +152,13 @@ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
rt2500usb_register_write_lock
(
rt2x00dev
,
PHY_CSR7
,
reg
);
rt2500usb_register_write_lock
(
rt2x00dev
,
PHY_CSR7
,
reg
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
exit_fail:
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
ERROR
(
rt2x00dev
,
"PHY_CSR8 register busy. Write failed.
\n
"
);
}
}
static
void
rt2500usb_bbp_read
(
struct
rt2x00_dev
*
rt2x00dev
,
static
void
rt2500usb_bbp_read
(
struct
rt2x00_dev
*
rt2x00dev
,
...
@@ -168,10 +172,8 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
...
@@ -168,10 +172,8 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
* Wait until the BBP becomes ready.
* Wait until the BBP becomes ready.
*/
*/
reg
=
rt2500usb_bbp_check
(
rt2x00dev
);
reg
=
rt2500usb_bbp_check
(
rt2x00dev
);
if
(
rt2x00_get_field16
(
reg
,
PHY_CSR8_BUSY
))
{
if
(
rt2x00_get_field16
(
reg
,
PHY_CSR8_BUSY
))
ERROR
(
rt2x00dev
,
"PHY_CSR8 register busy. Read failed.
\n
"
);
goto
exit_fail
;
return
;
}
/*
/*
* Write the request into the BBP.
* Write the request into the BBP.
...
@@ -186,17 +188,21 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
...
@@ -186,17 +188,21 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
* Wait until the BBP becomes ready.
* Wait until the BBP becomes ready.
*/
*/
reg
=
rt2500usb_bbp_check
(
rt2x00dev
);
reg
=
rt2500usb_bbp_check
(
rt2x00dev
);
if
(
rt2x00_get_field16
(
reg
,
PHY_CSR8_BUSY
))
{
if
(
rt2x00_get_field16
(
reg
,
PHY_CSR8_BUSY
))
ERROR
(
rt2x00dev
,
"PHY_CSR8 register busy. Read failed.
\n
"
);
goto
exit_fail
;
*
value
=
0xff
;
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
}
rt2500usb_register_read_lock
(
rt2x00dev
,
PHY_CSR7
,
&
reg
);
rt2500usb_register_read_lock
(
rt2x00dev
,
PHY_CSR7
,
&
reg
);
*
value
=
rt2x00_get_field16
(
reg
,
PHY_CSR7_DATA
);
*
value
=
rt2x00_get_field16
(
reg
,
PHY_CSR7_DATA
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
exit_fail:
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
ERROR
(
rt2x00dev
,
"PHY_CSR8 register busy. Read failed.
\n
"
);
*
value
=
0xff
;
}
}
static
void
rt2500usb_rf_write
(
struct
rt2x00_dev
*
rt2x00dev
,
static
void
rt2500usb_rf_write
(
struct
rt2x00_dev
*
rt2x00dev
,
...
...
drivers/net/wireless/rt2x00/rt73usb.c
View file @
7ac3b025
...
@@ -134,11 +134,8 @@ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
...
@@ -134,11 +134,8 @@ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
* Wait until the BBP becomes ready.
* Wait until the BBP becomes ready.
*/
*/
reg
=
rt73usb_bbp_check
(
rt2x00dev
);
reg
=
rt73usb_bbp_check
(
rt2x00dev
);
if
(
rt2x00_get_field32
(
reg
,
PHY_CSR3_BUSY
))
{
if
(
rt2x00_get_field32
(
reg
,
PHY_CSR3_BUSY
))
ERROR
(
rt2x00dev
,
"PHY_CSR3 register busy. Write failed.
\n
"
);
goto
exit_fail
;
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
}
/*
/*
* Write the data into the BBP.
* Write the data into the BBP.
...
@@ -151,6 +148,13 @@ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
...
@@ -151,6 +148,13 @@ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
rt73usb_register_write_lock
(
rt2x00dev
,
PHY_CSR3
,
reg
);
rt73usb_register_write_lock
(
rt2x00dev
,
PHY_CSR3
,
reg
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
exit_fail:
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
ERROR
(
rt2x00dev
,
"PHY_CSR3 register busy. Write failed.
\n
"
);
}
}
static
void
rt73usb_bbp_read
(
struct
rt2x00_dev
*
rt2x00dev
,
static
void
rt73usb_bbp_read
(
struct
rt2x00_dev
*
rt2x00dev
,
...
@@ -164,11 +168,8 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
...
@@ -164,11 +168,8 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
* Wait until the BBP becomes ready.
* Wait until the BBP becomes ready.
*/
*/
reg
=
rt73usb_bbp_check
(
rt2x00dev
);
reg
=
rt73usb_bbp_check
(
rt2x00dev
);
if
(
rt2x00_get_field32
(
reg
,
PHY_CSR3_BUSY
))
{
if
(
rt2x00_get_field32
(
reg
,
PHY_CSR3_BUSY
))
ERROR
(
rt2x00dev
,
"PHY_CSR3 register busy. Read failed.
\n
"
);
goto
exit_fail
;
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
}
/*
/*
* Write the request into the BBP.
* Write the request into the BBP.
...
@@ -184,14 +185,19 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
...
@@ -184,14 +185,19 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
* Wait until the BBP becomes ready.
* Wait until the BBP becomes ready.
*/
*/
reg
=
rt73usb_bbp_check
(
rt2x00dev
);
reg
=
rt73usb_bbp_check
(
rt2x00dev
);
if
(
rt2x00_get_field32
(
reg
,
PHY_CSR3_BUSY
))
{
if
(
rt2x00_get_field32
(
reg
,
PHY_CSR3_BUSY
))
ERROR
(
rt2x00dev
,
"PHY_CSR3 register busy. Read failed.
\n
"
);
goto
exit_fail
;
*
value
=
0xff
;
return
;
}
*
value
=
rt2x00_get_field32
(
reg
,
PHY_CSR3_VALUE
);
*
value
=
rt2x00_get_field32
(
reg
,
PHY_CSR3_VALUE
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
return
;
exit_fail:
mutex_unlock
(
&
rt2x00dev
->
usb_cache_mutex
);
ERROR
(
rt2x00dev
,
"PHY_CSR3 register busy. Read failed.
\n
"
);
*
value
=
0xff
;
}
}
static
void
rt73usb_rf_write
(
struct
rt2x00_dev
*
rt2x00dev
,
static
void
rt73usb_rf_write
(
struct
rt2x00_dev
*
rt2x00dev
,
...
...
net/wireless/reg.c
View file @
7ac3b025
...
@@ -80,6 +80,23 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = {
...
@@ -80,6 +80,23 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = {
IEEE80211_CHAN_RADAR
),
IEEE80211_CHAN_RADAR
),
};
};
static
const
struct
ieee80211_channel_range
ieee80211_EU_channels
[]
=
{
/* IEEE 802.11b/g, channels 1..13 */
RANGE_PWR
(
2412
,
2472
,
20
,
6
,
0
),
/* IEEE 802.11a, channel 36*/
RANGE_PWR
(
5180
,
5180
,
23
,
6
,
IEEE80211_CHAN_PASSIVE_SCAN
),
/* IEEE 802.11a, channel 40*/
RANGE_PWR
(
5200
,
5200
,
23
,
6
,
IEEE80211_CHAN_PASSIVE_SCAN
),
/* IEEE 802.11a, channel 44*/
RANGE_PWR
(
5220
,
5220
,
23
,
6
,
IEEE80211_CHAN_PASSIVE_SCAN
),
/* IEEE 802.11a, channels 48..64 */
RANGE_PWR
(
5240
,
5320
,
23
,
6
,
IEEE80211_CHAN_NO_IBSS
|
IEEE80211_CHAN_RADAR
),
/* IEEE 802.11a, channels 100..140 */
RANGE_PWR
(
5500
,
5700
,
30
,
6
,
IEEE80211_CHAN_NO_IBSS
|
IEEE80211_CHAN_RADAR
),
};
#define REGDOM(_code) \
#define REGDOM(_code) \
{ \
{ \
.code = __stringify(_code), \
.code = __stringify(_code), \
...
@@ -90,6 +107,7 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = {
...
@@ -90,6 +107,7 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = {
static
const
struct
ieee80211_regdomain
ieee80211_regdoms
[]
=
{
static
const
struct
ieee80211_regdomain
ieee80211_regdoms
[]
=
{
REGDOM
(
US
),
REGDOM
(
US
),
REGDOM
(
JP
),
REGDOM
(
JP
),
REGDOM
(
EU
),
};
};
...
...
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