* [PATCH 2/8] ath9k: Use a subroutine to check for short scan
From: Sujith Manoharan @ 2013-08-01 6:23 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1375338204-2021-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/antenna.c | 37 ++++++++++++++++++++------------
1 file changed, 23 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c
index 0ba5b86..130e983 100644
--- a/drivers/net/wireless/ath/ath9k/antenna.c
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
@@ -579,6 +579,27 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
}
}
+static bool ath_ant_short_scan_check(struct ath_ant_comb *antcomb)
+{
+ int alt_ratio;
+
+ if (!antcomb->scan || !antcomb->alt_good)
+ return false;
+
+ if (time_after(jiffies, antcomb->scan_start_time +
+ msecs_to_jiffies(ATH_ANT_DIV_COMB_SHORT_SCAN_INTR)))
+ return true;
+
+ if (antcomb->total_pkt_count == ATH_ANT_DIV_COMB_SHORT_SCAN_PKTCOUNT) {
+ alt_ratio = ((antcomb->alt_recv_cnt * 100) /
+ antcomb->total_pkt_count);
+ if (alt_ratio < ATH_ANT_DIV_COMB_ALT_ANT_RATIO)
+ return true;
+ }
+
+ return false;
+}
+
void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
{
struct ath_hw_antcomb_conf div_ant_conf;
@@ -613,22 +634,10 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
}
/* Short scan check */
- if (antcomb->scan && antcomb->alt_good) {
- if (time_after(jiffies, antcomb->scan_start_time +
- msecs_to_jiffies(ATH_ANT_DIV_COMB_SHORT_SCAN_INTR)))
- short_scan = true;
- else
- if (antcomb->total_pkt_count ==
- ATH_ANT_DIV_COMB_SHORT_SCAN_PKTCOUNT) {
- alt_ratio = ((antcomb->alt_recv_cnt * 100) /
- antcomb->total_pkt_count);
- if (alt_ratio < ATH_ANT_DIV_COMB_ALT_ANT_RATIO)
- short_scan = true;
- }
- }
+ short_scan = ath_ant_short_scan_check(antcomb);
if (((antcomb->total_pkt_count < ATH_ANT_DIV_COMB_MAX_PKTCOUNT) ||
- rs->rs_moreaggr) && !short_scan)
+ rs->rs_moreaggr) && !short_scan)
return;
if (antcomb->total_pkt_count) {
--
1.8.3.4
^ permalink raw reply related
* [PATCH 1/8] ath9k: Do a quick scan only when scan_not_start is true
From: Sujith Manoharan @ 2013-08-01 6:23 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Right now, it is being done for all cases.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/antenna.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c
index 2785dc3..0ba5b86 100644
--- a/drivers/net/wireless/ath/ath9k/antenna.c
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
@@ -798,14 +798,12 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
}
goto div_comb_done;
}
+ ath_select_ant_div_from_quick_scan(antcomb, &div_ant_conf,
+ main_rssi_avg, alt_rssi_avg,
+ alt_ratio);
+ antcomb->quick_scan_cnt++;
}
- ath_select_ant_div_from_quick_scan(antcomb, &div_ant_conf,
- main_rssi_avg, alt_rssi_avg,
- alt_ratio);
-
- antcomb->quick_scan_cnt++;
-
div_comb_done:
ath_ant_div_conf_fast_divbias(&div_ant_conf, antcomb, alt_ratio);
ath9k_hw_antdiv_comb_conf_set(sc->sc_ah, &div_ant_conf);
--
1.8.3.4
^ permalink raw reply related
* [PATCH 3/8] ath9k: Add ALT check for cards with GROUP-3 config
From: Sujith Manoharan @ 2013-08-01 6:23 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1375338204-2021-1-git-send-email-sujith@msujith.org>
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/antenna.c | 50 +++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c
index 130e983..ee25165 100644
--- a/drivers/net/wireless/ath/ath9k/antenna.c
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
@@ -64,28 +64,45 @@ static inline bool ath_is_alt_ant_ratio_better(int alt_ratio, int maxdelta,
(alt_rssi_avg > main_rssi_avg + mindelta)) && (pkt_count > 50);
}
-static inline bool ath_ant_div_comb_alt_check(u8 div_group, int alt_ratio,
- int curr_main_set, int curr_alt_set,
- int alt_rssi_avg, int main_rssi_avg)
+static inline bool ath_ant_div_comb_alt_check(struct ath_hw_antcomb_conf conf,
+ int alt_ratio, int alt_rssi_avg,
+ int main_rssi_avg)
{
- bool result = false;
- switch (div_group) {
+ bool result, set1, set2;
+
+ result = set1 = set2 = false;
+
+ if (conf.main_lna_conf == ATH_ANT_DIV_COMB_LNA2 &&
+ conf.alt_lna_conf == ATH_ANT_DIV_COMB_LNA1)
+ set1 = true;
+
+ if (conf.main_lna_conf == ATH_ANT_DIV_COMB_LNA1 &&
+ conf.alt_lna_conf == ATH_ANT_DIV_COMB_LNA2)
+ set2 = true;
+
+ switch (conf.div_group) {
case 0:
if (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO)
result = true;
break;
case 1:
case 2:
- if ((((curr_main_set == ATH_ANT_DIV_COMB_LNA2) &&
- (curr_alt_set == ATH_ANT_DIV_COMB_LNA1) &&
- (alt_rssi_avg >= (main_rssi_avg - 5))) ||
- ((curr_main_set == ATH_ANT_DIV_COMB_LNA1) &&
- (curr_alt_set == ATH_ANT_DIV_COMB_LNA2) &&
- (alt_rssi_avg >= (main_rssi_avg - 2)))) &&
- (alt_rssi_avg >= 4))
+ if (alt_rssi_avg < 4)
+ break;
+
+ if ((set1 && (alt_rssi_avg >= (main_rssi_avg - 5))) ||
+ (set2 && (alt_rssi_avg >= (main_rssi_avg - 2))))
result = true;
- else
- result = false;
+
+ break;
+ case 3:
+ if (alt_rssi_avg < 4)
+ break;
+
+ if ((set1 && (alt_rssi_avg >= (main_rssi_avg - 3))) ||
+ (set2 && (alt_rssi_avg >= (main_rssi_avg + 3))))
+ result = true;
+
break;
}
@@ -671,9 +688,8 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
}
if (!antcomb->scan) {
- if (ath_ant_div_comb_alt_check(div_ant_conf.div_group,
- alt_ratio, curr_main_set, curr_alt_set,
- alt_rssi_avg, main_rssi_avg)) {
+ if (ath_ant_div_comb_alt_check(div_ant_conf, alt_ratio,
+ alt_rssi_avg, main_rssi_avg)) {
if (curr_alt_set == ATH_ANT_DIV_COMB_LNA2) {
/* Switch main and alt LNA */
div_ant_conf.main_lna_conf =
--
1.8.3.4
^ permalink raw reply related
* [PATCH] ieee80211: add definition for 802.11ac information elements
From: Fred Zhou @ 2013-08-01 6:16 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, Fred Zhou
Added element IDs for Extended BSS Load, VHT TX Power Envelope, AID, and Quiet Channel
Signed-off-by: Fred Zhou <fred.zy@gmail.com>
---
include/linux/ieee80211.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index b0dc87a..6b9e663 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1709,6 +1709,10 @@ enum ieee80211_eid {
WLAN_EID_OPMODE_NOTIF = 199,
WLAN_EID_WIDE_BW_CHANNEL_SWITCH = 194,
WLAN_EID_CHANNEL_SWITCH_WRAPPER = 196,
+ WLAN_EID_EXTENDED_BSS_LOAD = 193,
+ WLAN_EID_VHT_TX_POWER_ENVELOPE = 195,
+ WLAN_EID_AID = 197,
+ WLAN_EID_QUIET_CHANNEL = 198,
/* 802.11ad */
WLAN_EID_NON_TX_BSSID_CAP = 83,
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH] mac80211: implement critical protocol protection
From: Emmanuel Grumbach @ 2013-08-01 6:07 UTC (permalink / raw)
To: Arik Nemtsov; +Cc: Emmanuel Grumbach, linux-wireless, Johannes Berg
In-Reply-To: <CA+XVXfe_B08ELpNwfmiK1DJrhLWVVXLPvJH_s=g6DeUKgcotQQ@mail.gmail.com>
>> This new API add in cfg80211 wasn't implemented in mac80211.
>> Advertise the capabilities based on the device's
>> implementation (possibly NULL) of crit_prot mac80211 ops.
>>
>> This callback will be called by cfg80211 when hinted by
>> userspace that a critical protocol is happening, e.g. it can
>> be EAPOL, DHCP.
>>
>> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> [...]
>> +static int ieee80211_crit_proto_start(struct wiphy *wiphy,
>> + struct wireless_dev *wdev,
>> + enum nl80211_crit_proto_id protocol,
>> + u16 duration)
>> +{
>> + struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
>> + struct ieee80211_local *local = wiphy_priv(wiphy);
>> + int ret;
>> +
>> + ret = drv_crit_proto(local, sdata, protocol, true);
>> + if (!ret)
>> + return ret;
>
> Shouldn't this be "if (ret)" ?
You're obviously right...
>
> Also maybe the low-level driver should get the duration and indicate
> completion on its own? (similar to what Eliad suggested).
> Seems to me very similar to ROC, and would probably be implemented as
> such for some drivers.
>
yeah - that could make it.
I'll be unavailable in the coming 2 weeks though.
^ permalink raw reply
* Re: [PATCH v3] rtlwifi: rtl8192cu: fix function declaration header
From: Larry Finger @ 2013-08-01 2:39 UTC (permalink / raw)
To: Mark Schulte; +Cc: linville, linux-wireless
In-Reply-To: <1375324214-24271-1-git-send-email-schultetwin@gmail.com>
On 07/31/2013 09:30 PM, Mark Schulte wrote:
> Move rtl92cu_update_hal_rate_tbl declaration to hw.h to correspond with function
> definition in hw.c.
> Fixes sparse warning in hw.c warning: symbol 'rtl92cu_update_hal_rate_tbl' was
> not declared.
>
> Signed-off-by: Mark Schulte <schultetwin@gmail.com>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
The patch is good this time.
Larry
> ---
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++
> drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 ---
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> index 8e3ec1e..0f7812e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> @@ -109,5 +109,8 @@ void rtl92c_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus);
> void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
> u8 element_id, u32 cmd_len, u8 *p_cmdbuffer);
> bool rtl92cu_phy_mac_config(struct ieee80211_hw *hw);
> +void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
> + struct ieee80211_sta *sta,
> + u8 rssi_level);
>
> #endif
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> index 262e1e4..a1310ab 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> @@ -49,8 +49,5 @@ bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
> u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw,
> enum radio_path rfpath, u32 regaddr, u32 bitmask);
> void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
> -void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
> - struct ieee80211_sta *sta,
> - u8 rssi_level);
>
> #endif
>
^ permalink raw reply
* [PATCH v3] rtlwifi: rtl8192cu: fix function declaration header
From: Mark Schulte @ 2013-08-01 2:30 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Larry.Finger, Mark Schulte
Move rtl92cu_update_hal_rate_tbl declaration to hw.h to correspond with function
definition in hw.c.
Fixes sparse warning in hw.c warning: symbol 'rtl92cu_update_hal_rate_tbl' was
not declared.
Signed-off-by: Mark Schulte <schultetwin@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++
drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
index 8e3ec1e..0f7812e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
@@ -109,5 +109,8 @@ void rtl92c_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus);
void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
u8 element_id, u32 cmd_len, u8 *p_cmdbuffer);
bool rtl92cu_phy_mac_config(struct ieee80211_hw *hw);
+void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
+ struct ieee80211_sta *sta,
+ u8 rssi_level);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
index 262e1e4..a1310ab 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
@@ -49,8 +49,5 @@ bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 regaddr, u32 bitmask);
void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
-void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
- struct ieee80211_sta *sta,
- u8 rssi_level);
#endif
--
1.8.3.3
^ permalink raw reply related
* Re: [PATCH v2] rtlwifi: rtl8192cu: fix function declaration header
From: Larry Finger @ 2013-08-01 2:26 UTC (permalink / raw)
To: Mark Schulte; +Cc: linville, linux-wireless
In-Reply-To: <1375319810-20392-1-git-send-email-schultetwin@gmail.com>
On 07/31/2013 08:16 PM, Mark Schulte wrote:
> Move rtl92cu_update_hal_rate_tbl declartion to hw.h to correspond with function
The spelling is "declaration"!.
Larry
> definition in hw.c.
> Fixes sparse warning in hw.c warning: symbol 'rtl92cu_update_hal_rate_tbl' was
> not declared.
>
> Signed-off-by: Mark Schulte <schultetwin@gmail.com>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++
> drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 ---
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> index 8e3ec1e..0f7812e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
> @@ -109,5 +109,8 @@ void rtl92c_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus);
> void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
> u8 element_id, u32 cmd_len, u8 *p_cmdbuffer);
> bool rtl92cu_phy_mac_config(struct ieee80211_hw *hw);
> +void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
> + struct ieee80211_sta *sta,
> + u8 rssi_level);
>
> #endif
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> index 262e1e4..a1310ab 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
> @@ -49,8 +49,5 @@ bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
> u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw,
> enum radio_path rfpath, u32 regaddr, u32 bitmask);
> void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
> -void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
> - struct ieee80211_sta *sta,
> - u8 rssi_level);
>
> #endif
>
^ permalink raw reply
* [PATCH v2] rtlwifi: rtl8192cu: fix function declaration header
From: Mark Schulte @ 2013-08-01 1:16 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Larry.Finger, Mark Schulte
Move rtl92cu_update_hal_rate_tbl declartion to hw.h to correspond with function
definition in hw.c.
Fixes sparse warning in hw.c warning: symbol 'rtl92cu_update_hal_rate_tbl' was
not declared.
Signed-off-by: Mark Schulte <schultetwin@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 3 +++
drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
index 8e3ec1e..0f7812e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h
@@ -109,5 +109,8 @@ void rtl92c_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus);
void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
u8 element_id, u32 cmd_len, u8 *p_cmdbuffer);
bool rtl92cu_phy_mac_config(struct ieee80211_hw *hw);
+void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
+ struct ieee80211_sta *sta,
+ u8 rssi_level);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
index 262e1e4..a1310ab 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.h
@@ -49,8 +49,5 @@ bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw,
enum radio_path rfpath, u32 regaddr, u32 bitmask);
void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
-void rtl92cu_update_hal_rate_tbl(struct ieee80211_hw *hw,
- struct ieee80211_sta *sta,
- u8 rssi_level);
#endif
--
1.8.3.3
^ permalink raw reply related
* Re: [PATCH 0/8] include/net: next set of extern removals
From: Joe Perches @ 2013-08-01 0:58 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel, linux-afs, linux-hams, linux-wireless
In-Reply-To: <20130731.175036.1962194560242893587.davem@davemloft.net>
On Wed, 2013-07-31 at 17:50 -0700, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Wed, 31 Jul 2013 17:31:31 -0700
> > Standardize on no extern use on function prototypes
[]
> Please hold off for a few days before the next batch so we can watch
> for any fallout from this one.
Sure.
If/when nothing bad happens I'll send another couple
of sets next week.
^ permalink raw reply
* Re: [PATCH 0/8] include/net: next set of extern removals
From: David Miller @ 2013-08-01 0:50 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel, linux-afs, linux-hams, linux-wireless
In-Reply-To: <cover.1375316912.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 31 Jul 2013 17:31:31 -0700
> Standardize on no extern use on function prototypes
>
> Joe Perches (8):
> addrconf.h: Remove extern function prototypes
> af_unix.h: Remove extern from function prototypes
> af_rxrpc.h: Remove extern from function prototypes
> arp/neighbour.h: Remove extern from function prototypes
> ax25.h: Remove extern from function prototypes
> cfg80211.h/mac80211.h: Remove extern from function prototypes
> checksum: Remove extern from function prototypes
> cls_cgroup.h netprio_cgroup.h: Remove extern from function prototypes
I guess there is no time like the present to apply something like
this, so I have.
Please hold off for a few days before the next batch so we can watch
for any fallout from this one.
Thanks Joe.
^ permalink raw reply
* [PATCH 6/8] cfg80211.h/mac80211.h: Remove extern from function prototypes
From: Joe Perches @ 2013-08-01 0:31 UTC (permalink / raw)
To: netdev; +Cc: Johannes Berg, David S. Miller, linux-wireless, linux-kernel
In-Reply-To: <cover.1375316912.git.joe@perches.com>
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Reflow modified prototypes to 80 columns.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/cfg80211.h | 34 +++++++++++++++++-----------------
include/net/mac80211.h | 16 ++++++++--------
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7b0730a..f49de28 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2841,7 +2841,7 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
*
* Return: A non-negative wiphy index or a negative error code.
*/
-extern int wiphy_register(struct wiphy *wiphy);
+int wiphy_register(struct wiphy *wiphy);
/**
* wiphy_unregister - deregister a wiphy from cfg80211
@@ -2852,14 +2852,14 @@ extern int wiphy_register(struct wiphy *wiphy);
* pointer, but the call may sleep to wait for an outstanding
* request that is being handled.
*/
-extern void wiphy_unregister(struct wiphy *wiphy);
+void wiphy_unregister(struct wiphy *wiphy);
/**
* wiphy_free - free wiphy
*
* @wiphy: The wiphy to free
*/
-extern void wiphy_free(struct wiphy *wiphy);
+void wiphy_free(struct wiphy *wiphy);
/* internal structs */
struct cfg80211_conn;
@@ -3014,14 +3014,14 @@ static inline void *wdev_priv(struct wireless_dev *wdev)
* @band: band, necessary due to channel number overlap
* Return: The corresponding frequency (in MHz), or 0 if the conversion failed.
*/
-extern int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
+int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
/**
* ieee80211_frequency_to_channel - convert frequency to channel number
* @freq: center frequency
* Return: The corresponding channel, or 0 if the conversion failed.
*/
-extern int ieee80211_frequency_to_channel(int freq);
+int ieee80211_frequency_to_channel(int freq);
/*
* Name indirection necessary because the ieee80211 code also has
@@ -3030,8 +3030,8 @@ extern int ieee80211_frequency_to_channel(int freq);
* to include both header files you'll (rightfully!) get a symbol
* clash.
*/
-extern struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
- int freq);
+struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
+ int freq);
/**
* ieee80211_get_channel - get channel struct from wiphy for specified frequency
* @wiphy: the struct wiphy to get the channel for
@@ -3141,13 +3141,14 @@ struct ieee80211_radiotap_iterator {
int _reset_on_ext;
};
-extern int ieee80211_radiotap_iterator_init(
- struct ieee80211_radiotap_iterator *iterator,
- struct ieee80211_radiotap_header *radiotap_header,
- int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns);
+int
+ieee80211_radiotap_iterator_init(struct ieee80211_radiotap_iterator *iterator,
+ struct ieee80211_radiotap_header *radiotap_header,
+ int max_length,
+ const struct ieee80211_radiotap_vendor_namespaces *vns);
-extern int ieee80211_radiotap_iterator_next(
- struct ieee80211_radiotap_iterator *iterator);
+int
+ieee80211_radiotap_iterator_next(struct ieee80211_radiotap_iterator *iterator);
extern const unsigned char rfc1042_header[6];
@@ -3307,7 +3308,7 @@ const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
*
* Return: 0 on success. -ENOMEM.
*/
-extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
+int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
/**
* wiphy_apply_custom_regulatory - apply a custom driver regulatory domain
@@ -3321,9 +3322,8 @@ extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
* default channel settings will be disregarded. If no rule is found for a
* channel on the regulatory domain the channel will be disabled.
*/
-extern void wiphy_apply_custom_regulatory(
- struct wiphy *wiphy,
- const struct ieee80211_regdomain *regd);
+void wiphy_apply_custom_regulatory(struct wiphy *wiphy,
+ const struct ieee80211_regdomain *regd);
/**
* freq_reg_info - get regulatory information for the given frequency
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5b7a3da..e5f0290 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2877,14 +2877,14 @@ enum ieee80211_tpt_led_trigger_flags {
};
#ifdef CONFIG_MAC80211_LEDS
-extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_create_tpt_led_trigger(
- struct ieee80211_hw *hw, unsigned int flags,
- const struct ieee80211_tpt_blink *blink_table,
- unsigned int blink_table_len);
+char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw);
+char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw);
+char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw);
+char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw);
+char *__ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
+ unsigned int flags,
+ const struct ieee80211_tpt_blink *blink_table,
+ unsigned int blink_table_len);
#endif
/**
* ieee80211_get_tx_led_name - get name of TX LED
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* [PATCH 0/8] include/net: next set of extern removals
From: Joe Perches @ 2013-08-01 0:31 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, linux-afs, linux-hams, linux-wireless
Standardize on no extern use on function prototypes
Joe Perches (8):
addrconf.h: Remove extern function prototypes
af_unix.h: Remove extern from function prototypes
af_rxrpc.h: Remove extern from function prototypes
arp/neighbour.h: Remove extern from function prototypes
ax25.h: Remove extern from function prototypes
cfg80211.h/mac80211.h: Remove extern from function prototypes
checksum: Remove extern from function prototypes
cls_cgroup.h netprio_cgroup.h: Remove extern from function prototypes
include/net/addrconf.h | 160 +++++++++++++++-----------------
include/net/af_rxrpc.h | 35 ++++---
include/net/af_unix.h | 16 ++--
include/net/arp.h | 30 +++---
include/net/ax25.h | 215 ++++++++++++++++++++++---------------------
include/net/cfg80211.h | 34 +++----
include/net/checksum.h | 10 +-
include/net/cls_cgroup.h | 2 +-
include/net/mac80211.h | 16 ++--
include/net/neighbour.h | 98 ++++++++++----------
include/net/netprio_cgroup.h | 2 +-
11 files changed, 300 insertions(+), 318 deletions(-)
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply
* Re: CLI scan tool needed
From: Thomas Klute @ 2013-07-31 21:24 UTC (permalink / raw)
To: Michael McElroy; +Cc: Krishna Chaitanya, linux-wireless
In-Reply-To: <CAJt7DwzwyOKso_zNyemnX0LdXvtrWiuoaRJ8dnN8FKVjxiaayg@mail.gmail.com>
Am 31.07.2013 22:51, schrieb Michael McElroy:
> Thanks Krishna, but all it returns is OK. Running the version 2.0 of
> wpa_supplicant.
I think the command you want is "scan_results" instead of "scan", so
"wpa_cli -i <interface> scan_results" over all. ;-)
> On Wed, Jul 31, 2013 at 4:30 PM, Krishna Chaitanya
> <chaitanya.mgit@gmail.com> wrote:
>> On Wed, Jul 31, 2013 at 11:57 PM, Michael McElroy <mikem388@gmail.com> wrote:
>>> Using the backports project, I have one of the latest ralink driver
>>> going on an arm processor running 2.6.29 along with all nl80211 parts.
>>> Works great, thank you! The last piece I need is to get the to SSID
>>> list, their security protocols, and signal strength. I'm looking for
>>> output similar to 'wilist scanning'. 'iw scan' gives a lot of info but
>>> not quite what I need without a lot of massaging.
>>
>> "wpa_cli -i <interface> scan"
>> this should give you the required info, if you are already running the
>> wpa_supplicant.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: CLI scan tool needed
From: Michael McElroy @ 2013-07-31 21:24 UTC (permalink / raw)
To: Krishna Chaitanya; +Cc: linux-wireless
In-Reply-To: <CAJt7DwzwyOKso_zNyemnX0LdXvtrWiuoaRJ8dnN8FKVjxiaayg@mail.gmail.com>
Got it. Had to do a scan_results after the scan.
Thank you.
On Wed, Jul 31, 2013 at 4:51 PM, Michael McElroy <mikem388@gmail.com> wrote:
> Thanks Krishna, but all it returns is OK. Running the version 2.0 of
> wpa_supplicant.
>
>
> On Wed, Jul 31, 2013 at 4:30 PM, Krishna Chaitanya
> <chaitanya.mgit@gmail.com> wrote:
>> On Wed, Jul 31, 2013 at 11:57 PM, Michael McElroy <mikem388@gmail.com> wrote:
>>> Using the backports project, I have one of the latest ralink driver
>>> going on an arm processor running 2.6.29 along with all nl80211 parts.
>>> Works great, thank you! The last piece I need is to get the to SSID
>>> list, their security protocols, and signal strength. I'm looking for
>>> output similar to 'wilist scanning'. 'iw scan' gives a lot of info but
>>> not quite what I need without a lot of massaging.
>>
>> "wpa_cli -i <interface> scan"
>> this should give you the required info, if you are already running the
>> wpa_supplicant.
^ permalink raw reply
* Re: CLI scan tool needed
From: Michael McElroy @ 2013-07-31 20:51 UTC (permalink / raw)
To: Krishna Chaitanya; +Cc: linux-wireless
In-Reply-To: <CABPxzYJQB_Lsi4aYkSfvULEgToECAdfZfJCtpm1u4Fo7ibc02g@mail.gmail.com>
Thanks Krishna, but all it returns is OK. Running the version 2.0 of
wpa_supplicant.
On Wed, Jul 31, 2013 at 4:30 PM, Krishna Chaitanya
<chaitanya.mgit@gmail.com> wrote:
> On Wed, Jul 31, 2013 at 11:57 PM, Michael McElroy <mikem388@gmail.com> wrote:
>> Using the backports project, I have one of the latest ralink driver
>> going on an arm processor running 2.6.29 along with all nl80211 parts.
>> Works great, thank you! The last piece I need is to get the to SSID
>> list, their security protocols, and signal strength. I'm looking for
>> output similar to 'wilist scanning'. 'iw scan' gives a lot of info but
>> not quite what I need without a lot of massaging.
>
> "wpa_cli -i <interface> scan"
> this should give you the required info, if you are already running the
> wpa_supplicant.
^ permalink raw reply
* Re: CLI scan tool needed
From: Krishna Chaitanya @ 2013-07-31 20:30 UTC (permalink / raw)
To: Michael McElroy; +Cc: linux-wireless
In-Reply-To: <CAJt7DwytQzEMzn9way1z5ag-vo=GsYF72uvmAJEcJeJs=Y-hfw@mail.gmail.com>
On Wed, Jul 31, 2013 at 11:57 PM, Michael McElroy <mikem388@gmail.com> wrote:
> Using the backports project, I have one of the latest ralink driver
> going on an arm processor running 2.6.29 along with all nl80211 parts.
> Works great, thank you! The last piece I need is to get the to SSID
> list, their security protocols, and signal strength. I'm looking for
> output similar to 'wilist scanning'. 'iw scan' gives a lot of info but
> not quite what I need without a lot of massaging.
"wpa_cli -i <interface> scan"
this should give you the required info, if you are already running the
wpa_supplicant.
^ permalink raw reply
* Re: [PATCH] mac80211: implement critical protocol protection
From: Arik Nemtsov @ 2013-07-31 19:59 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: linux-wireless, Johannes Berg
In-Reply-To: <1374826090-17322-1-git-send-email-johannes@sipsolutions.net>
On Fri, Jul 26, 2013 at 11:08 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
>
> This new API add in cfg80211 wasn't implemented in mac80211.
> Advertise the capabilities based on the device's
> implementation (possibly NULL) of crit_prot mac80211 ops.
>
> This callback will be called by cfg80211 when hinted by
> userspace that a critical protocol is happening, e.g. it can
> be EAPOL, DHCP.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[...]
> +static int ieee80211_crit_proto_start(struct wiphy *wiphy,
> + struct wireless_dev *wdev,
> + enum nl80211_crit_proto_id protocol,
> + u16 duration)
> +{
> + struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
> + struct ieee80211_local *local = wiphy_priv(wiphy);
> + int ret;
> +
> + ret = drv_crit_proto(local, sdata, protocol, true);
> + if (!ret)
> + return ret;
Shouldn't this be "if (ret)" ?
Also maybe the low-level driver should get the duration and indicate
completion on its own? (similar to what Eliad suggested).
Seems to me very similar to ROC, and would probably be implemented as
such for some drivers.
> +
> + ieee80211_queue_delayed_work(&sdata->local->hw,
> + &sdata->crit_prot_end_wk,
> + msecs_to_jiffies(duration));
> + return 0;
> +}
Arik
^ permalink raw reply
* Re: [GIT] [NFC] 3.11 fixes
From: John W. Linville @ 2013-07-31 19:15 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: Linux Wireless, Linux NFC
In-Reply-To: <20130730235915.GA4641@zurbaran>
On Wed, Jul 31, 2013 at 01:59:15AM +0200, Samuel Ortiz wrote:
> Hi John,
>
> This is the second NFC fixes pull request for 3.11.
>
> We have:
>
> 1) A build failure fix for the NCI SPI transport layer due to a
> missing CRC_CCITT Kconfig dependency.
>
> 2) A netlink command rename: CMD_FW_UPLOAD was merged during the 3.11
> merge window but the typical terminology for loading a firmware to a
> target is firmware download rather than upload. In order to avoid any
> confusion in a file exported to userspace, we rename this command to
> CMD_FW_DOWNLOAD.
>
> I realize 2) might not meet the net.git criteria for what fixes are. If
> you don't want to take it then I'll have to push it through the
> 3.12 merge window. If that's the case, and you only want to take 1) then
> please use tags/nfc-3.11-1 instead of tags/nfc-3.11-2 in your pull URL.
>
> The following changes since commit 64b6f46f1141ad938e354f37af62e28da972e8eb:
>
> ath9k_hw: Fix multicast search for AR9002 family (2013-07-18 16:22:00 -0400)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-fixes.git tags/nfc-fixes-3.11-2
>
> for you to fetch changes up to 9ea7187c53f63e31f2d1b2b1e474e31808565009:
>
> NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD (2013-07-31 01:19:43 +0200)
Pulling now...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH 3.11] cfg80211: fix P2P GO interface teardown
From: Johannes Berg @ 2013-07-31 19:26 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linux-wireless
In-Reply-To: <51F9632B.8090105@broadcom.com>
On Wed, 2013-07-31 at 21:19 +0200, Arend van Spriel wrote:
> On 07/31/2013 09:17 PM, Johannes Berg wrote:
> > On Wed, 2013-07-31 at 21:02 +0200, Johannes Berg wrote:
> >> From: Johannes Berg <johannes.berg@intel.com>
> >>
> >> When a P2P GO interface goes down, cfg80211 doesn't properly
> >> tear it down, leading to warnings later. Add the GO interface
> >> type to the enumeration to tear it down like AP interfaces.
> >> Otherwise, we leave it pending and mac80211's state can get
> >> very confused, leading to warnings later.
> >
> > Applied
> >
> > (it's obvious and we've tested it for a while)
>
> We'll see what happens when I test it with brcmfmac :-p
Do you even know how to test it? ;-)
Normally we don't go into this code path because wpa_supplicant will
properly clean up before removing the GO interface - we only saw it with
rfkill and/or doing 'ip link set wlan0-p2p-0 down' or so.
johannes
^ permalink raw reply
* pull-request: mac80211 2013-07-31
From: Johannes Berg @ 2013-07-31 19:25 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]
John,
Another pull request for mac80211 - this time with a bunch of important
fixes.
I have a fix from Chris for an infinite loop along with fixes from
myself to prevent it entering the loop to start with (continue using
disabled channels, many thanks to Chris for his debug/test help) and a
workaround for broken APs that advertise a bad HT primary channel in
their beacons. Additionally, a fix for another attrbuf race in mac80211
and a fix to clean up properly while P2P GO interfaces go down.
Let me know if there's any problem.
johannes
The following changes since commit 23df0b731954502a9391e739b92927cee4360343:
regulatory: use correct regulatory initiator on wiphy register (2013-07-25 09:52:46 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john
for you to fetch changes up to ddfe49b42d8ad4bfdf92d63d4a74f162660d878d:
mac80211: continue using disabled channels while connected (2013-07-31 21:18:17 +0200)
----------------------------------------------------------------
Chris Wright (1):
mac80211: fix infinite loop in ieee80211_determine_chantype
Johannes Berg (5):
nl80211: fix another nl80211_fam.attrbuf race
mac80211: don't wait for TX status forever
mac80211: ignore HT primary channel while connected
cfg80211: fix P2P GO interface teardown
mac80211: continue using disabled channels while connected
net/mac80211/mlme.c | 54 +++++++++++++++++++++++++++++++++-----------------
net/wireless/core.c | 1 +
net/wireless/nl80211.c | 6 ++++--
3 files changed, 41 insertions(+), 20 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH 3.11] cfg80211: fix P2P GO interface teardown
From: Arend van Spriel @ 2013-07-31 19:19 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1375298245.8289.19.camel@jlt4.sipsolutions.net>
On 07/31/2013 09:17 PM, Johannes Berg wrote:
> On Wed, 2013-07-31 at 21:02 +0200, Johannes Berg wrote:
>> From: Johannes Berg <johannes.berg@intel.com>
>>
>> When a P2P GO interface goes down, cfg80211 doesn't properly
>> tear it down, leading to warnings later. Add the GO interface
>> type to the enumeration to tear it down like AP interfaces.
>> Otherwise, we leave it pending and mac80211's state can get
>> very confused, leading to warnings later.
>
> Applied
>
> (it's obvious and we've tested it for a while)
We'll see what happens when I test it with brcmfmac :-p
Gr. AvS
^ permalink raw reply
* Re: [PATCH 3.11] mac80211: ignore HT primary channel while connected
From: Johannes Berg @ 2013-07-31 19:18 UTC (permalink / raw)
To: linux-wireless; +Cc: Arkadiusz Miskiewicz, Andy Isaacson, Stanislaw Gruszka
In-Reply-To: <1375264234-31077-1-git-send-email-johannes@sipsolutions.net>
On Wed, 2013-07-31 at 11:50 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> While we're connected, the AP shouldn't change the primary channel
> in the HT information. We checked this, and dropped the connection
> if it did change it.
>
> Unfortunately, this is causing problems on some APs, e.g. on the
> Netgear WRT610NL: the beacons seem to always contain a bad channel
> and if we made a connection using a probe response (correct data)
> we drop the connection immediately and can basically not connect
> properly at all.
>
> Work around this by ignoring the HT primary channel information in
> beacons if we're already connected.
>
> Also print out more verbose messages in the other situations to
> help diagnose similar bugs quicker in the future.
Applied.
johannes
^ permalink raw reply
* Re: [PATCH 3.11] mac80211: don't wait for TX status forever
From: Johannes Berg @ 2013-07-31 19:17 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1375258961-26321-1-git-send-email-johannes@sipsolutions.net>
On Wed, 2013-07-31 at 10:22 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> TX status notification can get lost, or the frames could
> get stuck on the queue, so don't wait for the callback
> from the driver forever and instead time out after half
> a second.
Applied.
johannes
^ permalink raw reply
* Re: [PATCH 3.11] cfg80211: fix P2P GO interface teardown
From: Johannes Berg @ 2013-07-31 19:17 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1375297347-1380-1-git-send-email-johannes@sipsolutions.net>
On Wed, 2013-07-31 at 21:02 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> When a P2P GO interface goes down, cfg80211 doesn't properly
> tear it down, leading to warnings later. Add the GO interface
> type to the enumeration to tear it down like AP interfaces.
> Otherwise, we leave it pending and mac80211's state can get
> very confused, leading to warnings later.
Applied
(it's obvious and we've tested it for a while)
johannes
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox