Search Linux Wireless

Re: [RFC 2/2] mac80211: revamp interface and filter configuration

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

 



Just had another idea related to this patch:

Currently, we pass multi_count >= 0 or == -1. And then we expect the
driver to call ieee80211_get_mc_list_item() to get the items. However,
the count is bogus because we add up all counts of the virtual
interfaces and don't account for duplicates. Also, however, no driver
cares about the count anyway.

Hence, we could instead of passing multi_count pass the getter function:

-        void (*configure_filter)(struct ieee80211_hw *hw, int multi_count,
-                                 unsigned int changed_flags,   
-                                 unsigned int *total_flags);
+	void (*configure_filter)(struct ieee80211_hw *hw,
+				 struct dev_mc_list * (*get_mc_item)(struct ieee80211_hw *hw,
+								     void *cookie),
+				 void *cookie,
+				 unsigned int changed_flags, unsigned int total_flags)

That way,
 (1) we get rid of the export of ieee80211_get_mc_list_item
 (2) get_mc_item gets to have a nicer interface without double pointers
 (3) there's no danger of somebody calling it outside the right place
 (4) we can use a NULL function/cookie ptr to indicate that the
     list hasn't changed.

Thoughts? I think I'll implement this, I like it much better than the
current interface. And I'll also look into getting it non-atomic. We're
not protected against concurrent execution anyway, but I expect drivers
would handle that? Or do we want that here? We can't protect all
callbacks among each other anyway with the tx() callback etc...

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux