summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/hif_tx.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-04-10 15:32:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 14:42:50 +0200
commit239a1d3c646080a85d72ed2ffb2d26e703e5ef72 (patch)
tree3dc4d13ba68583fb74ca77898881d43794a288c6 /drivers/staging/wfx/hif_tx.c
parentac243a1b6ff03c1874bddb9fcbc74694da497783 (diff)
staging: wfx: check value of beacon_int
Firmware dislike when beacon_int value is 0. This patch add some warnings in case it would happen. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200410133239.438347-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/hif_tx.c')
-rw-r--r--drivers/staging/wfx/hif_tx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index d44e5cacbbce..f49ab67e1a6d 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -296,6 +296,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
struct hif_msg *hif;
struct hif_req_join *body = wfx_alloc_hif(sizeof(*body), &hif);
+ WARN_ON(!conf->beacon_int);
WARN_ON(!conf->basic_rates);
WARN_ON(sizeof(body->ssid) < ssidlen);
WARN(!conf->ibss_joined && !ssidlen, "joining an unknown BSS");
@@ -430,6 +431,7 @@ int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
struct hif_msg *hif;
struct hif_req_start *body = wfx_alloc_hif(sizeof(*body), &hif);
+ WARN_ON(!conf->beacon_int);
body->dtim_period = conf->dtim_period;
body->short_preamble = conf->use_short_preamble;
body->channel_number = cpu_to_le16(channel->hw_value);