diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-01-15 13:54:54 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-16 20:59:50 +0100 |
commit | a077126a20a49117903596ceccf0f21ed16b5841 (patch) | |
tree | fe0abf8e28ccf6df52aca4b454b97db19d059329 /drivers/staging/wfx/hif_tx_mib.h | |
parent | c47b70e2c5918fab8d100915b68ada8828563a62 (diff) |
staging: wfx: simplify hif_set_mac_addr_condition()
The structure hif_mib_mac_addr_data_frame_condition come from hardware
API. It is not intended to be manipulated in upper layers of the driver.
In add, current code for hif_set_mac_addr_condition() is too dumb. It
should pack data with hardware representation instead of leaving all
work to the caller.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-36-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/hif_tx_mib.h')
-rw-r--r-- | drivers/staging/wfx/hif_tx_mib.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index ee22c7169fab..90474b1c5ec3 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -239,11 +239,17 @@ static inline int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, } static inline int hif_set_mac_addr_condition(struct wfx_vif *wvif, - struct hif_mib_mac_addr_data_frame_condition *arg) + int idx, const u8 *mac_addr) { + struct hif_mib_mac_addr_data_frame_condition val = { + .condition_idx = idx, + .address_type = HIF_MAC_ADDR_A1, + }; + + ether_addr_copy(val.mac_address, mac_addr); return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_MAC_ADDR_DATAFRAME_CONDITION, - arg, sizeof(*arg)); + &val, sizeof(val)); } static inline int hif_set_uc_mc_bc_condition(struct wfx_vif *wvif, |