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
96789ac4
Commit
96789ac4
authored
Feb 28, 2006
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
parents
77eebf34
958ddb75
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
105 deletions
+29
-105
drivers/net/8139cp.c
drivers/net/8139cp.c
+21
-16
drivers/net/sky2.c
drivers/net/sky2.c
+0
-77
drivers/net/sky2.h
drivers/net/sky2.h
+0
-1
drivers/net/via-velocity.c
drivers/net/via-velocity.c
+3
-0
net/ieee80211/ieee80211_rx.c
net/ieee80211/ieee80211_rx.c
+5
-11
No files found.
drivers/net/8139cp.c
View file @
96789ac4
...
@@ -1118,13 +1118,18 @@ static int cp_refill_rx (struct cp_private *cp)
...
@@ -1118,13 +1118,18 @@ static int cp_refill_rx (struct cp_private *cp)
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
static
void
cp_init_rings_index
(
struct
cp_private
*
cp
)
{
cp
->
rx_tail
=
0
;
cp
->
tx_head
=
cp
->
tx_tail
=
0
;
}
static
int
cp_init_rings
(
struct
cp_private
*
cp
)
static
int
cp_init_rings
(
struct
cp_private
*
cp
)
{
{
memset
(
cp
->
tx_ring
,
0
,
sizeof
(
struct
cp_desc
)
*
CP_TX_RING_SIZE
);
memset
(
cp
->
tx_ring
,
0
,
sizeof
(
struct
cp_desc
)
*
CP_TX_RING_SIZE
);
cp
->
tx_ring
[
CP_TX_RING_SIZE
-
1
].
opts1
=
cpu_to_le32
(
RingEnd
);
cp
->
tx_ring
[
CP_TX_RING_SIZE
-
1
].
opts1
=
cpu_to_le32
(
RingEnd
);
cp
->
rx_tail
=
0
;
cp_init_rings_index
(
cp
);
cp
->
tx_head
=
cp
->
tx_tail
=
0
;
return
cp_refill_rx
(
cp
);
return
cp_refill_rx
(
cp
);
}
}
...
@@ -1886,30 +1891,30 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
...
@@ -1886,30 +1891,30 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
spin_unlock_irqrestore
(
&
cp
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
cp
->
lock
,
flags
);
if
(
cp
->
pdev
&&
cp
->
wol_enabled
)
{
pci_save_state
(
pdev
);
pci_save_state
(
cp
->
pdev
);
pci_enable_wake
(
pdev
,
pci_choose_state
(
pdev
,
state
),
cp
->
wol_enabled
);
cp_set_d3_state
(
cp
);
pci_set_power_state
(
pdev
,
pci_choose_state
(
pdev
,
state
));
}
return
0
;
return
0
;
}
}
static
int
cp_resume
(
struct
pci_dev
*
pdev
)
static
int
cp_resume
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
;
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
)
;
struct
cp_private
*
cp
;
struct
cp_private
*
cp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
dev
=
pci_get_drvdata
(
pdev
);
if
(
!
netif_running
(
dev
))
cp
=
netdev_priv
(
dev
)
;
return
0
;
netif_device_attach
(
dev
);
netif_device_attach
(
dev
);
if
(
cp
->
pdev
&&
cp
->
wol_enabled
)
{
pci_set_power_state
(
pdev
,
PCI_D0
);
pci_set_power_state
(
cp
->
pdev
,
PCI_D0
);
pci_restore_state
(
pdev
);
pci_restore_state
(
cp
->
pdev
);
pci_enable_wake
(
pdev
,
PCI_D0
,
0
);
}
/* FIXME: sh*t may happen if the Rx ring buffer is depleted */
cp_init_rings_index
(
cp
);
cp_init_hw
(
cp
);
cp_init_hw
(
cp
);
netif_start_queue
(
dev
);
netif_start_queue
(
dev
);
...
...
drivers/net/sky2.c
View file @
96789ac4
...
@@ -96,10 +96,6 @@ static int copybreak __read_mostly = 256;
...
@@ -96,10 +96,6 @@ static int copybreak __read_mostly = 256;
module_param
(
copybreak
,
int
,
0
);
module_param
(
copybreak
,
int
,
0
);
MODULE_PARM_DESC
(
copybreak
,
"Receive copy threshold"
);
MODULE_PARM_DESC
(
copybreak
,
"Receive copy threshold"
);
static
int
disable_msi
=
0
;
module_param
(
disable_msi
,
int
,
0
);
MODULE_PARM_DESC
(
disable_msi
,
"Disable Message Signaled Interrupt (MSI)"
);
static
const
struct
pci_device_id
sky2_id_table
[]
=
{
static
const
struct
pci_device_id
sky2_id_table
[]
=
{
{
PCI_DEVICE
(
PCI_VENDOR_ID_SYSKONNECT
,
0x9000
)
},
{
PCI_DEVICE
(
PCI_VENDOR_ID_SYSKONNECT
,
0x9000
)
},
{
PCI_DEVICE
(
PCI_VENDOR_ID_SYSKONNECT
,
0x9E00
)
},
{
PCI_DEVICE
(
PCI_VENDOR_ID_SYSKONNECT
,
0x9E00
)
},
...
@@ -3126,61 +3122,6 @@ static void __devinit sky2_show_addr(struct net_device *dev)
...
@@ -3126,61 +3122,6 @@ static void __devinit sky2_show_addr(struct net_device *dev)
dev
->
dev_addr
[
3
],
dev
->
dev_addr
[
4
],
dev
->
dev_addr
[
5
]);
dev
->
dev_addr
[
3
],
dev
->
dev_addr
[
4
],
dev
->
dev_addr
[
5
]);
}
}
/* Handle software interrupt used during MSI test */
static
irqreturn_t
__devinit
sky2_test_intr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
sky2_hw
*
hw
=
dev_id
;
u32
status
=
sky2_read32
(
hw
,
B0_Y2_SP_ISRC2
);
if
(
status
==
0
)
return
IRQ_NONE
;
if
(
status
&
Y2_IS_IRQ_SW
)
{
sky2_write8
(
hw
,
B0_CTST
,
CS_CL_SW_IRQ
);
hw
->
msi
=
1
;
}
sky2_write32
(
hw
,
B0_Y2_SP_ICR
,
2
);
sky2_read32
(
hw
,
B0_IMSK
);
return
IRQ_HANDLED
;
}
/* Test interrupt path by forcing a a software IRQ */
static
int
__devinit
sky2_test_msi
(
struct
sky2_hw
*
hw
)
{
struct
pci_dev
*
pdev
=
hw
->
pdev
;
int
i
,
err
;
sky2_write32
(
hw
,
B0_IMSK
,
Y2_IS_IRQ_SW
);
err
=
request_irq
(
pdev
->
irq
,
sky2_test_intr
,
SA_SHIRQ
,
DRV_NAME
,
hw
);
if
(
err
)
{
printk
(
KERN_ERR
PFX
"%s: cannot assign irq %d
\n
"
,
pci_name
(
pdev
),
pdev
->
irq
);
return
err
;
}
sky2_write8
(
hw
,
B0_CTST
,
CS_ST_SW_IRQ
);
wmb
();
for
(
i
=
0
;
i
<
10
;
i
++
)
{
barrier
();
if
(
hw
->
msi
)
goto
found
;
mdelay
(
1
);
}
err
=
-
EOPNOTSUPP
;
sky2_write8
(
hw
,
B0_CTST
,
CS_CL_SW_IRQ
);
found:
sky2_write32
(
hw
,
B0_IMSK
,
0
);
free_irq
(
pdev
->
irq
,
hw
);
return
err
;
}
static
int
__devinit
sky2_probe
(
struct
pci_dev
*
pdev
,
static
int
__devinit
sky2_probe
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
)
const
struct
pci_device_id
*
ent
)
{
{
...
@@ -3302,20 +3243,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
...
@@ -3302,20 +3243,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
}
}
}
}
if
(
!
disable_msi
&&
pci_enable_msi
(
pdev
)
==
0
)
{
err
=
sky2_test_msi
(
hw
);
if
(
err
==
-
EOPNOTSUPP
)
{
/* MSI test failed, go back to INTx mode */
printk
(
KERN_WARNING
PFX
"%s: No interrupt was generated using MSI, "
"switching to INTx mode. Please report this failure to "
"the PCI maintainer and include system chipset information.
\n
"
,
pci_name
(
pdev
));
pci_disable_msi
(
pdev
);
}
else
if
(
err
)
goto
err_out_unregister
;
}
err
=
request_irq
(
pdev
->
irq
,
sky2_intr
,
SA_SHIRQ
|
SA_SAMPLE_RANDOM
,
err
=
request_irq
(
pdev
->
irq
,
sky2_intr
,
SA_SHIRQ
|
SA_SAMPLE_RANDOM
,
DRV_NAME
,
hw
);
DRV_NAME
,
hw
);
if
(
err
)
{
if
(
err
)
{
...
@@ -3332,8 +3259,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
...
@@ -3332,8 +3259,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
return
0
;
return
0
;
err_out_unregister:
err_out_unregister:
if
(
hw
->
msi
)
pci_disable_msi
(
pdev
);
if
(
dev1
)
{
if
(
dev1
)
{
unregister_netdev
(
dev1
);
unregister_netdev
(
dev1
);
free_netdev
(
dev1
);
free_netdev
(
dev1
);
...
@@ -3376,8 +3301,6 @@ static void __devexit sky2_remove(struct pci_dev *pdev)
...
@@ -3376,8 +3301,6 @@ static void __devexit sky2_remove(struct pci_dev *pdev)
sky2_read8
(
hw
,
B0_CTST
);
sky2_read8
(
hw
,
B0_CTST
);
free_irq
(
pdev
->
irq
,
hw
);
free_irq
(
pdev
->
irq
,
hw
);
if
(
hw
->
msi
)
pci_disable_msi
(
pdev
);
pci_free_consistent
(
pdev
,
STATUS_LE_BYTES
,
hw
->
st_le
,
hw
->
st_dma
);
pci_free_consistent
(
pdev
,
STATUS_LE_BYTES
,
hw
->
st_le
,
hw
->
st_dma
);
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
pci_disable_device
(
pdev
);
pci_disable_device
(
pdev
);
...
...
drivers/net/sky2.h
View file @
96789ac4
...
@@ -1881,7 +1881,6 @@ struct sky2_hw {
...
@@ -1881,7 +1881,6 @@ struct sky2_hw {
u32
intr_mask
;
u32
intr_mask
;
int
pm_cap
;
int
pm_cap
;
int
msi
;
u8
chip_id
;
u8
chip_id
;
u8
chip_rev
;
u8
chip_rev
;
u8
copper
;
u8
copper
;
...
...
drivers/net/via-velocity.c
View file @
96789ac4
...
@@ -1106,6 +1106,9 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
...
@@ -1106,6 +1106,9 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
for
(
i
=
0
;
i
<
vptr
->
options
.
numrx
;
i
++
)
{
for
(
i
=
0
;
i
<
vptr
->
options
.
numrx
;
i
++
)
{
struct
velocity_rd_info
*
rd_info
=
&
(
vptr
->
rd_info
[
i
]);
struct
velocity_rd_info
*
rd_info
=
&
(
vptr
->
rd_info
[
i
]);
struct
rx_desc
*
rd
=
vptr
->
rd_ring
+
i
;
memset
(
rd
,
0
,
sizeof
(
*
rd
));
if
(
!
rd_info
->
skb
)
if
(
!
rd_info
->
skb
)
continue
;
continue
;
...
...
net/ieee80211/ieee80211_rx.c
View file @
96789ac4
...
@@ -1301,7 +1301,7 @@ static void update_network(struct ieee80211_network *dst,
...
@@ -1301,7 +1301,7 @@ static void update_network(struct ieee80211_network *dst,
/* dst->last_associate is not overwritten */
/* dst->last_associate is not overwritten */
}
}
static
inline
int
is_beacon
(
int
fc
)
static
inline
int
is_beacon
(
__le16
fc
)
{
{
return
(
WLAN_FC_GET_STYPE
(
le16_to_cpu
(
fc
))
==
IEEE80211_STYPE_BEACON
);
return
(
WLAN_FC_GET_STYPE
(
le16_to_cpu
(
fc
))
==
IEEE80211_STYPE_BEACON
);
}
}
...
@@ -1348,9 +1348,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
...
@@ -1348,9 +1348,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid
(
info_element
->
data
,
escape_essid
(
info_element
->
data
,
info_element
->
len
),
info_element
->
len
),
MAC_ARG
(
beacon
->
header
.
addr3
),
MAC_ARG
(
beacon
->
header
.
addr3
),
is_beacon
(
le16_to_cpu
is_beacon
(
beacon
->
header
.
frame_ctl
)
?
(
beacon
->
header
.
frame_ctl
))
?
"BEACON"
:
"PROBE RESPONSE"
);
"BEACON"
:
"PROBE RESPONSE"
);
return
;
return
;
}
}
...
@@ -1400,9 +1398,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
...
@@ -1400,9 +1398,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid
(
network
.
ssid
,
escape_essid
(
network
.
ssid
,
network
.
ssid_len
),
network
.
ssid_len
),
MAC_ARG
(
network
.
bssid
),
MAC_ARG
(
network
.
bssid
),
is_beacon
(
le16_to_cpu
is_beacon
(
beacon
->
header
.
frame_ctl
)
?
(
beacon
->
header
.
frame_ctl
))
?
"BEACON"
:
"PROBE RESPONSE"
);
"BEACON"
:
"PROBE RESPONSE"
);
#endif
#endif
memcpy
(
target
,
&
network
,
sizeof
(
*
target
));
memcpy
(
target
,
&
network
,
sizeof
(
*
target
));
...
@@ -1412,16 +1408,14 @@ static void ieee80211_process_probe_response(struct ieee80211_device
...
@@ -1412,16 +1408,14 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid
(
target
->
ssid
,
escape_essid
(
target
->
ssid
,
target
->
ssid_len
),
target
->
ssid_len
),
MAC_ARG
(
target
->
bssid
),
MAC_ARG
(
target
->
bssid
),
is_beacon
(
le16_to_cpu
is_beacon
(
beacon
->
header
.
frame_ctl
)
?
(
beacon
->
header
.
frame_ctl
))
?
"BEACON"
:
"PROBE RESPONSE"
);
"BEACON"
:
"PROBE RESPONSE"
);
update_network
(
target
,
&
network
);
update_network
(
target
,
&
network
);
}
}
spin_unlock_irqrestore
(
&
ieee
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
ieee
->
lock
,
flags
);
if
(
is_beacon
(
le16_to_cpu
(
beacon
->
header
.
frame_ctl
)
))
{
if
(
is_beacon
(
beacon
->
header
.
frame_ctl
))
{
if
(
ieee
->
handle_beacon
!=
NULL
)
if
(
ieee
->
handle_beacon
!=
NULL
)
ieee
->
handle_beacon
(
dev
,
beacon
,
&
network
);
ieee
->
handle_beacon
(
dev
,
beacon
,
&
network
);
}
else
{
}
else
{
...
...
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