lkml.org 
[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/32] staging: wfx: add sanity checks to hif_join()
    Date
    From: Jérôme Pouiller <jerome.pouiller@silabs.com>

    Add a few check on start of hif_join().

    Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
    ---
    drivers/staging/wfx/hif_tx.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
    index 77bca43aca42..445906035e9d 100644
    --- a/drivers/staging/wfx/hif_tx.c
    +++ b/drivers/staging/wfx/hif_tx.c
    @@ -297,6 +297,8 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf,
    struct hif_req_join *body = wfx_alloc_hif(sizeof(*body), &hif);

    WARN_ON(!conf->basic_rates);
    + WARN_ON(sizeof(body->ssid) < ssidlen);
    + WARN(!conf->ibss_joined && !ssidlen, "joining an unknown BSS");
    body->infrastructure_bss_mode = !conf->ibss_joined;
    body->short_preamble = conf->use_short_preamble;
    if (channel && channel->flags & IEEE80211_CHAN_NO_IR)
    --
    2.25.1
    \
     
     \ /
      Last update: 2020-04-01 13:05    [W:4.568 / U:0.444 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site