File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
drivers/net/ethernet/wangxun/libwx Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2704,4 +2704,24 @@ void wx_get_stats64(struct net_device *netdev,
27042704}
27052705EXPORT_SYMBOL (wx_get_stats64 );
27062706
2707+ int wx_set_features (struct net_device * netdev , netdev_features_t features )
2708+ {
2709+ netdev_features_t changed = netdev -> features ^ features ;
2710+ struct wx * wx = netdev_priv (netdev );
2711+
2712+ if (changed & NETIF_F_RXHASH )
2713+ wr32m (wx , WX_RDB_RA_CTL , WX_RDB_RA_CTL_RSS_EN ,
2714+ WX_RDB_RA_CTL_RSS_EN );
2715+ else
2716+ wr32m (wx , WX_RDB_RA_CTL , WX_RDB_RA_CTL_RSS_EN , 0 );
2717+
2718+ if (changed &
2719+ (NETIF_F_HW_VLAN_CTAG_RX |
2720+ NETIF_F_HW_VLAN_STAG_RX ))
2721+ wx_set_rx_mode (netdev );
2722+
2723+ return 1 ;
2724+ }
2725+ EXPORT_SYMBOL (wx_set_features );
2726+
27072727MODULE_LICENSE ("GPL" );
Original file line number Diff line number Diff line change @@ -28,5 +28,6 @@ void wx_free_resources(struct wx *wx);
2828int wx_setup_resources (struct wx * wx );
2929void wx_get_stats64 (struct net_device * netdev ,
3030 struct rtnl_link_stats64 * stats );
31+ int wx_set_features (struct net_device * netdev , netdev_features_t features );
3132
3233#endif /* _NGBE_LIB_H_ */
Original file line number Diff line number Diff line change 111111#define WX_RDB_PL_CFG_L2HDR BIT(3)
112112#define WX_RDB_PL_CFG_TUN_TUNHDR BIT(4)
113113#define WX_RDB_PL_CFG_TUN_OUTL2HDR BIT(5)
114+ #define WX_RDB_RA_CTL 0x194F4
115+ #define WX_RDB_RA_CTL_RSS_EN BIT(2) /* RSS Enable */
114116
115117/******************************* PSR Registers *******************************/
116118/* psr control */
You can’t perform that action at this time.
0 commit comments