> In general the driver should know how many rates it wants to report so > in TX-response path it's allocates enough memory. Yeah, obviously. > Since on the TX path tx_status resides on stack this has to be copied > by the driver for TX-response path use. I don't think I understand? This is tx status, what are you referring to by "tx response"? > void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, > struct sk_buff *skb, > struct ieee80211_tx_status *status) > > > skb->dev = local->mdev; > saved = kmalloc(sizeof(struct ieee80211_tx_status), GFP_ATOMIC); --- > this has to be changed as well. Yeah that's what I was thinking of. Maybe we should change the ieee80211_tx_status_irqsafe() interface and require the driver to allocate it rather than giving a pointer to a structure on the stack? That way we the driver has to do the calculation, but we don't have to copy things around? Doing it on the stack isn't easy, you'd have to define something like this: struct status { struct ieee80211_tx_status stat; struct ieee80211_tx_rate_ctrl ratectrl[N]; } status __attribute__((packed)); so requiring the driver to allocate it when using the irqsafe interface would be better imho. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part