Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
  net: Make "networking" one-click deselectable.
  ipv6: Fix useless proc net sockstat6 removal
  tcp: MD5: Use MIB counter instead of warning for MD5 mismatch.
  pkt_sched: Fix OOPS on ingress qdisc add.
  niu: Fix error checking in niu_ethflow_to_class.
  IPv6: datagram_send_ctl() should exit immediately when an error occured
  mac80211: fix mesh beaconing
  PS3: gelic: use unsigned long for irqflags
  mac80211: fix cfg80211 hooks for master interface
  nl80211: fix dump callbacks
  mac80211: partially fix skb->cb use
  rtl8187: Improve wireless statistics for RTL8187B
  rtl8187: Fix for TX sequence number problem
  mac80211: append CONFIG_ to MAC80211_VERBOSE_PS_DEBUG in net/mac80211/tx.c.
  mac80211: fix sparse integer as NULL pointer warning
  drivers/net/wireless/iwlwifi/iwl-led.c: printk fix
  mac80211: return correct error return from ieee80211_wep_init
  mac80211: tx, use dev_kfree_skb_any for beacon_get
  rt2x00: Clear queue entry flags during initialization
  rt2x00: Force full register config after start()
  ...
  • Loading branch information
Linus Torvalds committed Jul 30, 2008
2 parents afd962a + 031cf19 commit a4319d9
Show file tree
Hide file tree
Showing 57 changed files with 713 additions and 486 deletions.
20 changes: 16 additions & 4 deletions Documentation/rfkill.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,10 @@ rfkill lines are inactive, it must return RFKILL_STATE_SOFT_BLOCKED if its soft
rfkill input line is active. Only if none of the rfkill input lines are
active, will it return RFKILL_STATE_UNBLOCKED.

If it doesn't implement the get_state() hook, it must make sure that its calls
to rfkill_force_state() are enough to keep the status always up-to-date, and it
must do a rfkill_force_state() on resume from sleep.
Since the device has a hardware rfkill line, it IS subject to state changes
external to rfkill. Therefore, the driver must make sure that it calls
rfkill_force_state() to keep the status always up-to-date, and it must do a
rfkill_force_state() on resume from sleep.

Every time the driver gets a notification from the card that one of its rfkill
lines changed state (polling might be needed on badly designed cards that don't
Expand Down Expand Up @@ -422,13 +423,24 @@ of the hardware is unknown), or read-write (where the hardware can be queried
about its current state).

The rfkill class will call the get_state hook of a device every time it needs
to know the *real* current state of the hardware. This can happen often.
to know the *real* current state of the hardware. This can happen often, but
it does not do any polling, so it is not enough on hardware that is subject
to state changes outside of the rfkill subsystem.

Therefore, calling rfkill_force_state() when a state change happens is
mandatory when the device has a hardware rfkill line, or when something else
like the firmware could cause its state to be changed without going through the
rfkill class.

Some hardware provides events when its status changes. In these cases, it is
best for the driver to not provide a get_state hook, and instead register the
rfkill class *already* with the correct status, and keep it updated using
rfkill_force_state() when it gets an event from the hardware.

rfkill_force_state() must be used on the device resume handlers to update the
rfkill status, should there be any chance of the device status changing during
the sleep.

There is no provision for a statically-allocated rfkill struct. You must
use rfkill_allocate() to allocate one.

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6417,7 +6417,7 @@ static int niu_ethflow_to_class(int flow_type, u64 *class)
*class = CLASS_CODE_SCTP_IPV6;
break;
default:
return -1;
return 0;
}

return 1;
Expand Down
12 changes: 6 additions & 6 deletions drivers/net/ps3_gelic_wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ static int gelic_wl_set_encode(struct net_device *netdev,
struct gelic_wl_info *wl = port_wl(netdev_priv(netdev));
struct iw_point *enc = &data->encoding;
__u16 flags;
unsigned int irqflag;
unsigned long irqflag;
int key_index, index_specified;
int ret = 0;

Expand Down Expand Up @@ -1097,7 +1097,7 @@ static int gelic_wl_get_encode(struct net_device *netdev,
{
struct gelic_wl_info *wl = port_wl(netdev_priv(netdev));
struct iw_point *enc = &data->encoding;
unsigned int irqflag;
unsigned long irqflag;
unsigned int key_index, index_specified;
int ret = 0;

Expand Down Expand Up @@ -1215,7 +1215,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev,
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
__u16 alg;
__u16 flags;
unsigned int irqflag;
unsigned long irqflag;
int key_index;
int ret = 0;

Expand Down Expand Up @@ -1303,7 +1303,7 @@ static int gelic_wl_get_encodeext(struct net_device *netdev,
struct gelic_wl_info *wl = port_wl(netdev_priv(netdev));
struct iw_point *enc = &data->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
unsigned int irqflag;
unsigned long irqflag;
int key_index;
int ret = 0;
int max_key_len;
Expand Down Expand Up @@ -1426,7 +1426,7 @@ static int gelic_wl_priv_set_psk(struct net_device *net_dev,
{
struct gelic_wl_info *wl = port_wl(netdev_priv(net_dev));
unsigned int len;
unsigned int irqflag;
unsigned long irqflag;
int ret = 0;

pr_debug("%s:<- len=%d\n", __func__, data->data.length);
Expand Down Expand Up @@ -1467,7 +1467,7 @@ static int gelic_wl_priv_get_psk(struct net_device *net_dev,
{
struct gelic_wl_info *wl = port_wl(netdev_priv(net_dev));
char *p;
unsigned int irqflag;
unsigned long irqflag;
unsigned int i;

pr_debug("%s:<-\n", __func__);
Expand Down
Loading

0 comments on commit a4319d9

Please sign in to comment.