netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Jiri Benc <jbenc@suse.cz>
Cc: netdev@vger.kernel.org
Subject: d80211: The struct ieee80211_hw_modes array is a pain
Date: Wed, 13 Dec 2006 11:42:20 +0100	[thread overview]
Message-ID: <200612131142.20556.mb@bu3sch.de> (raw)

I am currently porting the bcm43xx driver to my new Sonics
Silicon Backplane busdriver.
I am having a major pain implementing the hw->modes field
for this. In particular, the problem is allocation.
I always felt sick about hw->modes, but with my new code it's
damn complicated to get allocation of the stuff right.
The problem is, that I do not know in advance which PHYMODEs
my device supports (in fact, we never knew that, but we worked
around it (in a broken way)).
We have the following scenario: The PHYs are probed one after
each other. We have one data structure per PHY. This bites
the static hw->modes array in its ass. I would either have to
allocate it "big enough" at the first time (wasting lots of memory)
or I'd have to re-allocate it every time a new PHY is probed.
Another (much harder to fix) problem is the opposite of the probing:
Removing the PHYs.

So, what I'd like to have is:

One struct ieee802111_hw_mode which I can embed into the PHY
data structure. This struct is now dynamically registered to the
ieee80211 subsystem (instead of doing a static array pain).

Registering and unregistering would be done with simple linked lists,
perhaps, in d80211.

If nobody has any objections against this approach, I will do a
patch soon.

-- 
Greetings Michael.

             reply	other threads:[~2006-12-13 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 10:42 Michael Buesch [this message]
2006-12-13 11:23 ` d80211: The struct ieee80211_hw_modes array is a pain Ivo Van Doorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612131142.20556.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=jbenc@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).