[PATCH v2 2/5] Add the power save control framework and debugfs entry

Eugene Krasnikov k.eugene.e at gmail.com
Tue Jul 9 02:15:38 EDT 2013


> Shouldn't this be added to the vif struct instead of as a global?

Do not think so because wow is applicable to the whole hw but not specific vif.

2013/7/8 Olof Johansson <dev at skyshaper.net>:
> On Mon, Jul 8, 2013 at 6:43 PM,  <dreamfly281 at gmail.com> wrote:
>> From: Yanbo Li <yanbol at qti.qualcomm.com>
>> +static ssize_t read_file_bool_bmps(struct file *file, char __user *user_buf,
>> +                                  size_t count, loff_t *ppos)
>> +{
>> +       struct wcn36xx *wcn = file->private_data;
>> +       char buf[3];
>> +
>> +       if (wcn->pw_state == WCN36XX_BMPS)
>> +               buf[0] = '1';
>> +       else
>> +               buf[0] = '0';
>> +       buf[1] = '\n';
>> +       buf[2] = 0x00;
>> +       return simple_read_from_buffer(user_buf, count, ppos, buf, 2);
>> +}
> Why not just write the pw_state instead? I doubt we will have more
> than 255 power states so just casting it should be fine =)
>
>>  #define DRIVER_PREFIX "wcn36xx: "
>> @@ -171,6 +172,9 @@ struct wcn36xx {
>>
>>         struct sk_buff          *tx_ack_skb;
>>
>> +       /* Power management */
>> +       enum wcn36xx_power_state     pw_state;
> Shouldn't this be added to the vif struct instead of as a global?
>
> Cheers
> --
> Olof
>
> _______________________________________________
> wcn36xx mailing list
> wcn36xx at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/wcn36xx



--
Best regards,
Eugene



More information about the wcn36xx mailing list