Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/cyw43.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ int cyw43_ioctl(cyw43_t *self, uint32_t cmd, size_t len, uint8_t *buf, uint32_t
*/
int cyw43_send_ethernet(cyw43_t *self, int itf, size_t len, const void *buf, bool is_pbuf);

/*!
* \brief Enable/disable passing of all multicast packets
*
* This method allows disabling filtering out packets sent to multicast ethernet mac addresses.
* \param self the driver state object. This should always be \c &cyw43_state
* \param value true to disable filtering of multicast packets
* \return 0 on success
*/
int cyw43_set_allmulti(cyw43_t *self, bool value);

/*!
* \brief Set the wifi power management mode
*
Expand Down
17 changes: 17 additions & 0 deletions src/cyw43_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,23 @@ int cyw43_send_ethernet(cyw43_t *self, int itf, size_t len, const void *buf, boo
return ret;
}

/*******************************************************************************/
// Accept all multicast

int cyw43_set_allmulti(cyw43_t *self, bool value) {
CYW43_THREAD_ENTER;
int ret = cyw43_ensure_up(self);
if (ret) {
CYW43_THREAD_EXIT;
return ret;
}

ret = cyw43_ll_set_allmulti(&self->cyw43_ll, value);
CYW43_THREAD_EXIT;

return ret;
}

/*******************************************************************************/
// WiFi control

Expand Down
6 changes: 6 additions & 0 deletions src/cyw43_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,12 @@ int cyw43_set_monitor_mode(cyw43_ll_t *self, int value) {
}
#endif

int cyw43_ll_set_allmulti(cyw43_ll_t *self_in, bool value) {
cyw43_int_t *self = CYW_INT_FROM_LL(self_in);
cyw43_write_iovar_u32(self, "allmulti", value, WWD_STA_INTERFACE);
return 0;
}

// Requires cyw43_ll_bus_init to have been called first
int cyw43_ll_wifi_on(cyw43_ll_t *self_in, uint32_t country) {
cyw43_int_t *self = CYW_INT_FROM_LL(self_in);
Expand Down
2 changes: 2 additions & 0 deletions src/cyw43_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ void cyw43_ll_process_packets(cyw43_ll_t *self);
int cyw43_ll_ioctl(cyw43_ll_t *self, uint32_t cmd, size_t len, uint8_t *buf, uint32_t iface);
int cyw43_ll_send_ethernet(cyw43_ll_t *self, int itf, size_t len, const void *buf, bool is_pbuf);

int cyw43_ll_set_allmulti(cyw43_ll_t *self, bool value);

int cyw43_ll_wifi_on(cyw43_ll_t *self, uint32_t country);
int cyw43_ll_wifi_pm(cyw43_ll_t *self, uint32_t pm, uint32_t pm_sleep_ret, uint32_t li_bcn, uint32_t li_dtim, uint32_t li_assoc);
int cyw43_ll_wifi_get_pm(cyw43_ll_t *self, uint32_t *pm, uint32_t *pm_sleep_ret, uint32_t *li_bcn, uint32_t *li_dtim, uint32_t *li_assoc);
Expand Down