Loading drivers/platform/msm/msm_11ad/msm_11ad.c +26 −3 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ struct msm11ad_ctx { struct cpumask boost_cpu; bool keep_radio_on_during_sleep; int features; }; static LIST_HEAD(dev_list); Loading Loading @@ -1444,9 +1445,19 @@ static int ops_notify(void *handle, enum wil_platform_event evt) break; case WIL_PLATFORM_EVT_PRE_RESET: /* * TODO: Enable rf_clk3 clock before resetting the device to * ensure stable ref clock during the device reset * Enable rf_clk3 clock before resetting the device to ensure * stable ref clock during the device reset */ if (ctx->features & BIT(WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL)) { rc = msm_11ad_enable_clk(ctx, &ctx->rf_clk3); if (rc) { dev_err(ctx->dev, "failed to enable clk, rc %d\n", rc); break; } } /* Re-enable L1 in case it was enabled in enumeration */ if (ctx->l1_enabled_in_enum) { rc = msm_11ad_ctrl_aspm_l1(ctx, true); Loading @@ -1457,9 +1468,12 @@ static int ops_notify(void *handle, enum wil_platform_event evt) break; case WIL_PLATFORM_EVT_FW_RDY: /* * TODO: Disable rf_clk3 clock after the device is up to allow * Disable rf_clk3 clock after the device is up to allow * the device to control it via its GPIO for power saving */ if (ctx->features & BIT(WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL)) msm_11ad_disable_clk(ctx, &ctx->rf_clk3); break; default: pr_debug("%s: Unhandled event %d\n", __func__, evt); Loading @@ -1485,6 +1499,14 @@ static int ops_get_capa(void *handle) return capa; } static void ops_set_features(void *handle, int features) { struct msm11ad_ctx *ctx = (struct msm11ad_ctx *)handle; pr_debug("%s: features 0x%x\n", __func__, features); ctx->features = features; } void *msm_11ad_dev_init(struct device *dev, struct wil_platform_ops *ops, const struct wil_platform_rops *rops, void *wil_handle) { Loading Loading @@ -1525,6 +1547,7 @@ void *msm_11ad_dev_init(struct device *dev, struct wil_platform_ops *ops, ops->uninit = ops_uninit; ops->notify = ops_notify; ops->get_capa = ops_get_capa; ops->set_features = ops_set_features; return ctx; } Loading Loading
drivers/platform/msm/msm_11ad/msm_11ad.c +26 −3 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ struct msm11ad_ctx { struct cpumask boost_cpu; bool keep_radio_on_during_sleep; int features; }; static LIST_HEAD(dev_list); Loading Loading @@ -1444,9 +1445,19 @@ static int ops_notify(void *handle, enum wil_platform_event evt) break; case WIL_PLATFORM_EVT_PRE_RESET: /* * TODO: Enable rf_clk3 clock before resetting the device to * ensure stable ref clock during the device reset * Enable rf_clk3 clock before resetting the device to ensure * stable ref clock during the device reset */ if (ctx->features & BIT(WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL)) { rc = msm_11ad_enable_clk(ctx, &ctx->rf_clk3); if (rc) { dev_err(ctx->dev, "failed to enable clk, rc %d\n", rc); break; } } /* Re-enable L1 in case it was enabled in enumeration */ if (ctx->l1_enabled_in_enum) { rc = msm_11ad_ctrl_aspm_l1(ctx, true); Loading @@ -1457,9 +1468,12 @@ static int ops_notify(void *handle, enum wil_platform_event evt) break; case WIL_PLATFORM_EVT_FW_RDY: /* * TODO: Disable rf_clk3 clock after the device is up to allow * Disable rf_clk3 clock after the device is up to allow * the device to control it via its GPIO for power saving */ if (ctx->features & BIT(WIL_PLATFORM_FEATURE_FW_EXT_CLK_CONTROL)) msm_11ad_disable_clk(ctx, &ctx->rf_clk3); break; default: pr_debug("%s: Unhandled event %d\n", __func__, evt); Loading @@ -1485,6 +1499,14 @@ static int ops_get_capa(void *handle) return capa; } static void ops_set_features(void *handle, int features) { struct msm11ad_ctx *ctx = (struct msm11ad_ctx *)handle; pr_debug("%s: features 0x%x\n", __func__, features); ctx->features = features; } void *msm_11ad_dev_init(struct device *dev, struct wil_platform_ops *ops, const struct wil_platform_rops *rops, void *wil_handle) { Loading Loading @@ -1525,6 +1547,7 @@ void *msm_11ad_dev_init(struct device *dev, struct wil_platform_ops *ops, ops->uninit = ops_uninit; ops->notify = ops_notify; ops->get_capa = ops_get_capa; ops->set_features = ops_set_features; return ctx; } Loading