On 10/11/2018 12:01 AM, Johannes Berg wrote: > >> Agree. parameter validation can be done before scheduling the work, >> and hence appropriate error can be returned to caller . > > >> If I got your point correctly, you are referring to the lines that >> stores the parameters into the hif_drv->cfg_values. > > Well, I was actually thinking that I'm not even sure why you schedule > work at all!
Do you mean we should be doing the work from the cfg context? Note that this is called cfg80211_ops.set_wiphy_params(), and involves locking mutexes, packing the wids, bus operations, and waiting for the device to respond. >> Instead of packing the parameters in host structures like struct >> add_sta_param, then repacking it in the device format, it can use >> struct station_parameters and pack them directly into the device >> format > > Makes sense. Also note my other email on how there should be structs > involved, rather than open-coded WID entry lists. Thanks for the suggestion. I agree to that as well.