Search Linux Wireless

Re: [RFCv2 6/6] cfg80211: implement cfg80211_get_station cfg80211 API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/04/14 12:06, Johannes Berg wrote:
> On Sun, 2014-03-30 at 22:35 +0200, Antonio Quartulli wrote:
> 
>>  /**
>> + * cfg80211_get_station - retrieve information about a given station
>> + * @dev: the device where the station is supposed to be connected to
>> + * @mac_addr: the mac address of the station of interest
>> + * @sinfo: pointer to the structure to fill with the information
>> + *
>> + * Returns 0 on success or a negative error code otherwise.
>> + */
>> +int cfg80211_get_station(struct net_device *dev, u8 *mac_addr,
>> +			 struct station_info *sinfo);
> 
> mac_addr should be const

True

> 
> Any thoughts about clearing/filling/partially filling *sinfo when
> returning an error?

At the moment this function relies on what rdev_get_station() does and I
always assumed that in case of error the content of *sinfo should be
considered "undefined".

An option can be to set the object to 0 in case of error, but is it
really needed?

Any other change should be applied to rdev->ops->get_station(), not
here. I.e. fill the object as much as possible and never return an error
- just flag what was filled.


Cheers,

-- 
Antonio Quartulli

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux