platform/kernel/linux-starfive.git
10 years agostaging: rtl8723au: rtw_do_join23a(): Use __func__ to get function name in debug...
Jes Sorensen [Mon, 9 Jun 2014 13:16:51 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_do_join23a(): Use __func__ to get function name in debug messages

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Introduce rtw_do_join_network()
Jes Sorensen [Mon, 9 Jun 2014 13:16:50 +0000 (15:16 +0200)]
staging: rtl8723au: Introduce rtw_do_join_network()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Introduce rtw_select_candidate_from_queue()
Jes Sorensen [Mon, 9 Jun 2014 13:16:49 +0000 (15:16 +0200)]
staging: rtl8723au: Introduce rtw_select_candidate_from_queue()

This splits a portion of rtw_select_and_join_from_scanned_queue23a()
into rtw_select_candidate_from_queue()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Don't prepend debug console messages with 'ERROR '
Jes Sorensen [Mon, 9 Jun 2014 13:16:48 +0000 (15:16 +0200)]
staging: rtl8723au: Don't prepend debug console messages with 'ERROR '

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Minor debug message fixup
Jes Sorensen [Mon, 9 Jun 2014 13:16:47 +0000 (15:16 +0200)]
staging: rtl8723au: Minor debug message fixup

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_do_join23a(): Use correct error return values
Jes Sorensen [Mon, 9 Jun 2014 13:16:46 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_do_join23a(): Use correct error return values

Don't mix true/fail with _SUCCESS/_FAIL as return value

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_cfg80211_add_wep(): Use WLAN_KEY_LEN_*
Jes Sorensen [Mon, 9 Jun 2014 13:16:45 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_cfg80211_add_wep(): Use WLAN_KEY_LEN_*

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_set_ssid(): This is never called with _FW_UNDER_LINKING
Jes Sorensen [Mon, 9 Jun 2014 13:16:44 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_set_ssid(): This is never called with _FW_UNDER_LINKING

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Pass a struct wlan_network to rtw_set_ssid()
Jes Sorensen [Mon, 9 Jun 2014 13:16:43 +0000 (15:16 +0200)]
staging: rtl8723au: Pass a struct wlan_network to rtw_set_ssid()

There is no point copying the ssid out of struct wlan_network when we
can just pass on the whole struct.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: cfg80211_rtw_connect(): Simplify ssid preparation
Jes Sorensen [Mon, 9 Jun 2014 13:16:42 +0000 (15:16 +0200)]
staging: rtl8723au: cfg80211_rtw_connect(): Simplify ssid preparation

Since we just matched sme->{ssid,ssid_len} to
pnetwork->network.Ssid.{ssid,ssid_len} we can simplify the copy and
move it to just before the call to rtw_set_ssid().

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: cfg80211_rtw_connect(): Remove obfuscating pointers
Jes Sorensen [Mon, 9 Jun 2014 13:16:41 +0000 (15:16 +0200)]
staging: rtl8723au: cfg80211_rtw_connect(): Remove obfuscating pointers

dst_ssid and dst_bssid were just obfuscating that we were in fact
looking at pnetwork.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: cfg80211_rtw_connect(): Clean up various bits
Jes Sorensen [Mon, 9 Jun 2014 13:16:40 +0000 (15:16 +0200)]
staging: rtl8723au: cfg80211_rtw_connect(): Clean up various bits

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Move rtw_set_802_11_ssid23a() to ioctl_cfg80211.c
Jes Sorensen [Mon, 9 Jun 2014 13:16:39 +0000 (15:16 +0200)]
staging: rtl8723au: Move rtw_set_802_11_ssid23a() to ioctl_cfg80211.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Fold rtw_set_802_11_authentication_mode23a() into cfg80211_rtw_co...
Jes Sorensen [Mon, 9 Jun 2014 13:16:38 +0000 (15:16 +0200)]
staging: rtl8723au: Fold rtw_set_802_11_authentication_mode23a() into cfg80211_rtw_connect()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: cfg80211_rtw_connect(): Check correct return value from rtw_set_8...
Jes Sorensen [Mon, 9 Jun 2014 13:16:37 +0000 (15:16 +0200)]
staging: rtl8723au: cfg80211_rtw_connect(): Check correct return value from rtw_set_802_11_ssid23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Make rtw_is_same_ibss23a() return bool
Jes Sorensen [Mon, 9 Jun 2014 13:16:36 +0000 (15:16 +0200)]
staging: rtl8723au: Make rtw_is_same_ibss23a() return bool

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Get rid of IW_ESSID_MAX_SIZE
Jes Sorensen [Mon, 9 Jun 2014 13:16:35 +0000 (15:16 +0200)]
staging: rtl8723au: Get rid of IW_ESSID_MAX_SIZE

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: OnAuth23a(): Use ether_addr_copy()
Jes Sorensen [Mon, 9 Jun 2014 13:16:34 +0000 (15:16 +0200)]
staging: rtl8723au: OnAuth23a(): Use ether_addr_copy()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_stadel_event_callback23a(): Remove superfluous memset()
Jes Sorensen [Mon, 9 Jun 2014 13:16:33 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_stadel_event_callback23a(): Remove superfluous memset()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: free_scanqueue(): Use _rtw_free_network23a()
Jes Sorensen [Mon, 9 Jun 2014 13:16:32 +0000 (15:16 +0200)]
staging: rtl8723au: free_scanqueue(): Use _rtw_free_network23a()

Use _rtw_free_network23() so elements are freed in one place.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: collect_bss_info(): Don't memset() what we just kzalloc()'d
Jes Sorensen [Mon, 9 Jun 2014 13:16:31 +0000 (15:16 +0200)]
staging: rtl8723au: collect_bss_info(): Don't memset() what we just kzalloc()'d

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Allocate struct wlan_bssid_ex in collect_bss_info()
Jes Sorensen [Mon, 9 Jun 2014 13:16:30 +0000 (15:16 +0200)]
staging: rtl8723au: Allocate struct wlan_bssid_ex in collect_bss_info()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Do not embed struct wlan_bssid_ex in struct survey_event
Jes Sorensen [Mon, 9 Jun 2014 13:16:29 +0000 (15:16 +0200)]
staging: rtl8723au: Do not embed struct wlan_bssid_ex in struct survey_event

Instead allocate it separately and reference it from survey_event.
This will allow for us to pass it on later without having to copy it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_survey_event_cb23a(): Use the correct types for the received...
Jes Sorensen [Mon, 9 Jun 2014 13:16:28 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_survey_event_cb23a(): Use the correct types for the received arguments

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Declare rtw_update_scanned_network() static
Jes Sorensen [Mon, 9 Jun 2014 13:16:27 +0000 (15:16 +0200)]
staging: rtl8723au: Declare rtw_update_scanned_network() static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_check_bcn_info23a(): Don't search for WPA/WPA2 info twice
Jes Sorensen [Mon, 9 Jun 2014 13:16:26 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_check_bcn_info23a(): Don't search for WPA/WPA2 info twice

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_check_bcn_info23a(): Don't make a local copy of beacon just...
Jes Sorensen [Mon, 9 Jun 2014 13:16:25 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_check_bcn_info23a(): Don't make a local copy of beacon just to parse it

In addition be consistent with return values and parsing them.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_check_bcn_info23a(): Use ether_addr_equal() to check BSSID
Jes Sorensen [Mon, 9 Jun 2014 13:16:24 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_check_bcn_info23a(): Use ether_addr_equal() to check BSSID

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove some unused 80211 header parsing macros
Jes Sorensen [Mon, 9 Jun 2014 13:16:23 +0000 (15:16 +0200)]
staging: rtl8723au: Remove some unused 80211 header parsing macros

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove unused #defines WEP_KEY_LEN and MGMT_QUEUE_NUM
Jes Sorensen [Mon, 9 Jun 2014 13:16:22 +0000 (15:16 +0200)]
staging: rtl8723au: Remove unused #defines WEP_KEY_LEN and MGMT_QUEUE_NUM

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove duplicate defines of IEEE80211_HT_PARAM_CHA_SEC_*
Jes Sorensen [Mon, 9 Jun 2014 13:16:21 +0000 (15:16 +0200)]
staging: rtl8723au: Remove duplicate defines of IEEE80211_HT_PARAM_CHA_SEC_*

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove obsolete rtw_set_fixed_ie23a()
Jes Sorensen [Mon, 9 Jun 2014 13:16:20 +0000 (15:16 +0200)]
staging: rtl8723au: Remove obsolete rtw_set_fixed_ie23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: issue_action_BA23a(): Use struct ieee80211_mgmt to build action...
Jes Sorensen [Mon, 9 Jun 2014 13:16:19 +0000 (15:16 +0200)]
staging: rtl8723au: issue_action_BA23a(): Use struct ieee80211_mgmt to build action frames

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: ioctl_cfg80211.c: Use struct ieee80211_mgmt to build mgmt frame
Jes Sorensen [Mon, 9 Jun 2014 13:16:18 +0000 (15:16 +0200)]
staging: rtl8723au: ioctl_cfg80211.c: Use struct ieee80211_mgmt to build mgmt frame

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Let cfg80211 handle public action management frames
Jes Sorensen [Mon, 9 Jun 2014 13:16:17 +0000 (15:16 +0200)]
staging: rtl8723au: Let cfg80211 handle public action management frames

The driver shouldn't be dealing with public action management frames.
Let these go directly to the cfg80211 layer which can defer them to
userland if needed.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Do not xmit BSS Coexistence management action frames
Jes Sorensen [Mon, 9 Jun 2014 13:16:16 +0000 (15:16 +0200)]
staging: rtl8723au: Do not xmit BSS Coexistence management action frames

The driver should not be issuing BSS Coexistence management action
frames when scanning. This isn't required by the spec, and if needed,
these should come from wpa_s instead.

Recommended by Johannes Berg.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: issue_action_BSSCoexistPacket(): Use struct ieee80211_mgmt
Jes Sorensen [Mon, 9 Jun 2014 13:16:15 +0000 (15:16 +0200)]
staging: rtl8723au: issue_action_BSSCoexistPacket(): Use struct ieee80211_mgmt

This gets rid of the rtw_set_fixed_ie23a() usage here. Note that this
abuses ieee80211_mgmt.u.action.u.chan_switch for now, since the
correct defines are currently missing, and this one matches.

Need to fix up the definitions in ieee80211.h and afterwards fix it up
here.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: issue_action_spct_ch_switch23a(): Use struct ieee80211_mgmt
Jes Sorensen [Mon, 9 Jun 2014 13:16:14 +0000 (15:16 +0200)]
staging: rtl8723au: issue_action_spct_ch_switch23a(): Use struct ieee80211_mgmt

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: _issue_deauth(): Use struct ieee80211_mgmt to build frame
Jes Sorensen [Mon, 9 Jun 2014 13:16:13 +0000 (15:16 +0200)]
staging: rtl8723au: _issue_deauth(): Use struct ieee80211_mgmt to build frame

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: issue_assocrsp(): Use struct ieee80211_mgmt instead of rtw_set_fi...
Jes Sorensen [Mon, 9 Jun 2014 13:16:10 +0000 (15:16 +0200)]
staging: rtl8723au: issue_assocrsp(): Use struct ieee80211_mgmt instead of rtw_set_fixed_ie23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: issue_auth(): Convert to using struct ieee80211_mgmt
Jes Sorensen [Mon, 9 Jun 2014 13:16:09 +0000 (15:16 +0200)]
staging: rtl8723au: issue_auth(): Convert to using struct ieee80211_mgmt

This reduces the dependency of rtw_set_fixed_ie23a() which is
scheduled to go away.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Make struct htpriv.ampdu_enable a bool
Jes Sorensen [Mon, 9 Jun 2014 13:16:08 +0000 (15:16 +0200)]
staging: rtl8723au: Make struct htpriv.ampdu_enable a bool

Be consistent in parsing it's value

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Be consistent in how htpriv.ht_option is checked
Jes Sorensen [Mon, 9 Jun 2014 13:16:07 +0000 (15:16 +0200)]
staging: rtl8723au: Be consistent in how htpriv.ht_option is checked

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Make struct ht_priv.ht_option a bool
Jes Sorensen [Mon, 9 Jun 2014 13:16:06 +0000 (15:16 +0200)]
staging: rtl8723au: Make struct ht_priv.ht_option a bool

Match the return type of rtw_restructure_ht_ie23a() accordingly

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove WMM_ defines
Jes Sorensen [Mon, 9 Jun 2014 13:16:05 +0000 (15:16 +0200)]
staging: rtl8723au: Remove WMM_ defines

Only one is used, and only describes the size of an array defined in a
local function. Use sizeof() in the local function to deobfuscate it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: OnAssocRsp23a(): Use cfg80211_* to parse IEs
Jes Sorensen [Mon, 9 Jun 2014 13:16:04 +0000 (15:16 +0200)]
staging: rtl8723au: OnAssocRsp23a(): Use cfg80211_* to parse IEs

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Make WMM_param_handler23a() and HT_caps_handler23a() take a const...
Jes Sorensen [Mon, 9 Jun 2014 13:16:03 +0000 (15:16 +0200)]
staging: rtl8723au: Make WMM_param_handler23a() and HT_caps_handler23a() take a const u8 *

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Declare rtw_get_wpa{2, }_cipher_suite() static
Jes Sorensen [Mon, 9 Jun 2014 13:16:02 +0000 (15:16 +0200)]
staging: rtl8723au: Declare rtw_get_wpa{2, }_cipher_suite() static

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove obsolete rtw_get_sec_ie23a()
Jes Sorensen [Mon, 9 Jun 2014 13:16:01 +0000 (15:16 +0200)]
staging: rtl8723au: Remove obsolete rtw_get_sec_ie23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_wlan_util.c: Use cfg80211_* to determine crypto
Jes Sorensen [Mon, 9 Jun 2014 13:16:00 +0000 (15:16 +0200)]
staging: rtl8723au: rtw_wlan_util.c: Use cfg80211_* to determine crypto

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_get_bcn_info23a(): Use cfg80211_* to obtain crypto info
Jes Sorensen [Mon, 9 Jun 2014 13:15:59 +0000 (15:15 +0200)]
staging: rtl8723au: rtw_get_bcn_info23a(): Use cfg80211_* to obtain crypto info

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_update_ht_cap23a(): Use correct mask when determining 40MHz...
Jes Sorensen [Tue, 3 Jun 2014 21:41:22 +0000 (23:41 +0200)]
staging: rtl8723au: rtw_update_ht_cap23a(): Use correct mask when determining 40MHz channel location

commit 4dc5f8bab2663b902b9cb0be29198dbbf38aa3fb
Author: Jes Sorensen <Jes.Sorensen@redhat.com>
Date:   Tue May 27 13:43:12 2014 +0200

    staging: rtl8723au: Eliminate struct HT_info_element

    Yet another duplicate version of struct ieee80211_ht_operation

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
introduced a bad error, applying the wrong value as the mask when
determining the location of the 40MHz channel, effectively making it
always determining it as not present. This caused hangs and delays
when running in 40MHz channel mode.

This should get it right.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: collect_bss_info23a(): ieee80211_mgmt capab_info is little endian
Jes Sorensen [Sat, 31 May 2014 16:05:19 +0000 (18:05 +0200)]
staging: rtl8723au: collect_bss_info23a(): ieee80211_mgmt capab_info is little endian

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: collect_bss_info23a(): Collect beacon_interval correct
Jes Sorensen [Sat, 31 May 2014 16:05:18 +0000 (18:05 +0200)]
staging: rtl8723au: collect_bss_info23a(): Collect beacon_interval correct

Only retrieve beacon_interval from frames where it is present. This
avoids setting BeaconPeriod to garbage for other frame types.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Rewrite update_beacon23a_info() tto use cfg80211_find_ie()
Jes Sorensen [Sat, 31 May 2014 16:05:17 +0000 (18:05 +0200)]
staging: rtl8723au: Rewrite update_beacon23a_info() tto use cfg80211_find_ie()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remmove buddy-adapter linking
Jes Sorensen [Sat, 31 May 2014 16:05:16 +0000 (18:05 +0200)]
staging: rtl8723au: Remmove buddy-adapter linking

This sort of stuff should be handled by the bonding driver

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_check_bcn_info23a(): Use capability bit define
Jes Sorensen [Sat, 31 May 2014 16:05:15 +0000 (18:05 +0200)]
staging: rtl8723au: rtw_check_bcn_info23a(): Use capability bit define

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Don't carry ht_cap_info and ht_param in struct wlan_bcn_info
Jes Sorensen [Sat, 31 May 2014 16:05:14 +0000 (18:05 +0200)]
staging: rtl8723au: Don't carry ht_cap_info and ht_param in struct wlan_bcn_info

These were just stored to check whether the beacon info had changed
and print a debug message in this case. If we ever need this again, we
can determine this change differently.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Eliminate struct HT_info_element
Jes Sorensen [Sat, 31 May 2014 16:05:13 +0000 (18:05 +0200)]
staging: rtl8723au: Eliminate struct HT_info_element

Yet another duplicate version of struct ieee80211_ht_operation

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Use correct struct for WLAN_EID_HT_CAPABILITY
Jes Sorensen [Sat, 31 May 2014 16:05:12 +0000 (18:05 +0200)]
staging: rtl8723au: Use correct struct for WLAN_EID_HT_CAPABILITY

WLAN_EID_HT_CAPABILITY carries a struct ieee80211_ht_operation - use
the right struct instead of a self invented one.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Use struct ieee80211_ht_cap and associated #defines
Jes Sorensen [Sat, 31 May 2014 16:05:11 +0000 (18:05 +0200)]
staging: rtl8723au: Use struct ieee80211_ht_cap and associated #defines

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Use struct ieee80211_mcs_info to describe MCS information
Jes Sorensen [Sat, 31 May 2014 16:05:10 +0000 (18:05 +0200)]
staging: rtl8723au: Use struct ieee80211_mcs_info to describe MCS information

The original RTL code defined the MCS information as a 16 byte array
and blindly applied it's masking over the full array, ignoring the
fact that only the first 10 bytes describe the rx_mask and the rest
are different fields.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_mlme.c: Remove some tab and parenthesis abuse
Jes Sorensen [Sat, 31 May 2014 16:05:09 +0000 (18:05 +0200)]
staging: rtl8723au: rtw_mlme.c: Remove some tab and parenthesis abuse

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_mlme_ext.c: Fix up some of the bad formatting
Jes Sorensen [Sat, 31 May 2014 16:05:08 +0000 (18:05 +0200)]
staging: rtl8723au: rtw_mlme_ext.c: Fix up some of the bad formatting

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: usbip: usbip_host_driver.c: fix line over 80 characters
Wahib Faizi [Thu, 12 Jun 2014 19:40:19 +0000 (23:40 +0400)]
staging: usbip: usbip_host_driver.c: fix line over 80 characters

Fix coding style issue "line over 80 characters"
detected by checkpatch.pl in usbip_host_driver.c.

Signed-off-by: Wahib Faizi <wahibfaizi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: usbip: usbip_host_driver.c: avoid assignment in if
Wahib Faizi [Thu, 12 Jun 2014 19:40:18 +0000 (23:40 +0400)]
staging: usbip: usbip_host_driver.c: avoid assignment in if

Fix coding style issue "do not use assignment in if condition"
detected by checkpatch.pl in usbip_host_driver.c.

Signed-off-by: Wahib Faizi <wahibfaizi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Reference correct firmwarefiles with MODULE_FIRMWARE()
Jes Sorensen [Mon, 9 Jun 2014 13:16:12 +0000 (15:16 +0200)]
staging: rtl8723au: Reference correct firmwarefiles with MODULE_FIRMWARE()

Add missing firmware references, and request the correct one.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Request correct firmware file for A-cut parts
Jes Sorensen [Mon, 9 Jun 2014 13:16:11 +0000 (15:16 +0200)]
staging: rtl8723au: Request correct firmware file for A-cut parts

The filename requested by the driver didn't match what we had sitting
in /lib/firmware/

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: Remove obsolete rtw_get_wps_ie23a()
Jes Sorensen [Mon, 9 Jun 2014 13:15:58 +0000 (15:15 +0200)]
staging: rtl8723au: Remove obsolete rtw_get_wps_ie23a()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_ap.c: Convert from rtw_get_wps_ie23a() to cfg80211_find_vendo...
Jes Sorensen [Mon, 9 Jun 2014 13:15:57 +0000 (15:15 +0200)]
staging: rtl8723au: rtw_ap.c: Convert from rtw_get_wps_ie23a() to cfg80211_find_vendor_ie()

Some of this is hackish, but so was the original code. This needs to
be cleaned up eventually.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: ioctl_cfg80211.c: Convert rtw_get_wps_ie23a() to cfg80211_find_ve...
Jes Sorensen [Mon, 9 Jun 2014 13:15:56 +0000 (15:15 +0200)]
staging: rtl8723au: ioctl_cfg80211.c: Convert rtw_get_wps_ie23a() to cfg80211_find_vendor_ie()

Given that the IE len is stored in a u8, there is no point having a
512 buffer to store it, nor check if the size exceeds this size.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_mlme.c: Convert rtw_get_wps_ie23a() to cfg80211_find_vendor_ie()
Jes Sorensen [Mon, 9 Jun 2014 13:15:55 +0000 (15:15 +0200)]
staging: rtl8723au: rtw_mlme.c: Convert rtw_get_wps_ie23a() to cfg80211_find_vendor_ie()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_mlme_ext.c: Convert rtw_get_wps_ie23a() to cfg80211_find_vend...
Jes Sorensen [Mon, 9 Jun 2014 13:15:54 +0000 (15:15 +0200)]
staging: rtl8723au: rtw_mlme_ext.c: Convert rtw_get_wps_ie23a() to cfg80211_find_vendor_ie()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8723au: rtw_get_wps_ie23a(): Remove unused dest pointer wps_ie
Jes Sorensen [Mon, 9 Jun 2014 13:15:53 +0000 (15:15 +0200)]
staging: rtl8723au: rtw_get_wps_ie23a(): Remove unused dest pointer wps_ie

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoLinux 3.16-rc1
Linus Torvalds [Mon, 16 Jun 2014 03:45:28 +0000 (17:45 -1000)]
Linux 3.16-rc1

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 16 Jun 2014 02:37:03 +0000 (16:37 -1000)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix checksumming regressions, from Tom Herbert.

 2) Undo unintentional permissions changes for SCTP rto_alpha and
    rto_beta sysfs knobs, from Denial Borkmann.

 3) VXLAN, like other IP tunnels, should advertize it's encapsulation
    size using dev->needed_headroom instead of dev->hard_header_len.
    From Cong Wang.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  net: sctp: fix permissions for rto_alpha and rto_beta knobs
  vxlan: Checksum fixes
  net: add skb_pop_rcv_encapsulation
  udp: call __skb_checksum_complete when doing full checksum
  net: Fix save software checksum complete
  net: Fix GSO constants to match NETIF flags
  udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
  vxlan: use dev->needed_headroom instead of dev->hard_header_len
  MAINTAINERS: update cxgb4 maintainer

10 years agoMerge tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette...
Linus Torvalds [Mon, 16 Jun 2014 02:02:20 +0000 (16:02 -1000)]
Merge tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux

Pull more clock framework updates from Mike Turquette:
 "This contains the second half the of the clk changes for 3.16.

  They are simply fixes and code refactoring for the OMAP clock drivers.
  The sunxi clock driver changes include splitting out the one
  mega-driver into several smaller pieces and adding support for the A31
  SoC clocks"

* tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits)
  clk: sunxi: document PRCM clock compatible strings
  clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support
  clk: sun6i: Protect SDRAM gating bit
  clk: sun6i: Protect CPU clock
  clk: sunxi: Rework clock protection code
  clk: sunxi: Move the GMAC clock to a file of its own
  clk: sunxi: Move the 24M oscillator to a file of its own
  clk: sunxi: Remove calls to clk_put
  clk: sunxi: document new A31 USB clock compatible
  clk: sunxi: Implement A31 USB clock
  ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies
  CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies
  ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC)
  CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck
  CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)
  dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings
  ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock
  CLK: TI: gate: add composite interface clock to OMAP2 only build
  ARM: OMAP2: clock: add DT boot support for cpufreq_ck
  CLK: TI: OMAP2: add clock init support
  ...

10 years agoMerge git://git.infradead.org/users/willy/linux-nvme
Linus Torvalds [Mon, 16 Jun 2014 01:58:03 +0000 (15:58 -1000)]
Merge git://git.infradead.org/users/willy/linux-nvme

Pull NVMe update from Matthew Wilcox:
 "Mostly bugfixes again for the NVMe driver.  I'd like to call out the
  exported tracepoint in the block layer; I believe Keith has cleared
  this with Jens.

  We've had a few reports from people who're really pounding on NVMe
  devices at scale, hence the timeout changes (and new module
  parameters), hotplug cpu deadlock, tracepoints, and minor performance
  tweaks"

[ Jens hadn't seen that tracepoint thing, but is ok with it - it will
  end up going away when mq conversion happens ]

* git://git.infradead.org/users/willy/linux-nvme: (22 commits)
  NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.
  NVMe: Use Log Page constants in SCSI emulation
  NVMe: Define Log Page constants
  NVMe: Fix hot cpu notification dead lock
  NVMe: Rename io_timeout to nvme_io_timeout
  NVMe: Use last bytes of f/w rev SCSI Inquiry
  NVMe: Adhere to request queue block accounting enable/disable
  NVMe: Fix nvme get/put queue semantics
  NVMe: Delete NVME_GET_FEAT_TEMP_THRESH
  NVMe: Make admin timeout a module parameter
  NVMe: Make iod bio timeout a parameter
  NVMe: Prevent possible NULL pointer dereference
  NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD)
  NVMe: Update data structures for NVMe 1.2
  NVMe: Enable BUILD_BUG_ON checks
  NVMe: Update namespace and controller identify structures to the 1.1a spec
  NVMe: Flush with data support
  NVMe: Configure support for block flush
  NVMe: Add tracepoints
  NVMe: Protect against badly formatted CQEs
  ...

10 years agonet: sctp: fix permissions for rto_alpha and rto_beta knobs
Daniel Borkmann [Sat, 14 Jun 2014 22:59:14 +0000 (00:59 +0200)]
net: sctp: fix permissions for rto_alpha and rto_beta knobs

Commit 3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs
to jiffies conversions.") has silently changed permissions for
rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of
this was to discourage users from tweaking rto_alpha and
rto_beta knobs in production environments since they are key
to correctly compute rtt/srtt.

RFC4960 under section 6.3.1. RTO Calculation says regarding
rto_alpha and rto_beta under rule C3 and C4:

  [...]
  C3)  When a new RTT measurement R' is made, set

       RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'|

       and

       SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'

       Note: The value of SRTT used in the update to RTTVAR
       is its value before updating SRTT itself using the
       second assignment. After the computation, update
       RTO <- SRTT + 4 * RTTVAR.

  C4)  When data is in flight and when allowed by rule C5
       below, a new RTT measurement MUST be made each round
       trip. Furthermore, new RTT measurements SHOULD be
       made no more than once per round trip for a given
       destination transport address. There are two reasons
       for this recommendation: First, it appears that
       measuring more frequently often does not in practice
       yield any significant benefit [ALLMAN99]; second,
       if measurements are made more often, then the values
       of RTO.Alpha and RTO.Beta in rule C3 above should be
       adjusted so that SRTT and RTTVAR still adjust to
       changes at roughly the same rate (in terms of how many
       round trips it takes them to reflect new values) as
       they would if making only one measurement per
       round-trip and using RTO.Alpha and RTO.Beta as given
       in rule C3. However, the exact nature of these
       adjustments remains a research issue.
  [...]

While it is discouraged to adjust rto_alpha and rto_beta
and not further specified how to adjust them, the RFC also
doesn't explicitly forbid it, but rather gives a RECOMMENDED
default value (rto_alpha=3, rto_beta=2). We have a couple
of users relying on the old permissions before they got
changed. That said, if someone really has the urge to adjust
them, we could allow it with a warning in the log.

Fixes: 3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'csum_fixes'
David S. Miller [Sun, 15 Jun 2014 08:00:56 +0000 (01:00 -0700)]
Merge branch 'csum_fixes'

Tom Herbert says:

====================
Fixes related to some recent checksum modifications.

- Fix GSO constants to match NETIF flags
- Fix logic in saving checksum complete in __skb_checksum_complete
- Call __skb_checksum_complete from UDP if we are checksumming over
  whole packet in order to save checksum.
- Fixes to VXLAN to work correctly with checksum complete
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: Checksum fixes
Tom Herbert [Sun, 15 Jun 2014 06:24:36 +0000 (23:24 -0700)]
vxlan: Checksum fixes

Call skb_pop_rcv_encapsulation and postpull_rcsum for the Ethernet
header to work properly with checksum complete.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: add skb_pop_rcv_encapsulation
Tom Herbert [Sun, 15 Jun 2014 06:24:28 +0000 (23:24 -0700)]
net: add skb_pop_rcv_encapsulation

This function is used by UDP encapsulation protocols in RX when
crossing encapsulation boundary. If ip_summed is set to
CHECKSUM_UNNECESSARY and encapsulation is not set, change to
CHECKSUM_NONE since the checksum has not been validated within the
encapsulation. Clears csum_valid by the same rationale.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoudp: call __skb_checksum_complete when doing full checksum
Tom Herbert [Sun, 15 Jun 2014 06:24:20 +0000 (23:24 -0700)]
udp: call __skb_checksum_complete when doing full checksum

In __udp_lib_checksum_complete check if checksum is being done over all
the data (len is equal to skb->len) and if it is call
__skb_checksum_complete instead of __skb_checksum_complete_head. This
allows checksum to be saved in checksum complete.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: Fix save software checksum complete
Tom Herbert [Sun, 15 Jun 2014 06:24:03 +0000 (23:24 -0700)]
net: Fix save software checksum complete

Geert reported issues regarding checksum complete and UDP.
The logic introduced in commit 7e3cead5172927732f51fde
("net: Save software checksum complete") is not correct.

This patch:
1) Restores code in __skb_checksum_complete_header except for setting
   CHECKSUM_UNNECESSARY. This function may be calculating checksum on
   something less than skb->len.
2) Adds saving checksum to __skb_checksum_complete. The full packet
   checksum 0..skb->len is calculated without adding in pseudo header.
   This value is saved in skb->csum and then the pseudo header is added
   to that to derive the checksum for validation.
3) In both __skb_checksum_complete_header and __skb_checksum_complete,
   set skb->csum_valid to whether checksum of zero was computed. This
   allows skb_csum_unnecessary to return true without changing to
   CHECKSUM_UNNECESSARY which was done previously.
4) Copy new csum related bits in __copy_skb_header.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: Fix GSO constants to match NETIF flags
Tom Herbert [Sun, 15 Jun 2014 06:23:52 +0000 (23:23 -0700)]
net: Fix GSO constants to match NETIF flags

Joseph Gasparakis reported that VXLAN GSO offload stopped working with
i40e device after recent UDP changes. The problem is that the
SKB_GSO_* bits are out of sync with the corresponding NETIF flags. This
patch fixes that. Also, we add BUILD_BUG_ONs in net_gso_ok for several
GSO constants that were missing to avoid the problem in the future.

Reported-by: Joseph Gasparakis <joseph.gasparakis@intel.com>
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
Linus Torvalds [Sun, 15 Jun 2014 00:49:48 +0000 (19:49 -0500)]
Merge tag 'scsi-for-linus' of git://git./linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "This is just a couple of drivers (hpsa and lpfc) that got left out for
  further testing in linux-next.  We also have one fix to a prior
  submission (qla2xxx sparse)"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (36 commits)
  qla2xxx: fix sparse warnings introduced by previous target mode t10-dif patch
  lpfc: Update lpfc version to driver version 10.2.8001.0
  lpfc: Fix ExpressLane priority setup
  lpfc: mark old devices as obsolete
  lpfc: Fix for initializing RRQ bitmap
  lpfc: Fix for cleaning up stale ring flag and sp_queue_event entries
  lpfc: Update lpfc version to driver version 10.2.8000.0
  lpfc: Update Copyright on changed files from 8.3.45 patches
  lpfc: Update Copyright on changed files
  lpfc: Fixed locking for scsi task management commands
  lpfc: Convert runtime references to old xlane cfg param to fof cfg param
  lpfc: Fix FW dump using sysfs
  lpfc: Fix SLI4 s abort loop to process all FCP rings and under ring_lock
  lpfc: Fixed kernel panic in lpfc_abort_handler
  lpfc: Fix locking for postbufq when freeing
  lpfc: Fix locking for lpfc_hba_down_post
  lpfc: Fix dynamic transitions of FirstBurst from on to off
  hpsa: fix handling of hpsa_volume_offline return value
  hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id
  hpsa: remove messages about volume status VPD inquiry page not supported
  ...

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 15 Jun 2014 00:48:43 +0000 (19:48 -0500)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull more btrfs updates from Chris Mason:
 "This has a few fixes since our last pull and a new ioctl for doing
  btree searches from userland.  It's very similar to the existing
  ioctl, but lets us return larger items back down to the app"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: fix error handling in create_pending_snapshot
  btrfs: fix use of uninit "ret" in end_extent_writepage()
  btrfs: free ulist in qgroup_shared_accounting() error path
  Btrfs: fix qgroups sanity test crash or hang
  btrfs: prevent RCU warning when dereferencing radix tree slot
  Btrfs: fix unfinished readahead thread for raid5/6 degraded mounting
  btrfs: new ioctl TREE_SEARCH_V2
  btrfs: tree_search, search_ioctl: direct copy to userspace
  btrfs: new function read_extent_buffer_to_user
  btrfs: tree_search, copy_to_sk: return needed size on EOVERFLOW
  btrfs: tree_search, copy_to_sk: return EOVERFLOW for too small buffer
  btrfs: tree_search, search_ioctl: accept varying buffer
  btrfs: tree_search: eliminate redundant nr_items check

10 years agoMerge git://git.kvack.org/~bcrl/aio-next
Linus Torvalds [Sun, 15 Jun 2014 00:43:27 +0000 (19:43 -0500)]
Merge git://git.kvack.org/~bcrl/aio-next

Pull aio fix and cleanups from Ben LaHaise:
 "This consists of a couple of code cleanups plus a minor bug fix"

* git://git.kvack.org/~bcrl/aio-next:
  aio: cleanup: flatten kill_ioctx()
  aio: report error from io_destroy() when threads race in io_destroy()
  fs/aio.c: Remove ctx parameter in kiocb_cancel

10 years agofix __swap_writepage() compile failure on old gcc versions
Al Viro [Sat, 14 Jun 2014 06:12:41 +0000 (07:12 +0100)]
fix __swap_writepage() compile failure on old gcc versions

Tetsuo Handa wrote:
 "Commit 62a8067a7f35 ("bio_vec-backed iov_iter") introduced an unnamed
  union inside a struct which gcc-4.4.7 cannot handle.  Name the unnamed
   union as u in order to fix build failure"

Let's do this instead: there is only one place in the entire tree that
steps into this breakage.  Anon structs and unions work in older gcc
versions; as the matter of fact, we have those in the tree - see e.g.
struct ieee80211_tx_info in include/net/mac80211.h

What doesn't work is handling their initializers:

struct {
int a;
union {
int b;
char c;
};
} x[2] = {{.a = 1, .c = 'a'}, {.a = 0, .b = 1}};

is the obvious syntax for initializer, perfectly fine for C11 and
handled correctly by gcc-4.7 or later.

Earlier versions, though, break on it - declaration is fine and so's
access to fields (i.e.  x[0].c = 'a'; would produce the right code), but
members of the anon structs and unions are not inserted into the right
namespace.  Tellingly, those older versions will not barf on struct {int
a; struct {int a;};}; - looks like they just have it hacked up somewhere
around the handling of .  and -> instead of doing the right thing.

The easiest way to deal with that crap is to turn initialization of
those fields (in the only place where we have such initializer of
iov_iter) into plain assignment.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge tag 'hsi-for-3.16-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 14 Jun 2014 21:51:25 +0000 (14:51 -0700)]
Merge tag 'hsi-for-3.16-fixes1' of git://git./linux/kernel/git/sre/linux-hsi

Pull HSI build fixes from Sebastian Reichel:
 - tighten dependency between ssi-protocol and omap-ssi to fix build
   failures with randconfig.
 - use normal module refcounting in omap driver to fix build with
   disabled module support

* tag 'hsi-for-3.16-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  hsi: omap_ssi_port: use normal module refcounting
  HSI: fix omap ssi driver dependency

10 years agoMerge tag 'gpio-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Sat, 14 Jun 2014 21:49:51 +0000 (14:49 -0700)]
Merge tag 'gpio-v3.16-2' of git://git./linux/kernel/git/linusw/linux-gpio

Pull GPIO fix from Linus Walleij:
 "A first GPIO fix for the v3.16 series, this was serious since it
  blocks the OMAP boot.

  Sending you this vital fix before leaving for a short vacation so it
  does not sit collecting dust in my tree for no good reason.

  Apart from this, our v3.16 cycle looks like a good start"

* tag 'gpio-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: of: Fix handling for deferred probe for -gpio suffix

10 years agoMerge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 14 Jun 2014 21:46:29 +0000 (14:46 -0700)]
Merge branch 'x86-vdso-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 vdso fixes from Peter Anvin:
 "Fixes for x86/vdso.

  One is a simple build fix for bigendian hosts, one is to make "make
  vdso_install" work again, and the rest is about working around a bug
  in Google's Go language -- two are documentation patches that improves
  the sample code that the Go coders took, modified, and broke; the
  other two implements a workaround that keeps existing Go binaries from
  segfaulting at least"

* 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vdso: Fix vdso_install
  x86/vdso: Hack to keep 64-bit Go programs working
  x86/vdso: Add PUT_LE to store little-endian values
  x86/vdso/doc: Make vDSO examples more portable
  x86/vdso/doc: Rename vdso_test.c to vdso_standalone_test_x86.c
  x86, vdso: Remove one final use of htole16()

10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Sat, 14 Jun 2014 21:43:23 +0000 (14:43 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 - new driver for Sensirion SHTC1 humidity / temperature sensor
 - convert ltc4151 and vexpress drivers to use devm functions
 - drop generic chip detection from lm85 driver
 - avoid forward declarations in atxp1 driver
 - fix sign extensions in ina2xx driver

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: vexpress: Use devm helper for hwmon device registration
  hwmon: (atxp1) Avoid forward declaration
  hwmon: add support for Sensirion SHTC1 sensor
  hwmon: (ltc4151) Convert to devm_hwmon_device_register_with_groups
  hwmon: (lm85) Drop generic detection
  hwmon: (ina2xx) Cast to s16 on shunt and current regs

10 years agoudp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
Eric Dumazet [Thu, 12 Jun 2014 23:13:06 +0000 (16:13 -0700)]
udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup

Its too easy to add thousand of UDP sockets on a particular bucket,
and slow down an innocent multicast receiver.

Early demux is supposed to be an optimization, we should avoid spending
too much time in it.

It is interesting to note __udp4_lib_demux_lookup() only tries to
match first socket in the chain.

10 is the threshold we already have in __udp4_lib_lookup() to switch
to secondary hash.

Fixes: 421b3885bf6d5 ("udp: ipv4: Add udp early demux")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: David Held <drheld@google.com>
Cc: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: use dev->needed_headroom instead of dev->hard_header_len
Cong Wang [Thu, 12 Jun 2014 18:53:10 +0000 (11:53 -0700)]
vxlan: use dev->needed_headroom instead of dev->hard_header_len

When we mirror packets from a vxlan tunnel to other device,
the mirror device should see the same packets (that is, without
outer header). Because vxlan tunnel sets dev->hard_header_len,
tcf_mirred() resets mac header back to outer mac, the mirror device
actually sees packets with outer headers

Vxlan tunnel should set dev->needed_headroom instead of
dev->hard_header_len, like what other ip tunnels do. This fixes
the above problem.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: stephen hemminger <stephen@networkplumber.org>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMAINTAINERS: update cxgb4 maintainer
Dimitris Michailidis [Fri, 13 Jun 2014 21:11:14 +0000 (14:11 -0700)]
MAINTAINERS: update cxgb4 maintainer

Hari's been doing the patch submissions for a while now and he'll be
taking over as maintainer.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agox86/vdso: Fix vdso_install
Andy Lutomirski [Thu, 12 Jun 2014 15:28:10 +0000 (08:28 -0700)]
x86/vdso: Fix vdso_install

"make vdso_install" installs unstripped versions of the vdso objects
for the benefit of the debugger.  This was broken by checkin:

6f121e548f83 x86, vdso: Reimplement vdso.so preparation in build-time C

The filenames are different now, so update the Makefile to cope.

This still installs the 64-bit vdso as vdso64.so.  We believe this
will be okay, as the only known user is a patched gdb which is known
to use build-ids, but if it turns out to be a problem we may have to
add a link.

Inspired by a patch from Sam Ravnborg.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
Tested-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/b10299edd8ba98d17e07dafcd895b8ecf4d99eff.1402586707.git.luto@amacapital.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
10 years agoNVMe: Fix START_STOP_UNIT Scsi->NVMe translation.
Dan McLeran [Fri, 6 Jun 2014 14:27:27 +0000 (08:27 -0600)]
NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.

This patch contains several fixes for Scsi START_STOP_UNIT. The previous
code did not account for signed vs. unsigned arithmetic which resulted
in an invalid lowest power state caculation when the device only supports
1 power state.

The code for Power Condition == 2 (Idle) was not following the spec. The
spec calls for setting the device to specific power states, depending
upon Power Condition Modifier, without accounting for the number of
power states supported by the device.

The code for Power Condition == 3 (Standby) was using a hard-coded '0'
which is replaced with the macro POWER_STATE_0.

Signed-off-by: Dan McLeran <daniel.mcleran@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@linux.intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
10 years agobtrfs: fix error handling in create_pending_snapshot
Eric Sandeen [Thu, 12 Jun 2014 05:53:44 +0000 (00:53 -0500)]
btrfs: fix error handling in create_pending_snapshot

fcebe456 cut and pasted some code to a later point
in create_pending_snapshot(), but didn't switch
to the appropriate error handling for this stage
of the function.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <clm@fb.com>
10 years agobtrfs: fix use of uninit "ret" in end_extent_writepage()
Eric Sandeen [Thu, 12 Jun 2014 05:39:58 +0000 (00:39 -0500)]
btrfs: fix use of uninit "ret" in end_extent_writepage()

If this condition in end_extent_writepage() is false:

if (tree->ops && tree->ops->writepage_end_io_hook)

we will then test an uninitialized "ret" at:

ret = ret < 0 ? ret : -EIO;

The test for ret is for the case where ->writepage_end_io_hook
failed, and we'd choose that ret as the error; but if
there is no ->writepage_end_io_hook, nothing sets ret.

Initializing ret to 0 should be sufficient; if
writepage_end_io_hook wasn't set, (!uptodate) means
non-zero err was passed in, so we choose -EIO in that case.

Signed-of-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <clm@fb.com>