1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-07 20:54:04 +02:00
Commit Graph

77 Commits

Author SHA1 Message Date
juhosg
10a983eea1 ramips: raeth: enable MDIO code for RT3883
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30497 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-13 15:18:03 +00:00
juhosg
a6fcd662b4 ramips: add MDIO bus support for RT288X
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30455 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 16:49:56 +00:00
juhosg
3120faed8b ramips: raeth: make debugging messages configurable
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30450 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:10 +00:00
juhosg
ad0b8c49bf ramips: raeth: use device pointer in DMA API calls
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30449 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:08 +00:00
juhosg
5b41176cdc ramips: raeth: add netdev pointer to private structure
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30448 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:06 +00:00
juhosg
1e38789510 ramips: raeth: cleanup DMA API usage in ramips_eth_hard_start_xmit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30447 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:05 +00:00
juhosg
9b2ee01ff5 ramips: raeth: unmap rx DMA address in ramips_cleanup_dma
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30446 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:04 +00:00
juhosg
606588b4e9 ramips: raeth: add rx_dma array to store the DMA address of the rx packets
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30445 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:02 +00:00
juhosg
bbc71f5154 ramips: raeth: use dma_addr_t for the descriptors
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30444 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:12:01 +00:00
juhosg
cce4c079c4 ramips: raeth: unmap DMA memory when a packet is received
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30443 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:11:56 +00:00
juhosg
cd69289b3e ramips: raeth: add a temporary pktlen variable
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30442 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:11:55 +00:00
juhosg
0e485dd80d ramips: raeth: protect macro parameters
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30441 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:11:50 +00:00
juhosg
202c4f386c ramips: raeth: indicate dropped packets in stats
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30440 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:11:49 +00:00
juhosg
b10ad5f4e0 ramips: raeth: use the NUM_TX_DESC for the tx_skb array
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30439 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-11 15:11:47 +00:00
blogic
03810204dc ramips: Rework ramips_eth to not require irqsave locking anymore
Previously the tx housekeeping was done in a spin_lock_irqsave critical
section which causes irqs to be disabled during that time. Since the
housekeeping is already prepared to be scheduled as a tasklet process
the housekeeping only in softirq context and revise the locking between
the tx path and the housekeeping tasklet by using a normal spin_lock
which in most situations will be a NOP anyway.

This makes sure that interrupts are only disabled for a short time
since in the worst case the housekeeping might have to free up to 256
skbs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29762 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-17 11:23:11 +00:00
juhosg
b95eb02775 ramips: initial support for Sitecom WL-351 v1 002
This add support for the Sitecom WL-351 v1 002.
In principle the Engenius ESR9850 should also work with this, but I
don't have the hardware to test it.

Since an external gigabit switch (RTL8366RB) is used,
I had to modify the ramips_esw driver to add a 'bypass' mode, which
just configures it to not filter the vlan tags.
Also two initialization words (FCT2 and FPA2) are set to different
values by u-boot than what the driver is using and it only seems to
work correctly when they not overridden by the driver, so I
added them to the platform specific data as reg_initval_fct2 and
reg_initval_fpa2.

With this wired lan works as expected, however I'm still having some
trouble with the wireless lan:
It only works after I rmmod & re-insmod rt2800pci and then
reconfigure it in the webinterface, but not directly after
rebooting.

The symptom of this is wpad saying:
Dec 20 15:45:09 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> IEEE 802.11: associated (aid 1)
Dec 20 15:45:09 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> WPA: pairwise key handshake completed (RSN)
Dec 20 15:45:22 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> IEEE 802.11: authenticated

But wpa_supplicant on the client saying:
Authentication with <wl351mac> timed out.

Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29604 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-23 14:27:16 +00:00
juhosg
a46cfc6bcc ramips: add support for the Senao/EnGenius ESR-9753 board
Signed-off-by: Artur Wronowski <arteqw@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29603 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-12-23 14:27:10 +00:00
juhosg
8b59aa7786 ramips: allow to specify port layout for the switch of the RT305x/RT3350
Based on a patch by Roman Yeryomin <roman@advem.lv>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27990 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-08-15 14:11:43 +00:00
juhosg
45b5e79de8 ramips: fix a section mismatch warning
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27382 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-03 15:01:46 +00:00
juhosg
f370a85b20 ramips: ramips_esw: fix typos
Patch from #8577.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24898 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-01-04 13:44:05 +00:00
juhosg
602f2d5e4f ramips: ramips_esw: add more definitions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24340 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:33 +00:00
juhosg
ec52e89b08 ramips: ramips_esw: add helper function to set pvid
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24339 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:28 +00:00
juhosg
4059133e7d ramips: ramips_esw: add helper function to set vlan members
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24338 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:25 +00:00
juhosg
9e9816322c ramips: ramips_esw: add helper function to set VLAN id
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24337 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:22 +00:00
juhosg
293e4ff8cc ramips: ramips_esw: introduce rt305x_esw_rmw{,_raw} function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24336 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:16 +00:00
juhosg
8b6afc3a6a ramips: ramips_esw: use rt305x_esw prefix in function names
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24335 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:14 +00:00
juhosg
808e953c0a ramips: ramips_esw: coding style cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24334 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:12 +00:00
juhosg
39deae4b99 ramips: ramips_esw: add defines for switch register offsets
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24333 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:07 +00:00
juhosg
1600b801ec ramips: ramips_esw: don't touch GPIO_PURPOSE register
It must have been set by the board initialization code.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24332 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:04 +00:00
juhosg
bc4cb1b39f ramips: ramips_esw: convert it to be a platform driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24331 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:15:00 +00:00
juhosg
a3373ca948 ramips: ramips_esw: move hardware initialization into a separate function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24330 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:14:58 +00:00
juhosg
1fcc0bf36c ramips: ramips_esw: use a private structure for the functions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24329 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-12-08 10:14:54 +00:00
juhosg
d59a23df99 ramips: Use NET_IP_ALIGN instead of hardcoding 2
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24124 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-24 10:01:18 +00:00
juhosg
37b545f00f ramips: DMA map the correct RX skb size
The skb_reserve call prior to DMA mapping the RX skb reduced the skb
data len by 2. To not allow DMA to write behind the skb we should pass
the correct skb data len to the device.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24123 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-24 10:01:16 +00:00
juhosg
c523394925 ramips: Don't trigger BUG_ON due to skb allocation failure
Instead just drop the rx'ed frame silently and reuse the already
available buffer.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24122 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-24 10:01:12 +00:00
juhosg
e0af17401f ramips: Remove unnecessary skb_put
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24121 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-11-24 10:01:08 +00:00
juhosg
808a6ab903 ramips: Allow ethernet interface to be taken down and up again
Taking the ramips ethernet interface down and up again resulted in the
driver not receiving any frames anymore. Fix this by correctly disabling
interrupts in the hw on ifdown.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23243 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-10-05 14:10:34 +00:00
juhosg
12e2f4aadf ramips: add mdio_cfg configuration for the ethernet driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22211 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-15 19:45:40 +00:00
juhosg
fa4dd3d5de ramips: Fix bridging in ramips ethernet driver
Bridging between the ramips ethernet driver and rt2800pci was somewhat
broken. Frames received by the ethernet driver which were passed to the
wifi driver for transmission were sometimes corrupted or sent out with
huge delays.

The reason for this is the missing assignment of skb->tail in the ramips
ethernet driver's rx path resulting in skb->tail pointing to skb->data.
Since skb->tail is used by mac80211 it writes into skb->data which messes
up the frames content.

Fix this by using skb_put to correctly set skb->len and skb->tail.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22172 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-13 16:52:07 +00:00
juhosg
c60a96964d ramips_eth: cleanup mac_address changing
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19464 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 17:56:36 +00:00
juhosg
1ca6778f34 ramips_eth: update register offsets
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19463 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 17:56:33 +00:00
juhosg
1630830019 ramips_eth: pass sys_clk via platform_data
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19462 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 17:56:30 +00:00
juhosg
0e069faefd ramips_eth: add helper functions to {ed,dis}able interrupts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19446 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 12:48:53 +00:00
juhosg
48f3d520ec ramips_eth: remove unnecessary typecasts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19445 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 12:48:51 +00:00
juhosg
2e8d8d35d9 ramips_eth: simplify tx_next computation
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19444 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 12:48:48 +00:00
juhosg
85ef0c49c7 ramips_eth: simplify tx descriptor initialization
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19443 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 12:48:46 +00:00
juhosg
52182673e4 ramips_eth: pass 'raeth_priv' struct directly to dma specific functions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19442 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 12:48:43 +00:00
juhosg
d46c0be6b4 ramips_eth: convert to use netdev_ops
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19440 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-31 12:48:38 +00:00
juhosg
0ed414aa74 ramips_eth: fix invalid register writes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19417 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-30 15:26:02 +00:00
juhosg
7fff48fa3a ramips_eth: move memset call out from the loop
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19416 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-30 15:25:59 +00:00