Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5be13340
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5be13340
编写于
8月 03, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-davem' of
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
上级
f2c31e32
a5d5a914
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
85 addition
and
41 deletion
+85
-41
drivers/net/wireless/ath/ath9k/ar9002_hw.c
drivers/net/wireless/ath/ath9k/ar9002_hw.c
+1
-5
drivers/net/wireless/ath/ath9k/ar9003_hw.c
drivers/net/wireless/ath/ath9k/ar9003_hw.c
+1
-5
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.c
+9
-2
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/hw.h
+2
-1
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/init.c
+2
-0
drivers/net/wireless/ath/ath9k/pci.c
drivers/net/wireless/ath/ath9k/pci.c
+27
-0
drivers/net/wireless/iwlegacy/iwl-3945.c
drivers/net/wireless/iwlegacy/iwl-3945.c
+5
-1
drivers/net/wireless/iwlegacy/iwl-4965.c
drivers/net/wireless/iwlegacy/iwl-4965.c
+6
-2
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
+1
-0
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-core.h
+2
-0
drivers/net/wireless/iwlwifi/iwl-pci.c
drivers/net/wireless/iwlwifi/iwl-pci.c
+9
-9
drivers/net/wireless/iwlwifi/iwl-power.c
drivers/net/wireless/iwlwifi/iwl-power.c
+2
-1
drivers/net/wireless/rt2x00/rt2800lib.c
drivers/net/wireless/rt2x00/rt2800lib.c
+1
-2
drivers/net/wireless/rt2x00/rt2x00lib.h
drivers/net/wireless/rt2x00/rt2x00lib.h
+2
-1
drivers/net/wireless/rt2x00/rt2x00mac.c
drivers/net/wireless/rt2x00/rt2x00mac.c
+3
-2
drivers/net/wireless/rtlwifi/pci.c
drivers/net/wireless/rtlwifi/pci.c
+11
-9
net/wireless/nl80211.c
net/wireless/nl80211.c
+1
-1
未找到文件。
drivers/net/wireless/ath/ath9k/ar9002_hw.c
浏览文件 @
5be13340
...
...
@@ -309,11 +309,7 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
u8
i
;
u32
val
;
if
(
ah
->
is_pciexpress
!=
true
)
return
;
/* Do not touch SerDes registers */
if
(
ah
->
config
.
pcie_powersave_enable
==
2
)
if
(
ah
->
is_pciexpress
!=
true
||
ah
->
aspm_enabled
!=
true
)
return
;
/* Nothing to do on restore for 11N */
...
...
drivers/net/wireless/ath/ath9k/ar9003_hw.c
浏览文件 @
5be13340
...
...
@@ -519,11 +519,7 @@ static void ar9003_hw_configpcipowersave(struct ath_hw *ah,
int
restore
,
int
power_off
)
{
if
(
ah
->
is_pciexpress
!=
true
)
return
;
/* Do not touch SerDes registers */
if
(
ah
->
config
.
pcie_powersave_enable
==
2
)
if
(
ah
->
is_pciexpress
!=
true
||
ah
->
aspm_enabled
!=
true
)
return
;
/* Nothing to do on restore for 11N */
...
...
drivers/net/wireless/ath/ath9k/hw.c
浏览文件 @
5be13340
...
...
@@ -318,6 +318,14 @@ static void ath9k_hw_disablepcie(struct ath_hw *ah)
REG_WRITE
(
ah
,
AR_PCIE_SERDES2
,
0x00000000
);
}
static
void
ath9k_hw_aspm_init
(
struct
ath_hw
*
ah
)
{
struct
ath_common
*
common
=
ath9k_hw_common
(
ah
);
if
(
common
->
bus_ops
->
aspm_init
)
common
->
bus_ops
->
aspm_init
(
common
);
}
/* This should work for all families including legacy */
static
bool
ath9k_hw_chip_test
(
struct
ath_hw
*
ah
)
{
...
...
@@ -378,7 +386,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
ah
->
config
.
additional_swba_backoff
=
0
;
ah
->
config
.
ack_6mb
=
0x0
;
ah
->
config
.
cwm_ignore_extcca
=
0
;
ah
->
config
.
pcie_powersave_enable
=
0
;
ah
->
config
.
pcie_clock_req
=
0
;
ah
->
config
.
pcie_waen
=
0
;
ah
->
config
.
analog_shiftreg
=
1
;
...
...
@@ -598,7 +605,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
if
(
ah
->
is_pciexpress
)
ath9k_hw_
configpcipowersave
(
ah
,
0
,
0
);
ath9k_hw_
aspm_init
(
ah
);
else
ath9k_hw_disablepcie
(
ah
);
...
...
drivers/net/wireless/ath/ath9k/hw.h
浏览文件 @
5be13340
...
...
@@ -219,7 +219,6 @@ struct ath9k_ops_config {
int
additional_swba_backoff
;
int
ack_6mb
;
u32
cwm_ignore_extcca
;
u8
pcie_powersave_enable
;
bool
pcieSerDesWrite
;
u8
pcie_clock_req
;
u32
pcie_waen
;
...
...
@@ -673,6 +672,7 @@ struct ath_hw {
bool
sw_mgmt_crypto
;
bool
is_pciexpress
;
bool
aspm_enabled
;
bool
is_monitoring
;
bool
need_an_top2_fixup
;
u16
tx_trig_level
;
...
...
@@ -874,6 +874,7 @@ struct ath_bus_ops {
bool
(
*
eeprom_read
)(
struct
ath_common
*
common
,
u32
off
,
u16
*
data
);
void
(
*
bt_coex_prep
)(
struct
ath_common
*
common
);
void
(
*
extn_synch_en
)(
struct
ath_common
*
common
);
void
(
*
aspm_init
)(
struct
ath_common
*
common
);
};
static
inline
struct
ath_common
*
ath9k_hw_common
(
struct
ath_hw
*
ah
)
...
...
drivers/net/wireless/ath/ath9k/init.c
浏览文件 @
5be13340
...
...
@@ -670,8 +670,10 @@ static void ath9k_init_band_txpower(struct ath_softc *sc, int band)
static
void
ath9k_init_txpower_limits
(
struct
ath_softc
*
sc
)
{
struct
ath_hw
*
ah
=
sc
->
sc_ah
;
struct
ath_common
*
common
=
ath9k_hw_common
(
sc
->
sc_ah
);
struct
ath9k_channel
*
curchan
=
ah
->
curchan
;
ah
->
txchainmask
=
common
->
tx_chainmask
;
if
(
ah
->
caps
.
hw_caps
&
ATH9K_HW_CAP_2GHZ
)
ath9k_init_band_txpower
(
sc
,
IEEE80211_BAND_2GHZ
);
if
(
ah
->
caps
.
hw_caps
&
ATH9K_HW_CAP_5GHZ
)
...
...
drivers/net/wireless/ath/ath9k/pci.c
浏览文件 @
5be13340
...
...
@@ -16,6 +16,7 @@
#include <linux/nl80211.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/ath9k_platform.h>
#include "ath9k.h"
...
...
@@ -115,12 +116,38 @@ static void ath_pci_extn_synch_enable(struct ath_common *common)
pci_write_config_byte
(
pdev
,
sc
->
sc_ah
->
caps
.
pcie_lcr_offset
,
lnkctl
);
}
static
void
ath_pci_aspm_init
(
struct
ath_common
*
common
)
{
struct
ath_softc
*
sc
=
(
struct
ath_softc
*
)
common
->
priv
;
struct
ath_hw
*
ah
=
sc
->
sc_ah
;
struct
pci_dev
*
pdev
=
to_pci_dev
(
sc
->
dev
);
struct
pci_dev
*
parent
;
int
pos
;
u8
aspm
;
if
(
!
pci_is_pcie
(
pdev
))
return
;
parent
=
pdev
->
bus
->
self
;
if
(
WARN_ON
(
!
parent
))
return
;
pos
=
pci_pcie_cap
(
parent
);
pci_read_config_byte
(
parent
,
pos
+
PCI_EXP_LNKCTL
,
&
aspm
);
if
(
aspm
&
(
PCIE_LINK_STATE_L0S
|
PCIE_LINK_STATE_L1
))
{
ah
->
aspm_enabled
=
true
;
/* Initialize PCIe PM and SERDES registers. */
ath9k_hw_configpcipowersave
(
ah
,
0
,
0
);
}
}
static
const
struct
ath_bus_ops
ath_pci_bus_ops
=
{
.
ath_bus_type
=
ATH_PCI
,
.
read_cachesize
=
ath_pci_read_cachesize
,
.
eeprom_read
=
ath_pci_eeprom_read
,
.
bt_coex_prep
=
ath_pci_bt_coex_prep
,
.
extn_synch_en
=
ath_pci_extn_synch_enable
,
.
aspm_init
=
ath_pci_aspm_init
,
};
static
int
ath_pci_probe
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
id
)
...
...
drivers/net/wireless/iwlegacy/iwl-3945.c
浏览文件 @
5be13340
...
...
@@ -1746,7 +1746,11 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
}
memcpy
(
active_rxon
,
staging_rxon
,
sizeof
(
*
active_rxon
));
/*
* We do not commit tx power settings while channel changing,
* do it now if tx power changed.
*/
iwl_legacy_set_tx_power
(
priv
,
priv
->
tx_power_next
,
false
);
return
0
;
}
...
...
drivers/net/wireless/iwlegacy/iwl-4965.c
浏览文件 @
5be13340
...
...
@@ -1235,7 +1235,12 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c
memcpy
(
active_rxon
,
&
ctx
->
staging
,
sizeof
(
*
active_rxon
));
iwl_legacy_print_rx_config_cmd
(
priv
,
ctx
);
goto
set_tx_power
;
/*
* We do not commit tx power settings while channel changing,
* do it now if tx power changed.
*/
iwl_legacy_set_tx_power
(
priv
,
priv
->
tx_power_next
,
false
);
return
0
;
}
/* If we are currently associated and the new config requires
...
...
@@ -1315,7 +1320,6 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c
iwl4965_init_sensitivity
(
priv
);
set_tx_power:
/* If we issue a new RXON command which required a tune then we must
* send a new TXPOWER command or we won't be able to Tx any frames */
ret
=
iwl_legacy_set_tx_power
(
priv
,
priv
->
tx_power_next
,
true
);
...
...
drivers/net/wireless/iwlwifi/iwl-5000.c
浏览文件 @
5be13340
...
...
@@ -365,6 +365,7 @@ static struct iwl_base_params iwl5000_base_params = {
.
chain_noise_scale
=
1000
,
.
wd_timeout
=
IWL_LONG_WD_TIMEOUT
,
.
max_event_log_size
=
512
,
.
no_idle_support
=
true
,
};
static
struct
iwl_ht_params
iwl5000_ht_params
=
{
.
ht_greenfield_support
=
true
,
...
...
drivers/net/wireless/iwlwifi/iwl-core.h
浏览文件 @
5be13340
...
...
@@ -135,6 +135,7 @@ struct iwl_mod_params {
* @temperature_kelvin: temperature report by uCode in kelvin
* @max_event_log_size: size of event log buffer size for ucode event logging
* @shadow_reg_enable: HW shadhow register bit
* @no_idle_support: do not support idle mode
*/
struct
iwl_base_params
{
int
eeprom_size
;
...
...
@@ -156,6 +157,7 @@ struct iwl_base_params {
bool
temperature_kelvin
;
u32
max_event_log_size
;
const
bool
shadow_reg_enable
;
const
bool
no_idle_support
;
};
/*
* @advanced_bt_coexist: support advanced bt coexist
...
...
drivers/net/wireless/iwlwifi/iwl-pci.c
浏览文件 @
5be13340
...
...
@@ -134,6 +134,7 @@ static void iwl_pci_apm_config(struct iwl_bus *bus)
static
void
iwl_pci_set_drv_data
(
struct
iwl_bus
*
bus
,
void
*
drv_data
)
{
bus
->
drv_data
=
drv_data
;
pci_set_drvdata
(
IWL_BUS_GET_PCI_DEV
(
bus
),
drv_data
);
}
static
void
iwl_pci_get_hw_id
(
struct
iwl_bus
*
bus
,
char
buf
[],
...
...
@@ -454,8 +455,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_write_config_word
(
pdev
,
PCI_COMMAND
,
pci_cmd
);
}
pci_set_drvdata
(
pdev
,
bus
);
bus
->
dev
=
&
pdev
->
dev
;
bus
->
irq
=
pdev
->
irq
;
bus
->
ops
=
&
pci_ops
;
...
...
@@ -494,11 +493,12 @@ static void iwl_pci_down(struct iwl_bus *bus)
static
void
__devexit
iwl_pci_remove
(
struct
pci_dev
*
pdev
)
{
struct
iwl_bus
*
bus
=
pci_get_drvdata
(
pdev
);
struct
iwl_priv
*
priv
=
pci_get_drvdata
(
pdev
);
void
*
bus_specific
=
priv
->
bus
->
bus_specific
;
iwl_remove
(
bus
->
drv_data
);
iwl_remove
(
priv
);
iwl_pci_down
(
bus
);
iwl_pci_down
(
bus
_specific
);
}
#ifdef CONFIG_PM
...
...
@@ -506,20 +506,20 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
static
int
iwl_pci_suspend
(
struct
device
*
device
)
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
device
);
struct
iwl_
bus
*
bus
=
pci_get_drvdata
(
pdev
);
struct
iwl_
priv
*
priv
=
pci_get_drvdata
(
pdev
);
/* Before you put code here, think about WoWLAN. You cannot check here
* whether WoWLAN is enabled or not, and your code will run even if
* WoWLAN is enabled - don't kill the NIC, someone may need it in Sx.
*/
return
iwl_suspend
(
bus
->
drv_data
);
return
iwl_suspend
(
priv
);
}
static
int
iwl_pci_resume
(
struct
device
*
device
)
{
struct
pci_dev
*
pdev
=
to_pci_dev
(
device
);
struct
iwl_
bus
*
bus
=
pci_get_drvdata
(
pdev
);
struct
iwl_
priv
*
priv
=
pci_get_drvdata
(
pdev
);
/* Before you put code here, think about WoWLAN. You cannot check here
* whether WoWLAN is enabled or not, and your code will run even if
...
...
@@ -532,7 +532,7 @@ static int iwl_pci_resume(struct device *device)
*/
pci_write_config_byte
(
pdev
,
PCI_CFG_RETRY_TIMEOUT
,
0x00
);
return
iwl_resume
(
bus
->
drv_data
);
return
iwl_resume
(
priv
);
}
static
SIMPLE_DEV_PM_OPS
(
iwl_dev_pm_ops
,
iwl_pci_suspend
,
iwl_pci_resume
);
...
...
drivers/net/wireless/iwlwifi/iwl-power.c
浏览文件 @
5be13340
...
...
@@ -349,7 +349,8 @@ static void iwl_power_build_cmd(struct iwl_priv *priv,
if
(
priv
->
wowlan
)
iwl_static_sleep_cmd
(
priv
,
cmd
,
IWL_POWER_INDEX_5
,
dtimper
);
else
if
(
priv
->
hw
->
conf
.
flags
&
IEEE80211_CONF_IDLE
)
else
if
(
!
priv
->
cfg
->
base_params
->
no_idle_support
&&
priv
->
hw
->
conf
.
flags
&
IEEE80211_CONF_IDLE
)
iwl_static_sleep_cmd
(
priv
,
cmd
,
IWL_POWER_INDEX_5
,
20
);
else
if
(
iwl_tt_is_low_power_state
(
priv
))
{
/* in thermal throttling low power state */
...
...
drivers/net/wireless/rt2x00/rt2800lib.c
浏览文件 @
5be13340
...
...
@@ -703,8 +703,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
/*
* Add space for the TXWI in front of the skb.
*/
skb_push
(
entry
->
skb
,
TXWI_DESC_SIZE
);
memset
(
entry
->
skb
,
0
,
TXWI_DESC_SIZE
);
memset
(
skb_push
(
entry
->
skb
,
TXWI_DESC_SIZE
),
0
,
TXWI_DESC_SIZE
);
/*
* Register descriptor details in skb frame descriptor.
...
...
drivers/net/wireless/rt2x00/rt2x00lib.h
浏览文件 @
5be13340
...
...
@@ -355,7 +355,8 @@ static inline enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *
return
CIPHER_NONE
;
}
static
inline
void
rt2x00crypto_create_tx_descriptor
(
struct
queue_entry
*
entry
,
static
inline
void
rt2x00crypto_create_tx_descriptor
(
struct
rt2x00_dev
*
rt2x00dev
,
struct
sk_buff
*
skb
,
struct
txentry_desc
*
txdesc
)
{
}
...
...
drivers/net/wireless/rt2x00/rt2x00mac.c
浏览文件 @
5be13340
...
...
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
* due to possible race conditions in mac80211.
*/
if
(
!
test_bit
(
DEVICE_STATE_PRESENT
,
&
rt2x00dev
->
flags
))
goto
exit_f
ail
;
goto
exit_f
ree_skb
;
/*
* Use the ATIM queue if appropriate and present.
...
...
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
ERROR
(
rt2x00dev
,
"Attempt to send packet over invalid queue %d.
\n
"
"Please file bug report to %s.
\n
"
,
qid
,
DRV_PROJECT
);
goto
exit_f
ail
;
goto
exit_f
ree_skb
;
}
/*
...
...
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
exit_fail:
rt2x00queue_pause_queue
(
queue
);
exit_free_skb:
dev_kfree_skb_any
(
skb
);
}
EXPORT_SYMBOL_GPL
(
rt2x00mac_tx
);
...
...
drivers/net/wireless/rtlwifi/pci.c
浏览文件 @
5be13340
...
...
@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
pcipriv
->
ndis_adapter
.
devnumber
=
PCI_SLOT
(
pdev
->
devfn
);
pcipriv
->
ndis_adapter
.
funcnumber
=
PCI_FUNC
(
pdev
->
devfn
);
/*find bridge info */
pcipriv
->
ndis_adapter
.
pcibridge_vendorid
=
bridge_pdev
->
vendor
;
for
(
tmp
=
0
;
tmp
<
PCI_BRIDGE_VENDOR_MAX
;
tmp
++
)
{
if
(
bridge_pdev
->
vendor
==
pcibridge_vendors
[
tmp
])
{
pcipriv
->
ndis_adapter
.
pcibridge_vendor
=
tmp
;
RT_TRACE
(
rtlpriv
,
COMP_INIT
,
DBG_DMESG
,
(
"Pci Bridge Vendor is found index: %d
\n
"
,
tmp
));
break
;
if
(
bridge_pdev
)
{
/*find bridge info if available */
pcipriv
->
ndis_adapter
.
pcibridge_vendorid
=
bridge_pdev
->
vendor
;
for
(
tmp
=
0
;
tmp
<
PCI_BRIDGE_VENDOR_MAX
;
tmp
++
)
{
if
(
bridge_pdev
->
vendor
==
pcibridge_vendors
[
tmp
])
{
pcipriv
->
ndis_adapter
.
pcibridge_vendor
=
tmp
;
RT_TRACE
(
rtlpriv
,
COMP_INIT
,
DBG_DMESG
,
(
"Pci Bridge Vendor is found index:"
" %d
\n
"
,
tmp
));
break
;
}
}
}
...
...
net/wireless/nl80211.c
浏览文件 @
5be13340
...
...
@@ -3464,7 +3464,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
tmp
)
{
enum
ieee80211_band
band
=
nla_type
(
attr
);
if
(
band
<
0
||
band
>
IEEE80211_NUM_BANDS
)
{
if
(
band
<
0
||
band
>
=
IEEE80211_NUM_BANDS
)
{
err
=
-
EINVAL
;
goto
out_free
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录