Linux wireless drivers development
 help / color / mirror / Atom feed
* [bug report] rsi: immediate wakeup bit and priority for TX command packets
@ 2017-08-01 11:04 Dan Carpenter
  2017-08-02  5:57 ` Prameela Rani Garnepudi
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-08-01 11:04 UTC (permalink / raw)
  To: prameela.j04cs; +Cc: linux-wireless

Hello Prameela Rani Garnepudi,

The patch 9a629fafe7d8: "rsi: immediate wakeup bit and priority for
TX command packets" from Jul 10, 2017, leads to the following static
checker warning:

	drivers/net/wireless/rsi/rsi_91x_mgmt.c:277 rsi_send_internal_mgmt_frame()
	error: potentially dereferencing uninitialized 'desc'.

drivers/net/wireless/rsi/rsi_91x_mgmt.c
   267  static int rsi_send_internal_mgmt_frame(struct rsi_common *common,
   268                                          struct sk_buff *skb)
   269  {
   270          struct skb_info *tx_params;
   271          struct rsi_cmd_desc *desc;
                                     ^^^^
   272  
   273          if (skb == NULL) {
   274                  rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__);
   275                  return -ENOMEM;
   276          }
   277          desc->desc_dword0.len_qno |= cpu_to_le16(DESC_IMMEDIATE_WAKEUP);
                ^^^^^^

   278          skb->priority = MGMT_SOFT_Q;
   279          tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;
   280          tx_params->flags |= INTERNAL_MGMT_PKT;
   281          skb_queue_tail(&common->tx_queue[MGMT_SOFT_Q], skb);
   282          rsi_set_event(&common->tx_thread.event);
   283          return 0;
   284  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] rsi: immediate wakeup bit and priority for TX command packets
  2017-08-01 11:04 [bug report] rsi: immediate wakeup bit and priority for TX command packets Dan Carpenter
@ 2017-08-02  5:57 ` Prameela Rani Garnepudi
  0 siblings, 0 replies; 2+ messages in thread
From: Prameela Rani Garnepudi @ 2017-08-02  5:57 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-wireless

Hi Dan,

Sorry for the mistake. I will send a new patch to fix this issue and
make sure no such things happen again.

Thanks,
Prameela

On Tue, Aug 1, 2017 at 4:34 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Hello Prameela Rani Garnepudi,
>
> The patch 9a629fafe7d8: "rsi: immediate wakeup bit and priority for
> TX command packets" from Jul 10, 2017, leads to the following static
> checker warning:
>
>         drivers/net/wireless/rsi/rsi_91x_mgmt.c:277 rsi_send_internal_mgmt_frame()
>         error: potentially dereferencing uninitialized 'desc'.
>
> drivers/net/wireless/rsi/rsi_91x_mgmt.c
>    267  static int rsi_send_internal_mgmt_frame(struct rsi_common *common,
>    268                                          struct sk_buff *skb)
>    269  {
>    270          struct skb_info *tx_params;
>    271          struct rsi_cmd_desc *desc;
>                                      ^^^^
>    272
>    273          if (skb == NULL) {
>    274                  rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__);
>    275                  return -ENOMEM;
>    276          }
>    277          desc->desc_dword0.len_qno |= cpu_to_le16(DESC_IMMEDIATE_WAKEUP);
>                 ^^^^^^
>
>    278          skb->priority = MGMT_SOFT_Q;
>    279          tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;
>    280          tx_params->flags |= INTERNAL_MGMT_PKT;
>    281          skb_queue_tail(&common->tx_queue[MGMT_SOFT_Q], skb);
>    282          rsi_set_event(&common->tx_thread.event);
>    283          return 0;
>    284  }
>
> regards,
> dan carpenter



-- 
G. Prameela Rani (M.Tech,CSE)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-02  5:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-01 11:04 [bug report] rsi: immediate wakeup bit and priority for TX command packets Dan Carpenter
2017-08-02  5:57 ` Prameela Rani Garnepudi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox