@@ -363,6 +363,37 @@ static void airoc_wifi_network_process_ethernet_data(whd_interface_t interface,
363363 }
364364}
365365
366+ static enum ethernet_hw_caps airoc_get_capabilities (const struct device * dev )
367+ {
368+ ARG_UNUSED (dev );
369+
370+ return ETHERNET_HW_FILTERING ;
371+ }
372+
373+ static int airoc_set_config (const struct device * dev ,
374+ enum ethernet_config_type type ,
375+ const struct ethernet_config * config )
376+ {
377+ ARG_UNUSED (dev );
378+ whd_mac_t whd_mac_addr ;
379+
380+ switch (type ) {
381+ case ETHERNET_CONFIG_TYPE_FILTER :
382+ for (int i = 0 ; i < WHD_ETHER_ADDR_LEN ; i ++ ) {
383+ whd_mac_addr .octet [i ] = config -> filter .mac_address .addr [i ];
384+ }
385+ if (config -> filter .set ) {
386+ whd_wifi_register_multicast_address (airoc_if , & whd_mac_addr );
387+ } else {
388+ whd_wifi_unregister_multicast_address (airoc_if , & whd_mac_addr );
389+ }
390+ return 0 ;
391+ default :
392+ break ;
393+ }
394+ return - ENOTSUP ;
395+ }
396+
366397static void * link_events_handler (whd_interface_t ifp , const whd_event_header_t * event_header ,
367398 const uint8_t * event_data , void * handler_user_data )
368399{
@@ -779,6 +810,8 @@ static const struct wifi_mgmt_ops airoc_wifi_mgmt = {
779810static const struct net_wifi_mgmt_offload airoc_api = {
780811 .wifi_iface .iface_api .init = airoc_mgmt_init ,
781812 .wifi_iface .send = airoc_mgmt_send ,
813+ .wifi_iface .get_capabilities = airoc_get_capabilities ,
814+ .wifi_iface .set_config = airoc_set_config ,
782815 .wifi_mgmt_api = & airoc_wifi_mgmt ,
783816};
784817
0 commit comments