Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/checkpatch.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
name: Advisory checkpatch review
on: [pull_request]

permissions:
contents: read

jobs:
review:
name: checkpatch review
runs-on: ubuntu-latest
steps:
- name: 'Calculate PR commits + 1'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- name: Copy checkpatch.conf
run: cp ${{github.workspace}}/.github/workflows/ci_checkpatch.conf ${{github.workspace}}/.checkpatch.conf
- name: Run checkpatch review
uses: webispy/checkpatch-action@v9
env:
# Use the tree's checkpatch.pl, not the action image's stale copy
CHECKPATCH_COMMAND: perl scripts/checkpatch.pl
uses: webispy/checkpatch-action@58374fe5bb03358b23d3d6871e2ff290ce77fcd2 # v9
6 changes: 5 additions & 1 deletion .github/workflows/dtoverlaycheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
branches: [ "rpi-*" ]
workflow_dispatch:

permissions:
contents: read

env:
UTILS_DIR: "${{github.workspace}}/utils"

Expand All @@ -25,8 +28,9 @@ jobs:
sudo apt-get install gcc-arm-linux-gnueabihf libfdt-dev device-tree-compiler gnutls-dev
timeout-minutes: 15

- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 1
clean: true

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
branches: [ "rpi-*" ]
workflow_dispatch:

permissions:
contents: read

env:
NUM_JOBS: 6

Expand Down Expand Up @@ -72,8 +75,9 @@ jobs:
sudo apt-get install -y gcc-arm-linux-gnueabihf
timeout-minutes: 15

- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 1
clean: true

Expand Down Expand Up @@ -103,7 +107,7 @@ jobs:
run: tar -cvf ${{matrix.name}}_build.tar -C ${{github.workspace}}/install .

- name: Upload results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{matrix.name}}_build
path: ${{matrix.name}}_build.tar
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/kunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ on:
push:
branches: [ "rpi-*"]

permissions:
contents: read

jobs:
core:
name: Generic DRM/KMS Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Run Generic DRM Tests
run: |
Expand All @@ -25,7 +30,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Dependencies
run: |
Expand All @@ -43,7 +50,9 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Dependencies
run: |
Expand Down
113 changes: 80 additions & 33 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5177,6 +5177,49 @@ brcmf_parse_configure_security(struct brcmf_if *ifp,
return err;
}

/*
* An AP on the primary interface, or on firmware that can't run several
* interfaces at once, has the radio to itself. Starting and stopping it
* takes the whole device down and up, which would break any other
* interface (e.g. an upstream STA connection).
*/
static bool brcmf_ap_owns_radio(struct brcmf_if *ifp)
{
return ifp->ifidx == 0 ||
(!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB) &&
!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN));
}

static s32 brcmf_bss_disable(struct brcmf_if *ifp)
{
struct brcmf_fil_bss_enable_le bss_enable;
s32 err;

bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx);
bss_enable.enable = cpu_to_le32(0);
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
bphy_err(ifp->drvr, "bss_enable config failed %d\n", err);

return err;
}

/*
* Stop the firmware from time-sharing the radio between an AP and another
* interface on different channels, so that the AP follows the channel of an
* associated STA. Not all firmware supports this, hence the lack of fuss.
*/
static void brcmf_set_mchan_stago_disab(struct brcmf_if *ifp, bool disab)
{
s32 err;

err = brcmf_fil_iovar_int_set(ifp, "mchan_stago_disab", disab);
if (err)
brcmf_dbg(INFO, "mchan_stago_disab %d failed: %d\n", disab,
err);
}

static s32
brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_ap_settings *settings)
Expand Down Expand Up @@ -5275,10 +5318,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
}
}

if ((dev_role == NL80211_IFTYPE_AP) &&
((ifp->ifidx == 0) ||
(!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB) &&
!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN)))) {
if (dev_role == NL80211_IFTYPE_AP && brcmf_ap_owns_radio(ifp)) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
bphy_err(drvr, "BRCMF_C_DOWN error %d\n",
Expand All @@ -5304,6 +5344,9 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
if ((brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) && (!mbss))
brcmf_fil_iovar_int_set(ifp, "mbss", 1);

if (!brcmf_ap_owns_radio(ifp))
brcmf_set_mchan_stago_disab(ifp, true);

err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1);
if (err < 0) {
bphy_err(drvr, "setting AP mode failed %d\n",
Expand Down Expand Up @@ -5423,6 +5466,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
brcmf_set_mpc(ifp, 1);
brcmf_configure_arp_nd_offload(ifp, true);
}
if (err && dev_role == NL80211_IFTYPE_AP && !brcmf_ap_owns_radio(ifp))
brcmf_set_mchan_stago_disab(ifp, false);
return err;
}

Expand All @@ -5434,7 +5479,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_profile *profile = &ifp->vif->profile;
s32 err;
struct brcmf_fil_bss_enable_le bss_enable;
struct brcmf_join_params join_params;

brcmf_dbg(TRACE, "Enter\n");
Expand All @@ -5459,38 +5503,41 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
return err;
}

/* First BSS doesn't get a full reset */
if (ifp->bsscfgidx == 0)
brcmf_fil_iovar_int_set(ifp, "closednet", 0);
if (brcmf_ap_owns_radio(ifp)) {
/* First BSS doesn't get a full reset */
if (ifp->bsscfgidx == 0)
brcmf_fil_iovar_int_set(ifp, "closednet", 0);

memset(&join_params, 0, sizeof(join_params));
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0)
bphy_err(drvr, "SET SSID error (%d)\n", err);
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0)
bphy_err(drvr, "BRCMF_C_DOWN error %d\n", err);
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
if (err < 0)
bphy_err(drvr, "setting AP mode failed %d\n", err);
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
ifp->vif->is_11d);
/* Bring device back up so it can be used again */
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0)
bphy_err(drvr, "BRCMF_C_UP error %d\n", err);
memset(&join_params, 0, sizeof(join_params));
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params,
sizeof(join_params));
if (err < 0)
bphy_err(drvr, "SET SSID error (%d)\n", err);
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0)
bphy_err(drvr, "BRCMF_C_DOWN error %d\n", err);
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
if (err < 0)
bphy_err(drvr, "setting AP mode failed %d\n",
err);
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
ifp->vif->is_11d);
/* Bring device back up so it can be used again */
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0)
bphy_err(drvr, "BRCMF_C_UP error %d\n", err);
} else {
/* Leave the radio, and other interfaces, running */
err = brcmf_bss_disable(ifp);
brcmf_set_mchan_stago_disab(ifp, false);
}

brcmf_vif_clear_mgmt_ies(ifp->vif);
} else {
bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx);
bss_enable.enable = cpu_to_le32(0);
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
bphy_err(drvr, "bss_enable config failed %d\n", err);
err = brcmf_bss_disable(ifp);
}
brcmf_set_mpc(ifp, 1);
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
Expand Down