mac80211: fix led behavior in IBSS
PATCH 1/1 mac80211: fix led behavior in IBSS
From: Emmanuel Grumbach <[email protected]>
This patch fixes the led behavior in IBSS. After we joined an IBSS cell we need to inform the led that we got associated. Although there is no 802.11 association in IBSS mode, the semantic of "There is a link" is relevant. This allows the led to blink in IBSS mode (at least this solves a bug for iwlwifi).
--- net/mac80211/mlme.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/mlme.c +2 -0
@@ -1483,6 +1483,8 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, ifsta->state =IEEE80211_STA_MLME_IBSS_JOINED ;mod_timer (&ifsta->timer, jiffies +IEEE80211_IBSS_MERGE_INTERVAL ); +ieee80211_led_assoc (local, true); +memset (&wrqu,0 ,sizeof (wrqu));memcpy (wrqu.ap_addr.sa_data, bss->bssid,ETH_ALEN );wireless_send_event (sdata->dev,SIOCGIWAP , &wrqu,NULL );
Signature · 9 lines
1.5.4.3 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Johannes Berg
maintainerQuoted 7 lines · Tomas Winkler
From: Emmanuel Grumbach <[email protected]>
This patch fixes the led behavior in IBSS. After we joined an IBSS cell we need to inform the led that we got associated. Although there is no 802.11 association in IBSS mode, the semantic of "There is a link" is relevant. This allows the led to blink in IBSS mode (at least this solves a bug for iwlwifi).
Doesn't it also have to be turned off again at some point? Or is that done? Other than that looks fine to me.
Quoted 19 lines
Signed-off-by Emmanuel Grumbach <[email protected]>Reviewed-by Tomas Winkler <[email protected]>--- net/mac80211/mlme.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)net/mac80211/mlme.c +2
-0@@ -1483,6 +1483,8 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, ifsta->state =IEEE80211_STA_MLME_IBSS_JOINED ;mod_timer (&ifsta->timer, jiffies +IEEE80211_IBSS_MERGE_INTERVAL ); +ieee80211_led_assoc (local, true); +memset (&wrqu,0 ,sizeof (wrqu));memcpy (wrqu.ap_addr.sa_data, bss->bssid,ETH_ALEN );wireless_send_event (sdata->dev,SIOCGIWAP , &wrqu,NULL );
Quoted 11 lines · Johannes Berg
Quoted 7 lines · Tomas Winkler
From: Emmanuel Grumbach <[email protected]>
This patch fixes the led behavior in IBSS. After we joined an IBSS cell we need to inform the led that we got associated. Although there is no 802.11 association in IBSS mode, the semantic of "There is a link" is relevant. This allows the led to blink in IBSS mode (at least this solves a bug for iwlwifi).
Doesn't it also have to be turned off again at some point? Or is that done? Other than that looks fine to me.
I've asked my self the same question the answer is not clear. We switch the led off on close/ifdown by radio led trigger.
Note in IBSS is always connected, carrier is always on if I'm not mistaken. Tomas
Quoted 21 lines
Quoted 20 lines
Signed-off-by Emmanuel Grumbach <[email protected]>Reviewed-by Tomas Winkler <[email protected]>--- net/mac80211/mlme.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)net/mac80211/mlme.c +2
-0@@ -1483,6 +1483,8 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, ifsta->state =IEEE80211_STA_MLME_IBSS_JOINED ;mod_timer (&ifsta->timer, jiffies +IEEE80211_IBSS_MERGE_INTERVAL ); +ieee80211_led_assoc (local, true); +memset (&wrqu,0 ,sizeof (wrqu));memcpy (wrqu.ap_addr.sa_data, bss->bssid,ETH_ALEN );wireless_send_event (sdata->dev,SIOCGIWAP , &wrqu,NULL );
Johannes Berg
maintainerQuoted 11 lines · Tomas Winkler
Quoted 9 lines · Johannes Berg
Quoted 7 lines · Tomas Winkler
From: Emmanuel Grumbach <[email protected]>
This patch fixes the led behavior in IBSS. After we joined an IBSS cell we need to inform the led that we got associated. Although there is no 802.11 association in IBSS mode, the semantic of "There is a link" is relevant. This allows the led to blink in IBSS mode (at least this solves a bug for iwlwifi).
Quoted 6 lines
Quoted 2 lines
Doesn't it also have to be turned off again at some point? Or is that done? Other than that looks fine to me.
I've asked my self the same question the answer is not clear. We switch the led off on close/ifdown by radio led trigger.
Note in IBSS is always connected, carrier is always on if I'm not mistaken.
I think you can configure it off though, by setting the "essid" (oh how I hate that) to "off" or something? Not sure, and we can always fix it when we see the problem, I don't really care much about the LEDs, I don't have any.
johannes
Quoted 15 lines · Johannes Berg
Quoted 14 lines · Tomas Winkler
Quoted 11 lines · Johannes Berg
Quoted 7 lines · Tomas Winkler
From: Emmanuel Grumbach <[email protected]>
This patch fixes the led behavior in IBSS. After we joined an IBSS cell we need to inform the led that we got associated. Although there is no 802.11 association in IBSS mode, the semantic of "There is a link" is relevant. This allows the led to blink in IBSS mode (at least this solves a bug for iwlwifi).
Doesn't it also have to be turned off again at some point? Or is that done? Other than that looks fine to me.
Quoted 6 lines
Quoted 3 lines
I've asked my self the same question the answer is not clear. We switch the led off on close/ifdown by radio led trigger.
Note in IBSS is always connected, carrier is always on if I'm not mistaken.I think you can configure it off though, by setting the "essid" (oh how I hate that) to "off" or something?
Let see if we hit real world scenario, this patch fixes bug opened for long time.
Not sure, and we can always fix it
Quoted 2 lines
when we see the problem, I don't really care much about the LEDs, I don't have any.
Can send you few, just pick a color :)
Tomas