Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	ipw3945-devel@lists.sourceforge.net,
	Mohamed Abbas <mabbas@linux.intel.com>
Subject: Re: [PATCH 3/8] mac80211: enable driver to notify mac of status, change iwlwifi
Date: Sat, 29 Mar 2008 00:41:37 +0100	[thread overview]
Message-ID: <1206747697.22530.100.camel@johannes.berg> (raw)
In-Reply-To: <1206746472-10443-4-git-send-email-reinette.chatre@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]


>  /**
> + * enum ieee80211_notification_type - Low level driver notification
> + * @TYPE_RE_ASSOC: start the re-association sequence

That I can understand, for whatever reason you want it to re-associate.
But please use a different prefix, not TYPE_, maybe something like
IEEE80211_NOTIFY_*

> + * @TYPE_DISCONNECT: disconnect from current association

That doesn't seem to make sense.

> + * @TYPE_RESET: low level driver HW problem reset

Nor that? Half-implemented?

Do you think suspend/resume should go through this interface as well? If
so, a hardware reset could just do a suspend/resume cycle and ignore
everything coming in during the suspend?

During suspend, I'd think the hardware should actually be deconfigured
completely and then re-configured completely for resume.

> +/*

Should be /**

> + * ieee80211_notify_mac - low level driver notification
> + * @hw: pointer as obtained from ieee80211_alloc_hw().
> + * @notification_types: enum ieee80211_notification_types
> + *
> + * This function must be called by low level driver to sync mac80211
> + * with low level state.
> + */
> +void ieee80211_notify_mac(struct ieee80211_hw *hw,
> +			  enum ieee80211_notification_types  notif_type);

I also think that the description could be more detailed. This seems to
indicate that somehow it's easy to get out of sync, it shouldn't be the
common case for that to happen!

> +	default:
> +		break;
> +	}
> +}
> +EXPORT_SYMBOL(ieee80211_notify_mac);

Please don't add default statements like that, just handle all cases,
that allows the compiler warnings to actually help coding.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  parent reply	other threads:[~2008-03-28 23:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 23:21 [PATCH 0/8] iwlwifi driver updates including one mac80211 change Reinette Chatre
2008-03-28 23:21 ` [PATCH 1/8] iwlwifi: add notification infrastructure to iwlcore Reinette Chatre
2008-03-28 23:21   ` [PATCH 2/8] iwlwifi: hook iwlwifi with Linux rfkill Reinette Chatre
2008-03-28 23:21     ` [PATCH 3/8] mac80211: enable driver to notify mac of status, change iwlwifi Reinette Chatre
2008-03-28 23:21       ` [PATCH 4/8] iwlwifi: fix race condition during driver unload Reinette Chatre
2008-03-28 23:21         ` [PATCH 5/8] iwlwifi: move rate registration to module load Reinette Chatre
2008-03-28 23:21           ` [PATCH 6/8] iwlwifi: unregister to upper stack before releasing resources Reinette Chatre
2008-03-28 23:21             ` [PATCH 7/8] iwlwifi: LED initialize before registering Reinette Chatre
2008-03-28 23:21               ` [PATCH 8/8] iwlwifi: Fix synchronous host command Reinette Chatre
2008-03-28 23:41       ` Johannes Berg [this message]
2008-03-31 20:23     ` [PATCH 2/8] iwlwifi: hook iwlwifi with Linux rfkill Johannes Berg

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=1206747697.22530.100.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mabbas@linux.intel.com \
    --cc=reinette.chatre@intel.com \
    /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