CONFIG_ADM6996_PHY=y
CONFIG_AG71XX=y
# CONFIG_AG71XX_DEBUG is not set
CONFIG_ADM6996_PHY=y
CONFIG_AG71XX=y
# CONFIG_AG71XX_DEBUG is not set
+CONFIG_AG71XX_AR8216_SUPPORT=y
# CONFIG_AR71XX_EARLY_SERIAL is not set
CONFIG_AR71XX_MACH_AP83=y
CONFIG_AR71XX_MACH_AW_NR580=y
# CONFIG_AR71XX_EARLY_SERIAL is not set
CONFIG_AR71XX_MACH_AP83=y
CONFIG_AR71XX_MACH_AW_NR580=y
u8 has_gbit:1;
u8 is_ar91xx:1;
u8 has_gbit:1;
u8 is_ar91xx:1;
void (* ddr_flush)(void);
void (* set_pll)(u32 pll);
void (* ddr_flush)(void);
void (* set_pll)(u32 pll);
default n
help
Atheros AR71xx built-in ethernet driver debugging messages.
default n
help
Atheros AR71xx built-in ethernet driver debugging messages.
+
+config AG71XX_AR8216_SUPPORT
+ bool "special support for the Atheros AR8216 switch"
+ depends on AG71XX
+ default n
+ default y if AR71XX_MACH_WNR2000 || AR71XX_MACH_MZK_W04NU
+ help
+ Say 'y' here if you want to enable special support for the
+ Atheros AR8216 switch found on some boards.
# Makefile for the Atheros AR71xx built-in ethernet macs
#
# Makefile for the Atheros AR71xx built-in ethernet macs
#
+ag71xx-y += ag71xx_main.o
+ag71xx-y += ag71xx_ethtool.o
+ag71xx-y += ag71xx_phy.o
+ag71xx-y += ag71xx_mdio.o
+
+ag71xx-$(CONFIG_AG71XX_AR8216_SUPPORT) += ag71xx_ar8216.o
+
obj-$(CONFIG_AG71XX) += ag71xx.o
obj-$(CONFIG_AG71XX) += ag71xx.o
-ag71xx-objs := ag71xx_main.o ag71xx_ethtool.o ag71xx_phy.o ag71xx_mdio.o
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
-#define AG71XX_DRV_VERSION "0.5.20"
+#define AG71XX_DRV_VERSION "0.5.21"
#define AG71XX_NAPI_WEIGHT 64
#define AG71XX_OOM_REFILL (1 + HZ/10)
#define AG71XX_NAPI_WEIGHT 64
#define AG71XX_OOM_REFILL (1 + HZ/10)
ag71xx_mii_ctrl_wr(ag, t);
}
ag71xx_mii_ctrl_wr(ag, t);
}
+#ifdef CONFIG_AG71XX_AR8216_SUPPORT
+void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
+int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
+#else
+static inline void ag71xx_add_ar8216_header(struct ag71xx *ag,
+ struct sk_buff *skb)
+{
+}
+
+static inline int ag71xx_remove_ar8216_header(struct ag71xx *ag,
+ struct sk_buff *skb)
+{
+ return 0;
+}
+#endif
+
if (!ag71xx_desc_empty(desc))
goto err_drop;
if (!ag71xx_desc_empty(desc))
goto err_drop;
+ ag71xx_add_ar8216_header(ag, skb);
+
if (skb->len <= 0) {
DBG("%s: packet len is too small\n", ag->dev->name);
goto err_drop;
if (skb->len <= 0) {
DBG("%s: packet len is too small\n", ag->dev->name);
goto err_drop;
skb_put(skb, pktlen);
skb->dev = dev;
skb_put(skb, pktlen);
skb->dev = dev;
- skb->protocol = eth_type_trans(skb, dev);
skb->ip_summed = CHECKSUM_NONE;
skb->ip_summed = CHECKSUM_NONE;
- netif_receive_skb(skb);
-
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pktlen;
dev->last_rx = jiffies;
dev->stats.rx_packets++;
dev->stats.rx_bytes += pktlen;
+ if (ag71xx_remove_ar8216_header(ag, skb) != 0) {
+ dev->stats.rx_dropped++;
+ kfree_skb(skb);
+ } else {
+ skb->protocol = eth_type_trans(skb, dev);
+ netif_receive_skb(skb);
+ }
+
ring->buf[i].skb = NULL;
done++;
ring->buf[i].skb = NULL;
done++;